That worked great! Thank you very much!
Harry
On Monday, March 1, 2021 at 3:12:45 PM UTC-5 Brian Coca wrote:
> Ah, misinterpreted what you wanted, just put the if inside the for and
> base it on the hostvar
>
> {% for i in play_hosts | sort %}
> {% if hostvars[i]['chrony'] is changed %}
> Host: {{ i }}
> chronyd state: {{ hostvars[i]['chrony']['state'] }}
> {% endif %}
> {% endfor %}
>
> But you should really move to a 2nd play on hosts: localhost so you
> wont send report X number of hosts that changed
> ----------
> Brian Coca
>
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/8d52cbb6-6593-4caa-9f0b-d4ab535f9539n%40googlegroups.com.