Top "Ansible-template" questions

Use this tag for questions regarding writing and processing Ansible templates, Jinja2 syntax within Ansible, custom filters.

Ansible concat default variable and literal string

I'm not able to do a very simple thing. In my task I'm trying to concat two default variables with …

ansible yaml jinja2 ansible-template
How can I take a list of server names and append a resource URI and port to each?

I merged two lists from an Ansible inventory: set_fact: fact1: "{{ groups['group1'] + groups[group2']|list }} The output …

ansible jinja2 ansible-template
How to extract the exact output from stdout.lines in ansible

My Ansible Playbook: #Tag --> B.6 --> - name: Change the Security Realm to CustomRealm from ManagementRealm command: /…

ansible ansible-2.x ansible-facts ansible-template
Ansible template module not parsing with_items variable

I am using a simple template with only variables in it. This is how my task looks like in my …

ansible jinja2 ansible-template
Get first "N" elements of a list in Jinja2 template in Ansible

Most of my locations have 4+ DNS sources, but a few have less. Each location gets their own dns4_ips list …

ansible jinja2 ansible-template