69 lines
2.1 KiB
YAML
Raw Normal View History

---
# Mount shares that all systems should have.
# Test if this machine can use SSHFS
- name: General | Account Management | Mounts | Create Test Folder
file:
path: "/mnt/test"
state: directory
mode: '0755'
Add initial HUGO support, FreeBSD 13 support, and script for Ansible to hit dev branch. (#4) * Create HUGO file. * Add HUGO. * Add script for running system against development branch. * Add newline to end of file. * Comment unused blocks. * Add path of site that HUGO should host. * Newlines, comments, and HUGO path. (#2) (#3) * Create HUGO file. * Add HUGO. * Add script for running system against development branch. * Add newline to end of file. * Comment unused blocks. * Add path of site that HUGO should host. * FreeBSD is complaining about certbot not having dict object stdout. This whole playbook is supposed to be skipped though, lol. * FreeBSD 13 is still mad. Ansible 2.11.2, jinja 2.11.2 (same version number??), Python 3.8.10. * Fix root group to be existing variable. FreeBSD uses wheel. * Allow choosing Github branch dynamically. * `branch` needs to be at General level. Testing if this works... * Change other `localhost` to `everything`. * Update FreeBSD status. * Goodbye, Code-OSS on Linux! * Delete a terrible file. * Remove excess tag. * "Fix" SSHFS for FreeBSD. * Variablize FreeBSD's loading of fusefs. * Variablize /etc/rc.conf. Enable FuseFS more properly. * Add beginning ticks. * Add missing playbook. * Enable FreeBSD mount job. * Rearrange items to be more consistent with comment. * It seems FreeBSD removed the `gnome3` metapackage. Use `gnome3-lite` instead. Also add Telegram. * Python is to 3.8 now. * Expand on FreeBSD work. * Expand on FreeBSD work. * Add placeholders for Gitlab. * Add parameter for Gitlab install. * Add Gitlab playbook. * Ensure FreeBSD uses the correct Python install. * Add newline. * Fix NFS for FreeBSD workstations. * Remove unnecessary line, restricted install to Linux in playbook. * Fix mount options for FreeBSD. * Fix mount number, as well as system-specific facts. * Add placeholders for remote viewing. * Add RDP for FreeBSD. * Omg! It works! Add setting enforcement. * Always remove OSS. * Remove hosts from explicit dev testing.
2021-07-19 07:07:03 -05:00
- name: General | Account Management | Mounts | Enable SSHFS (FreeBSD)
shell: "{{ load_fusefs }}"
ignore_errors: yes
when: ansible_system == "FreeBSD"
- name: General | Account Management | Mounts | Test SSHFS
2021-02-07 15:19:33 -06:00
shell: "sshfs {{ leet_ssh }}: /mnt/test -o allow_other"
2021-02-07 08:11:28 -06:00
register: sshfs_test
ignore_errors: yes
2021-02-07 09:05:57 -06:00
2021-02-07 08:08:43 -06:00
# Begin setting up 1337
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: "{{ leet_drive }}"
2021-02-01 08:17:50 -06:00
state: directory
mode: '0755'
# Linux uses fstab
- name: General | Account Management | Mounts | Create 1337 fstab Entry
blockinfile:
path: /etc/fstab
block: |
{{ leet_ssh }}: /mnt/leet fuse.sshfs defaults,_netdev,allow_other 0 0
marker: '# {mark} MANAGED BY ANSIBLE | 1337 Share'
state: present
backup: yes
when: ansible_system == "Linux" and
(not sshfs_test.failed or leet_drive_details.stat.exists)
2021-02-06 07:00:47 -06:00
- name: General | Account Management | Mounts | Mount All (Linux)
shell: mount -a
2021-02-02 21:12:44 -06:00
args:
2021-02-02 21:10:56 -06:00
warn: false
when: ansible_system == "Linux" and
(not sshfs_test.failed or leet_drive_details.stat.exists)
2021-02-03 12:50:29 -06:00
2021-02-06 07:00:47 -06:00
# FreeBSD has to do this via root cron job, fstab is unhappy
- name: General | Account Management | Mounts | Unmount 1337 (FreeBSD)
2021-02-06 07:00:47 -06:00
shell: umount -f /mnt/leet
args:
warn: false
when: ansible_system == "FreeBSD" and
(not sshfs_test.failed or leet_drive_details.stat.exists)
2021-02-06 07:00:47 -06:00
ignore_errors: yes
- name: General | Account Management | Mounts | Remount 1337 (FreeBSD)
2021-02-06 07:00:47 -06:00
shell: "{{ sshfs_leet_cmd }}"
when: ansible_system == "FreeBSD" and
(not sshfs_test.failed or leet_drive_details.stat.exists)
# Ensure correct cron jobs and other downstream dependencies are done properly.
- name: General | Account Management | Mounts | Refresh Variable leet_drive_details
stat:
path: "{{ leet_drive }}/Temp/ansible"
register: leet_drive_details