Hyperling cdfb257b21
Fixes and Enhancements (#24)
* Add TODO.

* Add note.

* Fix hang from NFS sometimes not being up.

* Remove noauto so that `mount -a` works.

* Allow Arch to use BASH.

* Add programs needed for playbook but missing from Arch Base.

* Explicit rename of old install since Github connection is unreliable. Call executable from current directory after chdir.

* Ensure shells are set up correctly on Arch.

* Begin explicitly using microcode packages on dev machines.

* Fix _ typos to -.

* Add Delta Chat.

* Fix equals typo and allow command to fail.

* Delta Chat Desktop works great, add it to Favorites.

* Add Element.

* Add Element.

* Change spot for Element.

* Add new file(s) to call in-development project.

* Remove extra comma.

* Change FreeBSD update checker to weekly.

* Use Github again for pulling updates.
2022-03-27 08:14:06 -05:00

63 lines
1.5 KiB
YAML

---
# Mount network shares.
- name: Workstation | Settings | NFS | Facts
set_fact:
media_folder: /mnt/media
mount_number: 0
- name: Workstation | Settings | NFS | Facts (Linux)
set_fact:
mount_options: defaults,_netdev
when: ansible_system == "Linux"
- name: Workstation | Settings | NFS | Facts (FreeBSD)
set_fact:
mount_options: rw
when: ansible_system == "FreeBSD"
- name: Workstation | Settings | NFS | Install (Linux)
package:
name:
- "{{ nfs }}"
state: present
when: ansible_system == "Linux"
# https://www.unixmen.com/setup-nfs-server-on-freebsd/
- name: Workstation | Settings | NFS | Install (FreeBSD)
blockinfile:
path: "{{ rc_conf }}"
marker: "# {mark} MANAGED BY ANSIBLE | NFS Components"
block: |
nfs_server_enable="YES"
nfs_server_flags="-u -t -n 4"
rpcbind_enable="YES"
mountd_flags="-r"
mountd_enable="YES"
nfs_client_enable="YES"
nfs_client_flags="-n 4"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"
create: yes
backup: yes
when: ansible_system == "FreeBSD"
- name: Workstation | Settings | NFS | Create Folders
file:
path: "{{ item }}"
state: directory
mode: '0777'
loop:
- "{{ media_folder }}"
- name: Workstation | Settings | NFS | Create Mount Instructions
blockinfile:
path: /etc/fstab
marker: "# {mark} MANAGED BY ANSIBLE | Media"
block: |
htpc:/mnt/hdd_unsafe/media {{ media_folder }} nfs {{ mount_options }} {{ mount_number }} {{ mount_number }}
backup: yes