Skip to content

Commit

Permalink
NFS done!
Browse files Browse the repository at this point in the history
  • Loading branch information
kism committed Sep 18, 2024
1 parent b77f59c commit eb940c6
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 3 deletions.
3 changes: 3 additions & 0 deletions roles/configure_disks/files/hosts/dpshub/perms.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#! /usr/bin/env bash

echo nothing in this script
21 changes: 19 additions & 2 deletions roles/configure_disks/tasks/01-btrfs-maintance.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
---
- name: Install the btrfsmaintenance package
- name: Install the btrfs packages
ansible.builtin.package:
name:
- btrfsmaintenance
- btrfs-progs
state: present
when: ansible_pkg_mgr != 'pacman'

- name: Install the btrfs-progs pacman
ansible.builtin.package:
name: btrfs-progs
state: present
when: ansible_pkg_mgr == 'pacman'

- name: Install btrfsmaintenance pacman
become: true
become_method: ansible.builtin.sudo
become_user: "{{ homelab_my_username }}"
kewlfft.aur.aur:
name: btrfsmaintenance
use: yay
state: present
when: ansible_pkg_mgr == 'pacman'

- name: Set config path RHEL
ansible.builtin.set_fact:
Expand All @@ -14,7 +31,7 @@
- name: Set config path APT
ansible.builtin.set_fact:
btrfsmaintenance_config_path: /etc/default/btrfsmaintenance
when: ansible_pkg_mgr == 'apt'
when: ansible_pkg_mgr == 'apt' or ansible_pkg_mgr == 'pacman'

- name: Copy config for BTRFS
ansible.builtin.copy:
Expand Down
2 changes: 1 addition & 1 deletion roles/configure_disks/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@

- name: Copy perms script
ansible.builtin.copy:
src: files/hosts/{{ ansible_hostname }}/perms.sh
src: files/hosts/{{ inventory_hostname }}/perms.sh
dest: /root/perms.sh
mode: "0700"
11 changes: 11 additions & 0 deletions roles/configure_nfs_client/tasks/02-create-dirs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@
owner: nobody
group: nogroup
mode: "0000"
when: ansible_pkg_mgr != 'pacman'
with_dict: "{{ nfs_client_mounts }}"

- name: For each mount set the unmounted folder's permissions
ansible.builtin.file:
path: /tmp/mnt/{{ item.key }}
state: directory
owner: nobody
group: nobody
mode: "0000"
when: ansible_pkg_mgr == 'pacman'
with_dict: "{{ nfs_client_mounts }}"

- name: For the sake of output, ls -lah /tmp/mnt
Expand Down
9 changes: 9 additions & 0 deletions roles/configure_nfs_client/tasks/03-mount.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,12 @@
group: root
mode: "0755"
with_dict: "{{ nfs_client_mounts }}"

- name: Ensure everyone can get to /mnt
- name: Set permissions post-mount
ansible.builtin.file:
path: /mnt
state: directory
owner: root
group: root
mode: "0755"
1 change: 1 addition & 0 deletions roles/configure_sway/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ configure_sway_reminders_list:
- set dark theme
- imv config
- theme for pwavucontrol
- fix my uid

0 comments on commit eb940c6

Please sign in to comment.