Created
June 15, 2022 12:55
-
-
Save sigio/0e4217bf5fe5bc4494df691dcfdb545e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
At the end of every role: | |
- import_tasks: "common_tasks/update_localfacts.yaml" | |
And in that file: | |
--- | |
- name: update localfacts | |
ini_file: | |
path: "/etc/ansible/facts.d/custom.fact" | |
section: "deployedroles" | |
option: "{{ ansible_role_name }}" | |
value: "{{ ansible_date_time.iso8601 }}" | |
mode: "0644" | |
owner: "root" | |
group: "root" | |
changed_when: false | |
# Don't report as changed, as it always changes, and is no functional change |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment