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:
tasks:
- import_role:
name:


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: [127.0.0.1]: 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:
prod:
pro...


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
tasks:
- name: Ansible delete file wildcard
find:
paths: /etc/wild_card/example
patt...


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)

UPDATED:
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/script.sh"
And in this script I would like to use ansible var like {{myvar}}
Is that possible ?
THKS


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.
abc_router.yaml:
---
lacp_channel:
- { group: 101, mode: trunk, description: ...