LearnLinuxTV / personal_ansible_desktop_configs

315 stars 96 forks source link

Why changed_when false in the pre-run tasks? #3

Closed janvanveldhuizen closed 1 year ago

janvanveldhuizen commented 3 years ago

Just a small thing, but I am trying to understand every bit and piece of this approach. I am wondering why you are using changed_when: False in the apt update task. This means the result is always green, right? Whether the task did something or not.

LearnLinuxTV commented 1 year ago

The reason for this is because the apt repository index is literally always going to change, so reporting a change for this offers no value and instead just makes the entire thing show that something was updated, but only because an apt update was run.