debootstrap

This commit is contained in:
BENEDEK László 2024-12-23 15:48:31 +01:00
parent 5383a9fac3
commit ca310e6c13
7 changed files with 22 additions and 7 deletions

View File

@ -52,4 +52,4 @@ instance_debootstrap:
- name: default - name: default
arch: amd64 arch: amd64
suite: bookworm suite: bookworm
extra_pkgs: "acpi-support-base,console-tools,udev,linux-image-amd64,sudo,vim,grub-pc,openssh-server" extra_pkgs: "acpi-support-base,udev,linux-image-amd64,sudo,vim,grub-pc,openssh-server"

View File

@ -1,9 +1,11 @@
[nodes] [nodes]
192.168.50.20 192.168.50.20
192.168.50.21 192.168.50.21
192.168.50.22
[master] [master]
192.168.50.20 192.168.50.20
[workers] [workers]
192.168.50.21 192.168.50.21
192.168.50.22

View File

@ -0,0 +1,6 @@
- name: Generate debootstrap configs
ansible.builtin.template:
src: etc-ganeti-instance-debootstrap-variants.j2
dest: "/etc/ganeti/instance-debootstrap/variants/{{ item.name }}.conf"
mode: "0644"
loop: "{{ instance_debootstrap }}"

View File

View File

@ -25,3 +25,7 @@
- name: Exchange keys - name: Exchange keys
ansible.builtin.include_tasks: ansible.builtin.include_tasks:
file: keys.yml file: keys.yml
- name: Configure debootstrap
ansible.builtin.include_tasks:
file: debootstrap.yml

View File

@ -0,0 +1,3 @@
ARCH={{ item.arch }}
SUITE={{ item.suite }}
EXTRA_PKGS="{{ item.extra_pkgs }}"

View File

@ -33,9 +33,9 @@
creates: /var/log/ganeti/extstorage creates: /var/log/ganeti/extstorage
register: create_log_directory_result register: create_log_directory_result
- name: Create lvm wrappers # - name: Create lvm wrappers
ansible.builtin.command: # ansible.builtin.command:
cmd: /usr/share/ganeti/extstorage/zfs/install/3-lvm-wrappers.sh # cmd: /usr/share/ganeti/extstorage/zfs/install/3-lvm-wrappers.sh
chdir: /usr/share/ganeti/extstorage/zfs/install/ # chdir: /usr/share/ganeti/extstorage/zfs/install/
register: lvm_wrappers_result # register: lvm_wrappers_result
changed_when: lvm_wrappers_result.rc == 0 # changed_when: lvm_wrappers_result.rc == 0