2021-02-01 05:03:27 -06:00
|
|
|
---
|
|
|
|
# Mount shares that all systems should have.
|
|
|
|
|
2021-02-02 21:28:17 -06:00
|
|
|
- name: General | Account Management | Mounts | Create 1337 Folder
|
2021-02-01 08:17:50 -06:00
|
|
|
file:
|
|
|
|
path: /mnt/leet
|
|
|
|
state: directory
|
|
|
|
mode: '0755'
|
2021-02-01 07:56:00 -06:00
|
|
|
|
2021-02-03 12:50:29 -06:00
|
|
|
# Combine these to be blockinfile again
|
2021-02-03 07:36:51 -06:00
|
|
|
- name: General | Account Management | Mounts | Create 1337 fstab Entry
|
|
|
|
lineinfile:
|
2021-02-01 05:03:27 -06:00
|
|
|
path: /etc/fstab
|
2021-02-03 07:36:51 -06:00
|
|
|
regexp: '^ling@leet'
|
|
|
|
line: "ling@leet: /mnt/leet fuse.sshfs defaults,_netdev,allow_other,delay_connect 0 0"
|
|
|
|
state: present
|
2021-02-01 05:03:27 -06:00
|
|
|
backup: yes
|
2021-02-03 12:52:08 -06:00
|
|
|
when: ansible_system == "Linux"
|
2021-02-02 21:00:06 -06:00
|
|
|
|
2021-02-03 07:36:51 -06:00
|
|
|
- name: General | Account Management | Mounts | Create 1337 fstab Comment
|
|
|
|
lineinfile:
|
|
|
|
path: /etc/fstab
|
|
|
|
regexp: '^# MANAGED BY ANSIBLE | Leet Share'
|
|
|
|
line: '# MANAGED BY ANSIBLE | Leet Share'
|
|
|
|
state: present
|
|
|
|
insertbefore: '^ling@leet'
|
2021-02-03 12:52:08 -06:00
|
|
|
when: ansible_system == "Linux"
|
2021-02-03 07:36:51 -06:00
|
|
|
|
2021-02-02 21:28:17 -06:00
|
|
|
- name: General | Account Management | Mounts | Mount All
|
2021-02-02 21:09:18 -06:00
|
|
|
shell: mount -a
|
2021-02-02 21:12:44 -06:00
|
|
|
args:
|
2021-02-02 21:10:56 -06:00
|
|
|
warn: false
|
2021-02-03 12:52:08 -06:00
|
|
|
when: ansible_system == "Linux"
|
2021-02-03 12:50:29 -06:00
|
|
|
|
2021-02-03 21:17:48 -06:00
|
|
|
# FreeBSD also has root cron job for this @reboot
|
|
|
|
- name: General | Cron | Root | Create SSHFS Job
|
|
|
|
cron:
|
|
|
|
user: root
|
|
|
|
name: "1337 SSHFS"
|
|
|
|
special_time: reboot
|
|
|
|
job: "{{ sshfs_leet_cmd }}"
|
|
|
|
state: present
|
|
|
|
disabled: no
|
|
|
|
when: ansible_system == "FreeBSD"
|