Hi,

you should better use systemd module instead of command to do what you intended to do... This module is better at idempotence that command

Command is not idempotent by default, you have to do it (there are different ways to do it), this is why you have some changes

Regards,

Le 16/05/2020 à 12:20, Marc Haber a écrit :
Hi,

the following task:

- name: configure systemd-timesyncd - check unit active
   command:
     argv:
       - "systemctl"
       - "is-enabled"
       - "systemd-timesyncd"
   check_mode: no
   register: systemd_timesyncd_unit_enabled

yields a "changed" in the playbook output:

TASK [systemd-timesyncd : configure systemd-timesyncd - check unit active] *****
changed: [news1]
changed: [check]
changed: [slide]

Can I have ansible ignore that and output an "ok" instead for cosmetic reasons
and for statistics?

Greetings
Marc


--
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/a4fcc52b-906b-336d-6138-415d06e11f68%40lenhof.eu.org.

Reply via email to