Compare commits
1 Commits
main
...
1-add-bash
Author | SHA1 | Date | |
---|---|---|---|
3c890bca5d |
24
tasks/main.yml
Normal file
24
tasks/main.yml
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
|
||||
- name: 'Stat {{ ''{{'' }} configroot {{ ''}}'' }}'
|
||||
tags:
|
||||
- 'testing'
|
||||
register: configroot_stat
|
||||
ansible.builtin.stat:
|
||||
path: {{ configroot }}
|
||||
|
||||
|
||||
|
||||
- name: 'Print {{ ''{{'' }} configroot {{ ''}}'' }} stat result'
|
||||
tags:
|
||||
- 'testing'
|
||||
when: '(configroot_stat.stat.exists is defined and configroot_stat.stat.exists)'
|
||||
ansible.builtin.debug:
|
||||
msg: 'Location {{ ''{{'' }} configroot {{ ''}}'' }} (''{{ configroot }}'') is {% if not configroot_stat.stat.exists %}not {% endif %}writable{% if not configroot_stat.stat.exists %}, ending play prematurely ...{% endif %}'
|
||||
|
||||
|
||||
|
||||
- meta: end_play
|
||||
tags:
|
||||
- 'testing'
|
||||
when: '(configroot_stat.stat.exists is defined and not configroot_stat.stat.exists)'
|
Loading…
x
Reference in New Issue
Block a user