How to reduce the number of displayed "changes" when running Ansible? -


when running ansible playbook on number of machines regularly, numerous "changes" displayed if nothing changed (anymore).

this can have different reasons. example 1 simple reason registering variables:

tasks: - name: fetch docker_compose_version   shell: docker-compose --version   register: docker_compose_version 

this block results in

task [fetch docker_compose_version] ******************************************************************************** changed: [mysrv] 

i see change if there has been changed on machine. how can achieve this?

that's changed_when for. example:

- name: fetch docker_compose_version   shell: docker-compose --version   register: docker_compose_version   changed_when: false 

for scripts , commands need define condition (there no magic behind, regular modules handle manually too). have @ overriding changed result.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -