mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-11-28 21:50:18 +01:00
17 lines
488 B
YAML
17 lines
488 B
YAML
|
# SPDX-License-Identifier: MIT
|
||
|
---
|
||
|
- name: Get file
|
||
|
ansible.builtin.slurp:
|
||
|
path: "{{ __file }}"
|
||
|
register: __content
|
||
|
when: not __file_content is defined
|
||
|
|
||
|
- name: Check for presence of ansible managed header, fingerprint
|
||
|
ansible.builtin.assert:
|
||
|
that:
|
||
|
- ansible_managed in content
|
||
|
- __fingerprint in content
|
||
|
vars:
|
||
|
content: "{{ (__file_content | d(__content)).content | b64decode }}"
|
||
|
ansible_managed: "{{ lookup('template', 'get_ansible_managed.j2') }}"
|