Skip to content

Commit 2fe35cf

Browse files
authored
Merge pull request #92 from stackhpc/upstream/master-2025-10-06
Synchronise master with upstream
2 parents 9d708b0 + 88f9b33 commit 2fe35cf

File tree

3 files changed

+61
-0
lines changed

3 files changed

+61
-0
lines changed

playbooks/roles/bifrost-ironic-install/defaults/main.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,33 @@ update_ipa: "{{ update_repos }}"
108108
# Use the DIB dynamic-login element to insert the SSH key
109109
ipa_add_ssh_key: false
110110

111+
# Username for Digest, Basic or WSSE authentication. Default is unset, in which
112+
# case the parameter is omitted.
113+
ipa_download_url_username:
114+
# Password for Digest, Basic or WSSE authentication. Default is unset, in which
115+
# case the parameter is omitted.
116+
ipa_download_url_password:
117+
# Force sending the Basic authentication header upon initial request. Useful if
118+
# the remote endpoint does not respond with HTTP 401 to the initial
119+
# unauthenticated request. Must be a boolean. Default is unset, in which case
120+
# the parameter is omitted.
121+
ipa_download_force_basic_auth:
122+
# List of header names that will not be sent on subsequent redirected requests.
123+
# Set to ['Authorization'] if being redirected from an authenticated endpoint
124+
# to an unauthenticated endpoint. Default is unset, in which case the parameter
125+
# is omitted.
126+
ipa_download_unredirected_headers:
127+
128+
# Can be overridden if ramdisk and kernel require different authentication.
129+
ipa_kernel_download_url_username: "{{ ipa_download_url_username }}"
130+
ipa_kernel_download_url_password: "{{ ipa_download_url_password }}"
131+
ipa_kernel_download_force_basic_auth: "{{ ipa_download_force_basic_auth }}"
132+
ipa_kernel_download_unredirected_headers: "{{ ipa_download_unredirected_headers }}"
133+
ipa_ramdisk_download_url_username: "{{ ipa_download_url_username }}"
134+
ipa_ramdisk_download_url_password: "{{ ipa_download_url_password }}"
135+
ipa_ramdisk_download_force_basic_auth: "{{ ipa_download_force_basic_auth }}"
136+
ipa_ramdisk_download_unredirected_headers: "{{ ipa_download_unredirected_headers }}"
137+
111138
# Deployment image distribution, for selecting a default upstream image. Valid
112139
# options are "cirros", "centos", "rocky", "ubuntu". Default is "cirros".
113140
upstream_deploy_image_distribution: "cirros"
@@ -142,6 +169,10 @@ deploy_image_sources:
142169
image: "https://dl.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud.latest.x86_64.qcow2"
143170
checksum: "https://dl.rockylinux.org/pub/rocky/9/images/x86_64/CHECKSUM"
144171
checksum_algorithm: "sha256"
172+
"10":
173+
image: "https://dl.rockylinux.org/pub/rocky/10/images/x86_64/Rocky-10-GenericCloud-Base.latest.x86_64.qcow2"
174+
checksum: "https://dl.rockylinux.org/pub/rocky/10/images/x86_64/CHECKSUM"
175+
checksum_algorithm: "sha256"
145176
centos:
146177
9-stream:
147178
image: "https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-latest.x86_64.qcow2"

playbooks/roles/bifrost-ironic-install/tasks/download_ipa_image.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
owner: ironic
3131
group: ironic
3232
mode: "0644"
33+
url_username: "{{ ipa_kernel_download_url_username or omit }}"
34+
url_password: "{{ ipa_kernel_download_url_password or omit }}"
35+
force_basic_auth: "{{ ipa_kernel_download_force_basic_auth or omit }}"
36+
unredirected_headers: "{{ ipa_kernel_download_unredirected_headers or omit }}"
3337

3438
- name: "Extract IPA kernel checksum"
3539
command: awk '/{{ ipa_kernel_upstream_url | basename }}|^[a-z0-9]+$/{print $1}' "{{ ipa_kernel }}.{{ ipa_kernel_upstream_checksum_algo }}"
@@ -52,6 +56,10 @@
5256
headers: "{{ ipa_download_headers | default(omit, true) }}"
5357
# Keep downloading it until we get a good copy
5458
force: yes
59+
url_username: "{{ ipa_kernel_download_url_username or omit }}"
60+
url_password: "{{ ipa_kernel_download_url_password or omit }}"
61+
force_basic_auth: "{{ ipa_kernel_download_force_basic_auth or omit }}"
62+
unredirected_headers: "{{ ipa_kernel_download_unredirected_headers or omit }}"
5563
register: ipa_kernel_download_done
5664
until: ipa_kernel_download_done is succeeded or
5765
(ipa_kernel_download_done is failed)
@@ -76,6 +84,10 @@
7684
owner: ironic
7785
group: ironic
7886
mode: "0644"
87+
url_username: "{{ ipa_ramdisk_download_url_username or omit }}"
88+
url_password: "{{ ipa_ramdisk_download_url_password or omit }}"
89+
force_basic_auth: "{{ ipa_ramdisk_download_force_basic_auth or omit }}"
90+
unredirected_headers: "{{ ipa_ramdisk_download_unredirected_headers or omit }}"
7991

8092
- name: "Extract IPA ramdisk checksum"
8193
command: awk '/{{ ipa_ramdisk_upstream_url | basename }}|^[a-z0-9]+$/{print $1}' "{{ ipa_ramdisk }}.{{ ipa_ramdisk_upstream_checksum_algo }}"
@@ -98,6 +110,10 @@
98110
timeout: 300
99111
# Keep downloading it until we get a good copy
100112
force: yes
113+
url_username: "{{ ipa_ramdisk_download_url_username or omit }}"
114+
url_password: "{{ ipa_ramdisk_download_url_password or omit }}"
115+
force_basic_auth: "{{ ipa_ramdisk_download_force_basic_auth or omit }}"
116+
unredirected_headers: "{{ ipa_ramdisk_download_unredirected_headers or omit }}"
101117
register: ipa_ramdisk_download_done
102118
until: ipa_ramdisk_download_done is succeeded or
103119
(ipa_ramdisk_download_done is failed and ipa_ramdisk_download_done.status_code is defined and ipa_ramdisk_download_done.status_code == 404)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
features:
3+
- |
4+
Adds variables to configure authentication parameters in the
5+
``bifrost-ironic-install`` role, where IPA images are downloaded. The new
6+
variables are ``ipa_download_url_username``, ``ipa_download_url_password``,
7+
``ipa_download_force_basic_auth`` and
8+
``ipa_download_unredirected_headers``. Ramdisk and kernel images can be
9+
separately configured using ``ipa_ramdisk``/``ipa_kernel`` prefixes, e.g.
10+
``ipa_ramdisk_download_url_username``. See documentation of the `get_url
11+
<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/get_url_module.html>`__
12+
and `uri
13+
<https://docs.ansible.com/ansible/latest/collections/ansible/builtin/uri_module.html>`__
14+
Ansible modules for more details on how to use these variables.

0 commit comments

Comments
 (0)