1
0
mirror of https://github.com/openshift/openshift-ansible-contrib.git synced 2026-02-05 09:45:58 +01:00
Files
openshift-ansible-contrib/reference-architecture/3.9/playbooks/roles/aws/tasks/configfiles_cns.yaml

18 lines
665 B
YAML

---
- name: "{{ 'Create' if (state is undefined or 'absent' not in state) else 'Terminate' }} config files (CNS)"
file:
path: "{{ item }}"
state: "{{ 'touch' if (state is undefined or 'absent' not in state) else 'absent' }}"
register: touchfiles
with_items:
- "~/.ssh/config-{{ clusterid }}.{{ dns_domain }}-hostscns"
- "~/.ssh/config-{{ clusterid }}.{{ dns_domain }}-hostsgfs"
changed_when: "\
touchfiles.diff is defined \
and \
( \
( touchfiles.diff.before.state == 'absent' and touchfiles.diff.after.state == 'touch' ) \
or \
( touchfiles.diff.before.state == 'file' and touchfiles.diff.after.state == 'absent' ) \
)"