diff options
author | clarkzjw <[email protected]> | 2023-01-13 11:42:54 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2023-01-13 11:42:54 -0800 |
commit | 54e5783394a2bff2b785b63a28ba44436c97d51d (patch) | |
tree | dc95d3ea50a7c89d97050dd3de82e88531c37b74 | |
parent | 60c803f86b923c65372013defe4f66c3d01c58cd (diff) | |
download | homelab-54e5783394a2bff2b785b63a28ba44436c97d51d.tar.gz |
config: add zfs on linux
-rw-r--r-- | clarkzjw.ca/config/atlas/ansible.cfg | 14 | ||||
-rw-r--r-- | clarkzjw.ca/config/atlas/inventory/atlas.yaml | 1 | ||||
-rw-r--r-- | clarkzjw.ca/config/atlas/requirements.yaml | 6 | ||||
-rw-r--r-- | clarkzjw.ca/config/atlas/role.yaml | 3 | ||||
-rw-r--r-- | clarkzjw.ca/config/atlas/roles/debian_init/defaults/main.yaml | 0 | ||||
-rw-r--r-- | clarkzjw.ca/config/atlas/roles/debian_init/tasks/main.yaml | 58 | ||||
-rw-r--r-- | clarkzjw.ca/config/atlas/site.yaml | 3 |
7 files changed, 85 insertions, 0 deletions
diff --git a/clarkzjw.ca/config/atlas/ansible.cfg b/clarkzjw.ca/config/atlas/ansible.cfg new file mode 100644 index 0000000..9ad35f3 --- /dev/null +++ b/clarkzjw.ca/config/atlas/ansible.cfg | |||
@@ -0,0 +1,14 @@ | |||
1 | [defaults] | ||
2 | host_key_checking = True | ||
3 | transport = ssh | ||
4 | remote_user = clarkzjw | ||
5 | roles_path = roles | ||
6 | inventory = inventory | ||
7 | force_color = True | ||
8 | interpreter_python = auto_silent | ||
9 | |||
10 | [connection] | ||
11 | pipelining = True | ||
12 | |||
13 | [privilege_escalation] | ||
14 | become = True | ||
diff --git a/clarkzjw.ca/config/atlas/inventory/atlas.yaml b/clarkzjw.ca/config/atlas/inventory/atlas.yaml new file mode 100644 index 0000000..ef8830e --- /dev/null +++ b/clarkzjw.ca/config/atlas/inventory/atlas.yaml | |||
@@ -0,0 +1 @@ | |||
atlas | |||
diff --git a/clarkzjw.ca/config/atlas/requirements.yaml b/clarkzjw.ca/config/atlas/requirements.yaml new file mode 100644 index 0000000..33f6117 --- /dev/null +++ b/clarkzjw.ca/config/atlas/requirements.yaml | |||
@@ -0,0 +1,6 @@ | |||
1 | --- | ||
2 | collections: | ||
3 | - name: community.general | ||
4 | version: 4.7.0 | ||
5 | - name: ansible.posix | ||
6 | version: 1.3.0 | ||
diff --git a/clarkzjw.ca/config/atlas/role.yaml b/clarkzjw.ca/config/atlas/role.yaml new file mode 100644 index 0000000..ab3fca5 --- /dev/null +++ b/clarkzjw.ca/config/atlas/role.yaml | |||
@@ -0,0 +1,3 @@ | |||
1 | - hosts: "{{ target }}" | ||
2 | roles: | ||
3 | - role: "{{ role }}" | ||
diff --git a/clarkzjw.ca/config/atlas/roles/debian_init/defaults/main.yaml b/clarkzjw.ca/config/atlas/roles/debian_init/defaults/main.yaml new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/clarkzjw.ca/config/atlas/roles/debian_init/defaults/main.yaml | |||
diff --git a/clarkzjw.ca/config/atlas/roles/debian_init/tasks/main.yaml b/clarkzjw.ca/config/atlas/roles/debian_init/tasks/main.yaml new file mode 100644 index 0000000..0eefdef --- /dev/null +++ b/clarkzjw.ca/config/atlas/roles/debian_init/tasks/main.yaml | |||
@@ -0,0 +1,58 @@ | |||
1 | - name: Disable unattended-upgrades | ||
2 | systemd: | ||
3 | name: unattended-upgrades | ||
4 | state: stopped | ||
5 | enabled: false | ||
6 | |||
7 | - name: Install packages | ||
8 | apt: | ||
9 | name: | ||
10 | - apt-transport-https | ||
11 | - build-essential | ||
12 | - ca-certificates | ||
13 | - cifs-utils | ||
14 | - vnstat | ||
15 | - postfix | ||
16 | - lsb-release | ||
17 | - python3 | ||
18 | - python3-dev | ||
19 | - python3-pip | ||
20 | - unzip | ||
21 | - gnupg | ||
22 | - rsync | ||
23 | - htop | ||
24 | - curl | ||
25 | - tree | ||
26 | - zip | ||
27 | - vim | ||
28 | - zsh | ||
29 | - git | ||
30 | update_cache: true | ||
31 | |||
32 | - name: Enable bullseye-backport | ||
33 | apt_repository: | ||
34 | repo: deb https://deb.debian.org/debian {{ ansible_distribution_release | lower }}-backports main contrib non-free | ||
35 | state: present | ||
36 | |||
37 | # Check https://wiki.debian.org/ZFS for additional information | ||
38 | - name: Install ZFS | ||
39 | apt: | ||
40 | name: | ||
41 | - linux-headers-amd64 | ||
42 | - zfsutils-linux | ||
43 | update_cache: true | ||
44 | fail_on_autoremove: yes | ||
45 | default_release: "{{ ansible_distribution_release | lower }}-backports" | ||
46 | |||
47 | - name: Clean unneeded packages | ||
48 | apt: | ||
49 | autoremove: true | ||
50 | purge: true | ||
51 | |||
52 | - name: Remove useless packages from the cache | ||
53 | apt: | ||
54 | autoclean: yes | ||
55 | |||
56 | - name: Run the equivalent of "apt-get clean" as a separate step | ||
57 | apt: | ||
58 | clean: yes | ||
diff --git a/clarkzjw.ca/config/atlas/site.yaml b/clarkzjw.ca/config/atlas/site.yaml new file mode 100644 index 0000000..e51573e --- /dev/null +++ b/clarkzjw.ca/config/atlas/site.yaml | |||
@@ -0,0 +1,3 @@ | |||
1 | - hosts: atlas | ||
2 | roles: | ||
3 | - role: debian_init | ||