diff --git a/tasks/general/acct_mgmt/mounts.yml b/tasks/general/acct_mgmt/mounts.yml index 13d69c3..1e79ea1 100644 --- a/tasks/general/acct_mgmt/mounts.yml +++ b/tasks/general/acct_mgmt/mounts.yml @@ -19,6 +19,17 @@ shell: "echo SUCCESS" register: sshfs_test 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 @@ -38,15 +49,13 @@ marker: '# {mark} MANAGED BY ANSIBLE | 1337 Share' state: present backup: yes - when: ansible_system == "Linux" and - (sshfs_test.failed is not defined or not sshfs_test.failed) + when: ansible_system == "Linux" and not sshfs_test.failed - name: General | Account Management | Mounts | Mount All (Linux) shell: mount -a args: warn: false - when: ansible_system == "Linux" and - (sshfs_test.failed is not defined or not sshfs_test.failed) + when: ansible_system == "Linux" and not sshfs_test.failed) # FreeBSD has to do this via root cron job, fstab is unhappy @@ -59,8 +68,7 @@ - name: General | Account Management | Mounts | Remount 1337 (FreeBSD) shell: "{{ sshfs_leet_cmd }}" - when: ansible_system == "FreeBSD" and - (sshfs_test.failed is not defined or not sshfs_test.failed) + when: ansible_system == "FreeBSD" and not sshfs_test.failed # Ensure correct cron jobs and other downstream dependencies are done properly.