I'm pretty new in ansible and by now can't figure out how to make an idempotent task. E.g.
file. It simply doesn't have
command module it does have
creates, but whenever I run the provisioner and the file (symbolic link) does exist, the ansible still marks the command as "ok", not "skipped".
command module example
- name: Firefox | link command: ln -s /opt/firefox/firefox /usr/local/bin/firefox creates=/usr/local/bin/firefox
Always gets executed.
How do I get sure that the command won't be executed >=2 times given the node's state is already accomplished by 1st run?