refactor: fix Ansible 2.19 issues

Cannot write to ansible_managed - it is a special variable

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
This commit is contained in:
Rich Megginson
2025-06-26 13:40:09 -06:00
committed by Richard Megginson
parent 387004f5d8
commit 7ebc20d774
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -9,8 +9,8 @@
- name: Check for presence of ansible managed header, fingerprint - name: Check for presence of ansible managed header, fingerprint
assert: assert:
that: that:
- ansible_managed in content - __ansible_managed in content
- __fingerprint in content - __fingerprint in content
vars: vars:
content: "{{ (__file_content | d(__content)).content | b64decode }}" content: "{{ (__file_content | d(__content)).content | b64decode }}"
ansible_managed: "{{ lookup('template', 'get_ansible_managed.j2') }}" __ansible_managed: "{{ lookup('template', 'get_ansible_managed.j2') }}"
+2 -2
View File
@@ -9,8 +9,8 @@
- name: Check for presence of ansible managed header, fingerprint - name: Check for presence of ansible managed header, fingerprint
assert: assert:
that: that:
- ansible_managed not in content - __ansible_managed not in content
- __fingerprint not in content - __fingerprint not in content
vars: vars:
content: "{{ (__file_content | d(__content)).content | b64decode }}" content: "{{ (__file_content | d(__content)).content | b64decode }}"
ansible_managed: "{{ lookup('template', 'get_ansible_managed.j2') }}" __ansible_managed: "{{ lookup('template', 'get_ansible_managed.j2') }}"