Files
ansible-role-aide/tests/tasks/check_not_present_header.yml
T
2024-11-12 11:15:10 +01:00

17 lines
464 B
YAML

# SPDX-License-Identifier: MIT
---
- name: Get file
slurp:
path: "{{ __file }}"
register: __content
when: not __file_content is defined
- name: Check for presence of ansible managed header, fingerprint
assert:
that:
- ansible_managed not in content
- __fingerprint not in content
vars:
content: "{{ (__file_content | d(__content)).content | b64decode }}"
ansible_managed: "{{ lookup('template', 'get_ansible_managed.j2') }}"