Skip to content

Commit

Permalink
Merge branch 'master' into hydradx
Browse files Browse the repository at this point in the history
  • Loading branch information
hitchhooker committed Mar 9, 2024
2 parents 887cb21 + c07d4a0 commit cf26ff1
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 61 deletions.
4 changes: 2 additions & 2 deletions group_vars/cumulus.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
default_base_path: /opt/cumulus
default_client_name: polkadot-v
default_client_version: polkadot-v1.8.0
default_database: paritydb
default_database_path: '{{ default_base_path }}/chains'
default_download_base_url: https://github.com/paritytech/polkadot-sdk/releases/download/
default_download_url: '{{ default_download_base_url }}{{ default_client_name }}{{
default_download_url: '{{ default_download_base_url }}{{
default_client_version }}/polkadot-parachain'
default_group: '{{ service_users[''cumulus''] }}'
default_log_level: info
Expand Down
12 changes: 6 additions & 6 deletions group_vars/polkadot.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
default_auxiliary_binary_path: /usr/libexec
default_base_path: /opt/polkadot
default_chain_spec: '{{ default_base_path }}/paseo.json'
default_client_name: polkadot-v
default_client_version: polkadot-v1.8.0
default_database: paritydb
default_database_path: /opt/polkadot/chains
default_download_base_url: https://github.com/paritytech/polkadot-sdk/releases/download/
default_download_url: '{{ default_download_base_url }}{{ default_client_name }}{{
default_download_url: '{{ default_download_base_url }}}{{
default_client_version }}/polkadot'
default_download_url_execute: '{{ default_download_base_url }}{{ default_client_name
}}{{ default_client_version }}/polkadot-execute-worker'
default_download_url_prepare: '{{ default_download_base_url }}{{ default_client_name
}}{{ default_client_version }}/polkadot-prepare-worker'
default_download_url_execute: '{{ default_download_base_url }}{{
default_client_version }}/polkadot-execute-worker'
default_download_url_prepare: '{{ default_download_base_url }}{{

Check failure on line 13 in group_vars/polkadot.yaml

View workflow job for this annotation

GitHub Actions / build (3.10)

yaml[trailing-spaces]

Trailing spaces
default_client_version }}/polkadot-prepare-worker'
default_group: '{{ service_users[''polkadot''] }}'
default_log_level: info
default_network: polkadot
Expand Down
1 change: 0 additions & 1 deletion host_vars/bkk03.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ default_kvm_port: "20793"
default_need_routeros_port_forwarding: True
routeros_delegate_host: "bkk00"
default_need_iptables_port_forwarding: False
default_container_template: "debian-12-standard_12.0-1_amd64.tar.zst"
default_gw_device: "enp9s0"
default_resource_pool: "bkk03_resource_pool"
# storage
Expand Down
1 change: 0 additions & 1 deletion host_vars/bkk04.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ default_proxmox_port: "20814"
default_need_routeros_port_forwarding: True
routeros_delegate_host: "bkk00"
default_need_iptables_port_forwarding: False
default_container_template: "debian-12-standard_12.0-1_amd64.tar.zst"
default_gw_device: "enp10s0"
default_storage: "tank04lvm"
default_resource_pool: "bkk04_resource_pool"
Expand Down
4 changes: 4 additions & 0 deletions roles/proxmox_debian_installation/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
become: True
become_user: root
when: firmware_check.stdout | length > 0
ignore_errors: yes

- name: Check if any PVE kernel is installed
ansible.builtin.command:
Expand Down Expand Up @@ -69,13 +70,16 @@
autoclean: True
autoremove: False
state: present
ignore_errors: yes

- name: Remove Debian default kernel
ansible.builtin.apt:
pkg:
- linux-image-amd64
- "linux-image-6.1*"
state: absent
register: apt_result
ignore_errors: yes

- name: Remove os-prober
ansible.builtin.apt:
Expand Down
68 changes: 17 additions & 51 deletions roles/setup_kernel_modules/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,81 +5,47 @@
register: zfs_module_check
ignore_errors: True
changed_when: False
when: "'zfs' in kernel_modules"

- name: Ensure /etc/apt/sources.list.d directory exists
ansible.builtin.file:
path: /etc/apt/sources.list.d
state: directory
mode: '0755'
become: True
become_user: root
when: zfs_module_check.rc != 0 and zfs_module_check is defined
when: zfs_module_check.rc != 0

- name: Ensure bookworm-backports.list file exists
ansible.builtin.file:
path: "/etc/apt/sources.list.d/bookworm-backports.list"
state: touch
owner: root
group: root
mode: '0644'
when: zfs_module_check.rc != 0 and zfs_module_check is defined

- name: Add bookworm-backports repo for ZFS
- name: Add stable-backports repo for ZFS
ansible.builtin.lineinfile:
path: "/etc/apt/sources.list.d/bookworm-backports.list"
line: "{{ item }}"
state: present
path: "/etc/apt/sources.list.d/stable-backports.list"
line: "deb http://deb.debian.org/debian {{ ansible_distribution_release }}-backports main contrib"
create: yes
owner: root
group: root
mode: '0644'
loop:
- "deb http://deb.debian.org/debian bookworm-backports main contrib"
- "deb-src http://deb.debian.org/debian bookworm-backports main contrib"
when: zfs_module_check.rc != 0 and zfs_module_check is defined

- name: Setup apt preferences for ZFS
ansible.builtin.copy:
dest: "/etc/apt/preferences.d/90_zfs"
content: |
Package: src:zfs-linux
Pin: release n=bookworm-backports
Pin-Priority: 990
owner: root
group: root
mode: '0644'
when: zfs_module_check.rc != 0 and zfs_module_check is defined
when: zfs_module_check.rc != 0

- name: Update apt cache
ansible.builtin.apt:
update_cache: yes
when: zfs_module_check.rc != 0 and zfs_module_check is defined
when: zfs_module_check.rc != 0

- name: Install required packages for ZFS
- name: Install ZFS utilities from stable-backports
ansible.builtin.apt:
name:
- dpkg-dev
- "linux-headers-{{ ansible_kernel }}"
- "linux-image-{{ ansible_kernel }}"
- zfs-dkms
- zfsutils-linux
name: zfsutils-linux
state: present
environment:
DEBIAN_FRONTEND: noninteractive
when: zfs_module_check.rc != 0 and zfs_module_check is defined
default_release: "{{ ansible_distribution_release }}-backports"
when: zfs_module_check.rc != 0

- name: Load required kernel modules
community.general.modprobe:
name: "{{ item }}"
state: present
loop: "{{ kernel_modules }}"
ansible.builtin.command: modprobe zfs
when: zfs_module_check.rc != 0

- name: Store required kernel modules to /etc/modules file
- name: Ensure zfs is added to /etc/modules
ansible.builtin.lineinfile:
path: "/etc/modules"
line: "{{ item }}"
line: "zfs"
create: yes
owner: root
group: root
mode: '0644'
state: present
loop: "{{ kernel_modules }}"
when: zfs_module_check.rc != 0
1 change: 1 addition & 0 deletions roles/setup_user_management/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
when:
- item.name in ( users_with_access | default(default_users))
- default_admin_group_name in ( ansible_facts.getent_group | default([]) )
ignore_errors: yes

- name: Refresh facts
ansible.builtin.setup:
Expand Down

0 comments on commit cf26ff1

Please sign in to comment.