Make super sure the failed key exists.

This commit is contained in:
Hyperling 2021-02-13 05:40:46 -06:00
parent ce45100b67
commit ed521ea558

View File

@ -21,6 +21,17 @@
when: leet_drive_details.stat.exists when: leet_drive_details.stat.exists
# Make super sure that the failed key exists.
- name: General | Account Management | Mounts | Check/Set sshfs_test.failed Key
set_fact:
sshfs_test: "{{ sshfs_test | combine ({item.name : item.phone}) }}"
with_items: "{{ key: 'failed', value: false }}"
when: sshfs_test.failed is not defined
- debug:
var: sshfs_test
# Begin setting up 1337 # Begin setting up 1337
- name: General | Account Management | Mounts | Create 1337 Folder - name: General | Account Management | Mounts | Create 1337 Folder
file: file:
@ -38,15 +49,13 @@
marker: '# {mark} MANAGED BY ANSIBLE | 1337 Share' marker: '# {mark} MANAGED BY ANSIBLE | 1337 Share'
state: present state: present
backup: yes backup: yes
when: ansible_system == "Linux" and when: ansible_system == "Linux" and not sshfs_test.failed
(sshfs_test.failed is not defined or not sshfs_test.failed)
- name: General | Account Management | Mounts | Mount All (Linux) - name: General | Account Management | Mounts | Mount All (Linux)
shell: mount -a shell: mount -a
args: args:
warn: false warn: false
when: ansible_system == "Linux" and when: ansible_system == "Linux" and not sshfs_test.failed)
(sshfs_test.failed is not defined or not sshfs_test.failed)
# FreeBSD has to do this via root cron job, fstab is unhappy # FreeBSD has to do this via root cron job, fstab is unhappy
@ -59,8 +68,7 @@
- name: General | Account Management | Mounts | Remount 1337 (FreeBSD) - name: General | Account Management | Mounts | Remount 1337 (FreeBSD)
shell: "{{ sshfs_leet_cmd }}" shell: "{{ sshfs_leet_cmd }}"
when: ansible_system == "FreeBSD" and when: ansible_system == "FreeBSD" and not sshfs_test.failed
(sshfs_test.failed is not defined or not sshfs_test.failed)
# Ensure correct cron jobs and other downstream dependencies are done properly. # Ensure correct cron jobs and other downstream dependencies are done properly.