base: Refactor export mount fact

This commit is contained in:
Timo Makinen 2025-02-02 15:18:47 +00:00
parent dff8b4d72b
commit db91fe6345
2 changed files with 10 additions and 7 deletions

View file

@ -0,0 +1,9 @@
#!/bin/sh
set -eu
if mount | grep -qE "on /export" ; then
echo "true"
else
echo "false"
fi

View file

@ -33,13 +33,7 @@
- name: Add ansible_export fact - name: Add ansible_export fact
ansible.builtin.copy: ansible.builtin.copy:
dest: /etc/ansible/facts.d/export.fact dest: /etc/ansible/facts.d/export.fact
content: | src: export.fact.sh
#!/bin/sh
if [ -d /export ]; then
echo "true"
else
echo "false"
fi
mode: "0755" mode: "0755"
owner: root owner: root
group: "{{ ansible_wheel }}" group: "{{ ansible_wheel }}"