From 6906bf49c87dcb654c974e4731b3427667b0ae80 Mon Sep 17 00:00:00 2001 From: Nacho Silla Date: Thu, 6 Jul 2023 15:15:10 +0200 Subject: [PATCH 01/12] debugging "Get KVM BMC username password combinations" --- roles/setup_sushy_tools/tasks/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/setup_sushy_tools/tasks/main.yml b/roles/setup_sushy_tools/tasks/main.yml index 488301c7..f14cd1df 100644 --- a/roles/setup_sushy_tools/tasks/main.yml +++ b/roles/setup_sushy_tools/tasks/main.yml @@ -52,7 +52,8 @@ }}" when: hostvars[item]['vendor'] | lower == 'kvm' loop: "{{ groups['nodes'] }}" - no_log: true +# DO NOT MERGE +# no_log: true - name: Generate htpasswd entry command: htpasswd -bBn {{ item.user }} {{ item.password }} From 2df89a57442401c197a060da27481f97b7af1120 Mon Sep 17 00:00:00 2001 From: Nacho Silla Date: Fri, 7 Jul 2023 10:32:44 +0200 Subject: [PATCH 02/12] debugging "Get KVM BMC username password combinations" --- roles/setup_sushy_tools/tasks/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roles/setup_sushy_tools/tasks/main.yml b/roles/setup_sushy_tools/tasks/main.yml index f14cd1df..2498fa21 100644 --- a/roles/setup_sushy_tools/tasks/main.yml +++ b/roles/setup_sushy_tools/tasks/main.yml @@ -55,6 +55,14 @@ # DO NOT MERGE # no_log: true + - name: Debugging user_password_combinations + debug: + var: user_password_combinations + + - name: Debugging dict2items + debug: + msg: "{{ user_password_combinations | dict2items(key_name='user', value_name='password') }}" + - name: Generate htpasswd entry command: htpasswd -bBn {{ item.user }} {{ item.password }} register: htpass_entries From 7a27f3e3c7c0e892862d3a4c106853143eda9dda Mon Sep 17 00:00:00 2001 From: Nacho Silla Date: Mon, 10 Jul 2023 13:00:20 +0200 Subject: [PATCH 03/12] disabling inventory validation --- roles/setup_selfsigned_cert/meta/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/setup_selfsigned_cert/meta/main.yml b/roles/setup_selfsigned_cert/meta/main.yml index 085384d7..47ea6d4d 100644 --- a/roles/setup_selfsigned_cert/meta/main.yml +++ b/roles/setup_selfsigned_cert/meta/main.yml @@ -1,2 +1,2 @@ -dependencies: - - role: validate_inventory +#dependencies: +# - role: validate_inventory From 0e752217e8b339a80013d3fdd48d958990f1e908 Mon Sep 17 00:00:00 2001 From: Nacho Silla Date: Mon, 24 Jul 2023 16:04:25 +0200 Subject: [PATCH 04/12] Disabled ignoring boot device --- roles/setup_sushy_tools/tasks/main.yml | 11 +---------- .../templates/sushy-emulator.conf.j2 | 2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/roles/setup_sushy_tools/tasks/main.yml b/roles/setup_sushy_tools/tasks/main.yml index 2498fa21..488301c7 100644 --- a/roles/setup_sushy_tools/tasks/main.yml +++ b/roles/setup_sushy_tools/tasks/main.yml @@ -52,16 +52,7 @@ }}" when: hostvars[item]['vendor'] | lower == 'kvm' loop: "{{ groups['nodes'] }}" -# DO NOT MERGE -# no_log: true - - - name: Debugging user_password_combinations - debug: - var: user_password_combinations - - - name: Debugging dict2items - debug: - msg: "{{ user_password_combinations | dict2items(key_name='user', value_name='password') }}" + no_log: true - name: Generate htpasswd entry command: htpasswd -bBn {{ item.user }} {{ item.password }} diff --git a/roles/setup_sushy_tools/templates/sushy-emulator.conf.j2 b/roles/setup_sushy_tools/templates/sushy-emulator.conf.j2 index 7d76bd16..7d581633 100644 --- a/roles/setup_sushy_tools/templates/sushy-emulator.conf.j2 +++ b/roles/setup_sushy_tools/templates/sushy-emulator.conf.j2 @@ -43,7 +43,7 @@ SUSHY_EMULATOR_LIBVIRT_URI = u'qemu:///system' # Instruct the libvirt driver to ignore any instructions to # set the boot device. Allowing the UEFI firmware to instead # rely on the EFI Boot Manager -SUSHY_EMULATOR_IGNORE_BOOT_DEVICE = True +SUSHY_EMULATOR_IGNORE_BOOT_DEVICE = False # The map of firmware loaders dependant on the boot mode and # system architecture From d885d8ae46a539bd0bf6442a0397efa1631ae420 Mon Sep 17 00:00:00 2001 From: Nacho Silla Date: Tue, 19 Sep 2023 12:11:18 +0200 Subject: [PATCH 05/12] restored sushy-emulator.conf template --- roles/setup_sushy_tools/templates/sushy-emulator.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/setup_sushy_tools/templates/sushy-emulator.conf.j2 b/roles/setup_sushy_tools/templates/sushy-emulator.conf.j2 index 7d581633..7d76bd16 100644 --- a/roles/setup_sushy_tools/templates/sushy-emulator.conf.j2 +++ b/roles/setup_sushy_tools/templates/sushy-emulator.conf.j2 @@ -43,7 +43,7 @@ SUSHY_EMULATOR_LIBVIRT_URI = u'qemu:///system' # Instruct the libvirt driver to ignore any instructions to # set the boot device. Allowing the UEFI firmware to instead # rely on the EFI Boot Manager -SUSHY_EMULATOR_IGNORE_BOOT_DEVICE = False +SUSHY_EMULATOR_IGNORE_BOOT_DEVICE = True # The map of firmware loaders dependant on the boot mode and # system architecture From c850bc66c416deb0ca9be3818ab2f12183a7416d Mon Sep 17 00:00:00 2001 From: Nacho Silla Date: Tue, 19 Sep 2023 14:33:51 +0200 Subject: [PATCH 06/12] Making sushy emulator ignore boot device optional The "ignore boot device" parameter instructs the sushy emulator to override the default boot device, which is usually the discovery iso. By making this parameter optional, we give the user control over whether the default boot device should be used or not. --- roles/setup_sushy_tools/defaults/main.yml | 1 + roles/setup_sushy_tools/templates/sushy-emulator.conf.j2 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/setup_sushy_tools/defaults/main.yml b/roles/setup_sushy_tools/defaults/main.yml index 6f20f2b3..e93efd3b 100644 --- a/roles/setup_sushy_tools/defaults/main.yml +++ b/roles/setup_sushy_tools/defaults/main.yml @@ -27,3 +27,4 @@ secure_sushy_tools: "{{ secure | default(true) }}" sushy_fqdn: "{{ ansible_fqdn }}" is_on_rhel9: "{{ (ansible_distribution_major_version == '9' and ansible_distribution == 'RedHat') | bool }}" +sushy_ignore_boot_device: true diff --git a/roles/setup_sushy_tools/templates/sushy-emulator.conf.j2 b/roles/setup_sushy_tools/templates/sushy-emulator.conf.j2 index 7d76bd16..b70fcf07 100644 --- a/roles/setup_sushy_tools/templates/sushy-emulator.conf.j2 +++ b/roles/setup_sushy_tools/templates/sushy-emulator.conf.j2 @@ -43,7 +43,7 @@ SUSHY_EMULATOR_LIBVIRT_URI = u'qemu:///system' # Instruct the libvirt driver to ignore any instructions to # set the boot device. Allowing the UEFI firmware to instead # rely on the EFI Boot Manager -SUSHY_EMULATOR_IGNORE_BOOT_DEVICE = True +SUSHY_EMULATOR_IGNORE_BOOT_DEVICE = {{ sushy_ignore_boot_device | bool | ternary("True", "False") }} # The map of firmware loaders dependant on the boot mode and # system architecture From ab8beb4d6f722c163d7997054a68bf0a6dcba204 Mon Sep 17 00:00:00 2001 From: Nacho Silla Date: Mon, 9 Oct 2023 14:44:34 +0200 Subject: [PATCH 07/12] troublshooting missing bmc credentials --- roles/setup_sushy_tools/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/setup_sushy_tools/tasks/main.yml b/roles/setup_sushy_tools/tasks/main.yml index 488301c7..3bb17813 100644 --- a/roles/setup_sushy_tools/tasks/main.yml +++ b/roles/setup_sushy_tools/tasks/main.yml @@ -52,7 +52,7 @@ }}" when: hostvars[item]['vendor'] | lower == 'kvm' loop: "{{ groups['nodes'] }}" - no_log: true + #no_log: true - name: Generate htpasswd entry command: htpasswd -bBn {{ item.user }} {{ item.password }} From dcafcc95300837684c4bfc9ccd502efdfd6020b1 Mon Sep 17 00:00:00 2001 From: Nacho Silla Date: Thu, 19 Oct 2023 10:29:15 +0200 Subject: [PATCH 08/12] restored no logging on BMC credentials --- roles/setup_sushy_tools/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/setup_sushy_tools/tasks/main.yml b/roles/setup_sushy_tools/tasks/main.yml index 3bb17813..488301c7 100644 --- a/roles/setup_sushy_tools/tasks/main.yml +++ b/roles/setup_sushy_tools/tasks/main.yml @@ -52,7 +52,7 @@ }}" when: hostvars[item]['vendor'] | lower == 'kvm' loop: "{{ groups['nodes'] }}" - #no_log: true + no_log: true - name: Generate htpasswd entry command: htpasswd -bBn {{ item.user }} {{ item.password }} From 6de5de8f2c58354cde97deaf161056d53304af25 Mon Sep 17 00:00:00 2001 From: Nacho Silla <84012405+nsilla@users.noreply.github.com> Date: Tue, 24 Oct 2023 10:19:18 +0200 Subject: [PATCH 09/12] Update roles/setup_sushy_tools/templates/sushy-emulator.conf.j2 Co-authored-by: Michele Costa --- roles/setup_sushy_tools/templates/sushy-emulator.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/setup_sushy_tools/templates/sushy-emulator.conf.j2 b/roles/setup_sushy_tools/templates/sushy-emulator.conf.j2 index b70fcf07..63df3a27 100644 --- a/roles/setup_sushy_tools/templates/sushy-emulator.conf.j2 +++ b/roles/setup_sushy_tools/templates/sushy-emulator.conf.j2 @@ -43,7 +43,7 @@ SUSHY_EMULATOR_LIBVIRT_URI = u'qemu:///system' # Instruct the libvirt driver to ignore any instructions to # set the boot device. Allowing the UEFI firmware to instead # rely on the EFI Boot Manager -SUSHY_EMULATOR_IGNORE_BOOT_DEVICE = {{ sushy_ignore_boot_device | bool | ternary("True", "False") }} +SUSHY_EMULATOR_IGNORE_BOOT_DEVICE = {{ (sushy_ignore_boot_device | bool) | ternary("True", "False") }} # The map of firmware loaders dependant on the boot mode and # system architecture From b94b85201ace1e716cea79908c9dce8bb411f8f9 Mon Sep 17 00:00:00 2001 From: Nacho Silla Date: Tue, 24 Oct 2023 10:43:58 +0200 Subject: [PATCH 10/12] Revert "disabling inventory validation" This reverts commit 14ace08fdfd95fb27926c5661fc4bcdea16d2c93. --- roles/setup_selfsigned_cert/meta/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/setup_selfsigned_cert/meta/main.yml b/roles/setup_selfsigned_cert/meta/main.yml index 47ea6d4d..085384d7 100644 --- a/roles/setup_selfsigned_cert/meta/main.yml +++ b/roles/setup_selfsigned_cert/meta/main.yml @@ -1,2 +1,2 @@ -#dependencies: -# - role: validate_inventory +dependencies: + - role: validate_inventory From 45f4d5e0c054d418549ec5103fdd98861fd5c86a Mon Sep 17 00:00:00 2001 From: Nacho Silla Date: Tue, 7 Nov 2023 16:03:51 +0100 Subject: [PATCH 11/12] debugging "Get KVM BMC username password combinations" --- roles/setup_sushy_tools/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/setup_sushy_tools/tasks/main.yml b/roles/setup_sushy_tools/tasks/main.yml index 488301c7..3bb17813 100644 --- a/roles/setup_sushy_tools/tasks/main.yml +++ b/roles/setup_sushy_tools/tasks/main.yml @@ -52,7 +52,7 @@ }}" when: hostvars[item]['vendor'] | lower == 'kvm' loop: "{{ groups['nodes'] }}" - no_log: true + #no_log: true - name: Generate htpasswd entry command: htpasswd -bBn {{ item.user }} {{ item.password }} From ad2d3df970f22728b8830dc27b55acd7f739c56f Mon Sep 17 00:00:00 2001 From: Nacho Silla Date: Wed, 8 Nov 2023 09:58:40 +0100 Subject: [PATCH 12/12] Revert "debugging "Get KVM BMC username password combinations"" This reverts commit a364adf2aaab5269ed79671102ba171dd2e47845. --- roles/setup_sushy_tools/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/setup_sushy_tools/tasks/main.yml b/roles/setup_sushy_tools/tasks/main.yml index 3bb17813..488301c7 100644 --- a/roles/setup_sushy_tools/tasks/main.yml +++ b/roles/setup_sushy_tools/tasks/main.yml @@ -52,7 +52,7 @@ }}" when: hostvars[item]['vendor'] | lower == 'kvm' loop: "{{ groups['nodes'] }}" - #no_log: true + no_log: true - name: Generate htpasswd entry command: htpasswd -bBn {{ item.user }} {{ item.password }}