base: Add custom fact to detect /export directory
This commit is contained in:
parent
27496d1820
commit
06f173cba2
1 changed files with 18 additions and 0 deletions
|
@ -10,6 +10,24 @@
|
|||
- /etc/ansible
|
||||
- /etc/ansible/facts.d
|
||||
|
||||
- name: add ansible_export fact
|
||||
copy:
|
||||
dest: /etc/ansible/facts.d/export.fact
|
||||
content: |
|
||||
#!/bin/sh
|
||||
if [ -d /export ]; then
|
||||
echo "true"
|
||||
else
|
||||
echo "false"
|
||||
fi
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: reload facts
|
||||
setup:
|
||||
filter: ansible_local
|
||||
|
||||
- name: set correct hostname
|
||||
hostname:
|
||||
name: "{{ inventory_hostname }}"
|
||||
|
|
Loading…
Add table
Reference in a new issue