Collect all kinds of ansible programming exceptions and fault solutions.

Include Tasks of Role By Tag Or Filter In Ansible Playbook

How can I specify only a subset of the tasks of a role for inclusion?
Say, I want to include the tasks from the role foobar, but only the ones tagged by baz:
- import_role:

URI in WSL yield an authentication or permission failure

Trying to use Ansible URI module on windows in WSL, but have an error like below:
fatal: []: UNREACHABLE! => {"changed": false, "msg": "Authentication or permis...

Automating Deployment Environment Ansible based on hostname (nested variable name)

Using an ansible playbook, I have three stages of development aka. test stage prod and want to access a dictionary with settings based on the stages. My ./defaults/main.yaml would have:

Ansible delete Files with wildcard/regex/glob with exception

I want to delete files based on a wildcard but also add exceptions to the rule.
- hosts: all
- name: Ansible delete file wildcard
paths: /etc/wild_card/example

Specifying inventory file path in ansible playbook

I'm trying to know how we can specify the inventory file path in the ansible playbook. I'm aware of specifying the inventory path at the command line using "-i" and it works for me. But i'm

How do I install an Ansible Galaxy role from a tar.gz file?

I have seen a number of sites that explain how to install a role from a tar.gz file using ansible-galaxy, and they all seem to say the same thing.
In my case I have downloaded the following role file

How to use fetch module in ansible

I want to copy file from remote server to local machine using ansible playbook. But when I do that using fetch module folder with server IP gets created on local machine with complete directory str...

Decryption failed (no vault secrets would found that could decrypt)

I have organized my configs into a role based directory structure. Some of those roles have default variable files that have encrypted text. Here's a simplified and tested task list that...

Run a script module with ansible variable

I've this task :
- name: script
script: "scripts/"
And in this script I would like to use ansible var like {{myvar}}
Is that possible ?

condition before retires complete in async_status

I written a async_status to get the status of a job, but some reason even though the job is done the job status in not coming back to non-zero., in that cases it is erroring out and that host is ig...

What is the effective way to define Ansible configuration

I am trying to understand to how to define my configs in host_vars files.
I have individual files for each router.
- { group: 101, mode: trunk, description: ...