Re: [ansible-project] jinja2 conditional help

2023-11-27 Thread Dimitri Yioulos
Will, worked perfectly - thanks! On Monday, November 27, 2023 at 10:10:21 AM UTC-5 Will McDonald wrote: > I haven't tested this but does something like: > > {{ hostvars[host]['result']['stdout']|default("None", true) }} > > Give the output you need? > > cf: > - https://support.sendwith

Re: [ansible-project] jinja2 conditional help

2023-11-27 Thread Will McDonald
I haven't tested this but does something like: {{ hostvars[host]['result']['stdout']|default("None", true) }} Give the output you need? cf: - https://support.sendwithus.com/jinja/default/ - https://jinja.palletsprojects.com/en/3.1.x/templates/#jinja-filters.default On Mon, 27 Nov 202

[ansible-project] jinja2 conditional help

2023-11-27 Thread Dimitri Yioulos
Good day, all. I've created a simple package update playbook, which also creates a report of updated packages: - hosts: mytesthosts gather_facts: false become: yes tasks: - name: install all updates yum: name: '*' update_cache: yes state: latest - nam