More 1337 share work.
This commit is contained in:
parent
638ee2a746
commit
f46d2495f2
@ -16,5 +16,5 @@
|
|||||||
cups_pattern: cupsd
|
cups_pattern: cupsd
|
||||||
cups_browse: cups-browsed
|
cups_browse: cups-browsed
|
||||||
cups_browse_pattern: cups-browsed
|
cups_browse_pattern: cups-browsed
|
||||||
sshfs_leet_cmd: "sshfs ling@leet: /mnt/leet -o defaults,allow_other,_netdev"
|
sshfs_leet_cmd: "sshfs ling@leet: /mnt/leet -o allow_other,_netdev"
|
||||||
when: ansible_system == "FreeBSD"
|
when: ansible_system == "FreeBSD"
|
@ -7,33 +7,47 @@
|
|||||||
state: directory
|
state: directory
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|
||||||
# Combine these to be blockinfile again
|
|
||||||
|
# Linux uses fstab
|
||||||
- name: General | Account Management | Mounts | Create 1337 fstab Entry
|
- name: General | Account Management | Mounts | Create 1337 fstab Entry
|
||||||
lineinfile:
|
blockinfile:
|
||||||
path: /etc/fstab
|
path: /etc/fstab
|
||||||
regexp: '^ling@leet'
|
block: |
|
||||||
line: "ling@leet: /mnt/leet fuse.sshfs defaults,_netdev,allow_other,delay_connect 0 0"
|
ling@leet: /mnt/leet fuse.sshfs defaults,_netdev,allow_other,delay_connect 0 0
|
||||||
|
marker: '# {mark} MANAGED BY ANSIBLE | Leet Share'
|
||||||
state: present
|
state: present
|
||||||
backup: yes
|
backup: yes
|
||||||
when: ansible_system == "Linux"
|
when: ansible_system == "Linux"
|
||||||
|
|
||||||
|
#TODO Remove this
|
||||||
- name: General | Account Management | Mounts | Create 1337 fstab Comment
|
- name: General | Account Management | Mounts | Create 1337 fstab Comment
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/fstab
|
path: /etc/fstab
|
||||||
regexp: '^# MANAGED BY ANSIBLE | Leet Share'
|
regexp: '^# MANAGED BY ANSIBLE | Leet Share'
|
||||||
line: '# MANAGED BY ANSIBLE | Leet Share'
|
line: '# MANAGED BY ANSIBLE | Leet Share'
|
||||||
state: present
|
state: absent
|
||||||
insertbefore: '^ling@leet'
|
insertbefore: '^ling@leet'
|
||||||
when: ansible_system == "Linux"
|
when: ansible_system == "Linux"
|
||||||
|
|
||||||
- name: General | Account Management | Mounts | Mount All
|
#TODO Remove this
|
||||||
|
- name: General | Account Management | Mounts | Create 1337 fstab Entry
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/fstab
|
||||||
|
regexp: '^ling@leet'
|
||||||
|
line: "ling@leet: /mnt/leet fuse.sshfs defaults,_netdev,allow_other,delay_connect 0 0"
|
||||||
|
state: absent
|
||||||
|
backup: yes
|
||||||
|
when: ansible_system == "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"
|
when: ansible_system == "Linux"
|
||||||
|
|
||||||
|
|
||||||
# FreeBSD has to do this via root cron job, fstab is unhappy
|
# FreeBSD has to do this via root cron job, fstab is unhappy
|
||||||
- name: General | Cron | Root | Create SSHFS Job
|
- name: General | Cron | Root | Create SSHFS Job (FreeBSD)
|
||||||
cron:
|
cron:
|
||||||
user: root
|
user: root
|
||||||
name: "1337 SSHFS"
|
name: "1337 SSHFS"
|
||||||
@ -42,3 +56,14 @@
|
|||||||
state: present
|
state: present
|
||||||
disabled: no
|
disabled: no
|
||||||
when: ansible_system == "FreeBSD"
|
when: ansible_system == "FreeBSD"
|
||||||
|
|
||||||
|
- name: General | Cron | Root | Unmount SSHFS (FreeBSD)
|
||||||
|
shell: umount -f /mnt/leet
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
when: ansible_system == "FreeBSD"
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
|
- name: General | Cron | Root | Mount SSHFS (FreeBSD)
|
||||||
|
shell: "{{ sshfs_leet_cmd }}"
|
||||||
|
when: ansible_system == "FreeBSD"
|
Loading…
x
Reference in New Issue
Block a user