Skip to content

Commit

Permalink
Add SAN role and hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-c committed Oct 19, 2023
1 parent 04621a9 commit 4470073
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hosts.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ scyther
scizor
rpi3 docker_install_compose=false

[san]
dodrio

[gui]
steelix
scyther
Expand Down
5 changes: 5 additions & 0 deletions local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
roles:
- stream_host

- name: Install roles for SAN hosts
hosts: san
roles:
- san

- name: Install roles for GUI hosts
hosts: gui
roles:
Expand Down
4 changes: 4 additions & 0 deletions roles/san/handlers/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
- name: Update package lists
ansible.builtin.apt:
update_cache: yes
26 changes: 26 additions & 0 deletions roles/san/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
- name: Install required packages
ansible.builtin.apt:
name: "{{ packages }}"
vars:
packages:
- software-properties-common

- name: Add non-free sources
ansible.builtin.command: apt-add-repository contrib
register: add_component_result
notify:
- Update package lists
changed_when: '"component enabled" in add_component_result.stdout'

- name: Flush all notified handlers
ansible.builtin.meta: flush_handlers

- name: Install ZFS packages
ansible.builtin.apt:
name: "{{ packages }}"
vars:
packages:
- linux-headers-amd64
- zfs-dkms
- zfsutils-linux

0 comments on commit 4470073

Please sign in to comment.