Showing posts with the label ansible

[FIXED] compose files provided as list in Ansible Playbook provide Configuration Error on execution

Issue Description I wish to bring a couple of containers using distinct compose.yml files instead…

[FIXED] Ansible list of dicts - accessing keys after a list filter

Issue Taking this playbook YAML: --- - hosts: localhost become: false vars: list_of_dicts…

[FIXED] Using Split and join together in Ansible template file

Issue I want to use hostnames of a group in ansible inventory in a template bash script file. This …

[FIXED] Ansible: Looping over a list of dicts and merging with another dict of lists

Issue I'm trying to work out how to loop over a list of dicts and extract the name of each entr…

[FIXED] Ansible set_fact list using jinja

Issue I'm trying to learn jinja and Ansible. This is on RHEL 7.9, ansible 2.9.27 ansible pyt…

[FIXED] Get sublist of dictionaries based on attribute condition

Issue I have this list of dictionaries: some_list: - name: alfa dir: aaa - name: beta …

[FIXED] Ansible: loop trough list of files of different users, sort by date, delete oldest x ones of each user

Issue I am struggling with this issue since several days and would appreciate your help. I would li…

[FIXED] How to exclude an host in Ansible Jinja2 template for-loop?

Issue I have a template named foo.yml.j2 used in an Ansible task to generate a foo.yml file: …

[FIXED] ansible - create list of dict using jinja2

Issue I need to create list of dicts using only jinja2 from an array input. One key/value pair is …

[FIXED] Ansible - check variable type

Issue Apparently, according to several hours of searching nobody has encountered this use-case: I…

[FIXED] Jinja2 - create a dynamic variable using value of variable as part of the key of another variable

Issue I am writing a jinja2 template for an Ansible role. I have this in my role/x/vars/main.yml …

[FIXED] Ansible get other group vars

Issue I'm digging into Ansible capabilities a bit further, and I'm looking to implement wit…

[FIXED] How do I reference variable in Jinja Ternary operation?

Issue How do I reference a variable inside the ternary operation? ex: shell: "{{some_conditon…

[FIXED] How to get the first element of a list from the output of setup module in Ansible?

Issue I received the following data from the setup module: "ansible_nodename": "3d…

[FIXED] Ansible Looping over dynamic inventory using jinja template

Issue Here is my Ansible playbook. It reads /etc/waagent.conf file and checks if variable AutoUpdat…

[FIXED] Ansible regex_findall is not giving expected results with negative search

Issue My ansible negative regex is returning everything So I'm getting results of dns names fr…