Compare commits
No commits in common. "be67d02be87d99eb905d14d4cdfd7f263231c029" and "aee69b212bc1969aef51d78dc04d7c6f36ae915a" have entirely different histories.
be67d02be8
...
aee69b212b
|
@ -75,7 +75,6 @@
|
|||
users:
|
||||
- rilla
|
||||
- ansible
|
||||
- btrbk
|
||||
- builder
|
||||
- gopass
|
||||
- woodpecker
|
||||
|
@ -111,14 +110,6 @@
|
|||
roles:
|
||||
- wifi
|
||||
|
||||
- name: btrbk
|
||||
hosts:
|
||||
- narwhal
|
||||
- suricata
|
||||
become: true
|
||||
roles:
|
||||
- btrbk
|
||||
|
||||
- name: caladan-specific things
|
||||
hosts: caladan
|
||||
become: true
|
||||
|
|
16
hosts.yml
16
hosts.yml
|
@ -76,49 +76,49 @@ all:
|
|||
- src: "/dev/mapper/disk0"
|
||||
path: "/mnt/btr_pool"
|
||||
fstype: "btrfs"
|
||||
opts: "subvolid=5,noatime,compress=zstd"
|
||||
opts: "subvolid=5,noatime"
|
||||
passno: "0"
|
||||
|
||||
- src: "/dev/mapper/disk0"
|
||||
path: "/var/log"
|
||||
fstype: "btrfs"
|
||||
opts: "subvol=logs,noatime,compress=zstd"
|
||||
opts: "subvol=logs,noatime"
|
||||
passno: "0"
|
||||
|
||||
- src: "/dev/mapper/disk0"
|
||||
path: "/home"
|
||||
fstype: "btrfs"
|
||||
opts: "subvol=home,noatime,compress=zstd"
|
||||
opts: "subvol=home,noatime"
|
||||
passno: "0"
|
||||
|
||||
- src: "/dev/mapper/disk0"
|
||||
path: "/opt"
|
||||
fstype: "btrfs"
|
||||
opts: "subvol=opt,noatime,compress=zstd"
|
||||
opts: "subvol=opt,noatime"
|
||||
passno: "0"
|
||||
|
||||
- src: "/dev/mapper/disk0"
|
||||
path: "/var/lib/builder/src"
|
||||
fstype: "btrfs"
|
||||
opts: "subvol=src,noatime,compress=zstd"
|
||||
opts: "subvol=src,noatime"
|
||||
passno: "0"
|
||||
|
||||
- src: "/dev/mapper/disk0"
|
||||
path: "/etc/rancher"
|
||||
fstype: "btrfs"
|
||||
opts: "subvol=rancher_config,noatime,compress=zstd"
|
||||
opts: "subvol=rancher_config,noatime"
|
||||
passno: "0"
|
||||
|
||||
- src: "/dev/mapper/disk0"
|
||||
path: "/var/lib/rancher"
|
||||
fstype: "btrfs"
|
||||
opts: "subvol=rancher_data,noatime,compress=zstd"
|
||||
opts: "subvol=rancher_data,noatime"
|
||||
passno: "0"
|
||||
|
||||
- src: "/dev/mapper/disk0"
|
||||
path: "/var/lib/containers"
|
||||
fstype: "btrfs"
|
||||
opts: "subvol=containers,noatime,compress=zstd"
|
||||
opts: "subvol=containers,noatime"
|
||||
passno: "0"
|
||||
|
||||
rpi_cfg:
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
---
|
||||
- name: install packages
|
||||
apk:
|
||||
name:
|
||||
- btrbk
|
||||
- coreutils # needed by btrbk
|
||||
- btrfs-progs
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
- name: install packages
|
||||
apt:
|
||||
name:
|
||||
- btrbk
|
||||
- btrfs-progs
|
|
@ -1,13 +0,0 @@
|
|||
---
|
||||
- name: alpine setup
|
||||
include_tasks: alpine.yml
|
||||
when: ansible_distribution == "Alpine"
|
||||
|
||||
- name: debian/ubuntu setup
|
||||
include_tasks: debian.yml
|
||||
when: ansible_distribution in ["Debian", "Ubuntu"]
|
||||
|
||||
- name: copy btrbk config
|
||||
copy:
|
||||
src: "host_files/btrbk/{{ ansible_hostname }}/btrbk.conf"
|
||||
dest: /etc/btrbk/btrbk.conf
|
|
@ -2,6 +2,8 @@
|
|||
- name: install packages
|
||||
apk:
|
||||
name:
|
||||
- btrbk
|
||||
- coreutils # needed by btrbk
|
||||
- btrfs-progs
|
||||
- cryptsetup
|
||||
- gnupg
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
---
|
||||
- name: create group 'btrbk'
|
||||
group:
|
||||
name: btrbk
|
||||
gid: 505
|
||||
|
||||
- name: create user 'btrbk'
|
||||
user:
|
||||
name: btrbk
|
||||
uid: 505
|
||||
group: btrbk
|
||||
home: /var/lib/btrbk
|
||||
password: "*" # disabled password but can be accessed with SSH
|
||||
groups:
|
||||
- wheel
|
||||
append: true
|
||||
|
||||
- name: make sure btrbk owns its home
|
||||
file:
|
||||
state: directory
|
||||
path: /var/lib/btrbk
|
||||
owner: brtrbk
|
||||
group: brtrbk
|
||||
mode: '2755'
|
||||
|
||||
- name: commit btrbk's home to lbu
|
||||
lbu:
|
||||
include:
|
||||
- /var/lib/btrbk
|
||||
exclude:
|
||||
- /var/lib/btrbk/.ash_history
|
||||
when: ansible_distribution == "Alpine" and alpine_mode in ["diskless", "data"]
|
Loading…
Reference in New Issue