Skip to content

Commit 9fb349f

Browse files
committed
Testo 2 - post-review changes
1 parent edb40bf commit 9fb349f

File tree

3 files changed

+44
-41
lines changed

3 files changed

+44
-41
lines changed

.github/workflows/overcloud-host-image-build.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -185,28 +185,19 @@ jobs:
185185
cat src/kayobe-config/terraform/host-image-builder/id_rsa.pub >> ~/.ssh/authorized_keys
186186
cp src/kayobe-config/terraform/host-image-builder/id_rsa* ~/.ssh/
187187
188-
- name: Update inventory
189-
run: |
190-
cat > src/kayobe-config/etc/kayobe/environments/ci-builder/inventory/hosts << EOF
191-
[seed]
192-
builder
193-
EOF
194-
195188
- name: Bootstrap the control host
196189
run: |
197190
source venvs/kayobe/bin/activate &&
198191
source src/kayobe-config/kayobe-env --environment ci-builder &&
199192
kayobe control host bootstrap
200193
201194
- name: Configure the seed host (Builder VM)
202-
continue-on-error: true
203195
run: |
204196
source venvs/kayobe/bin/activate &&
205197
source src/kayobe-config/kayobe-env --environment ci-builder &&
206198
kayobe seed host configure -e seed_bootstrap_user=rocky --skip-tags network
207199
208200
- name: Install dependencies
209-
continue-on-error: true
210201
run: |
211202
source venvs/kayobe/bin/activate &&
212203
source src/kayobe-config/kayobe-env --environment ci-builder &&
@@ -216,7 +207,6 @@ jobs:
216207
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
217208

218209
- name: Create bifrost_httpboot Docker volume
219-
continue-on-error: true
220210
run: |
221211
source venvs/kayobe/bin/activate &&
222212
source src/kayobe-config/kayobe-env --environment ci-builder &&
Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# This playbook is desinged to be used by the overcloud-host-image-build.yml
2+
# This playbook is designed to be used by the overcloud-host-image-build.yml
33
# GitHub workflow to upload newly-built images to a development cloud for
44
# testing and use in CI.
55
- name: Upload an OS image to Glance
@@ -8,35 +8,47 @@
88
local_image_path: "/opt/kayobe/images/overcloud-{{ os_distribution }}-{{ os_release }}/overcloud-{{ os_distribution }}-{{ os_release }}.qcow2"
99
image_name: "overcloud-{{ os_distribution }}-{{ os_release }}"
1010
tasks:
11-
- name: Write out clouds.yml
12-
copy:
13-
content: "{{ lookup('ansible.builtin.env', 'CLOUDS_YAML') }}"
14-
dest: clouds.yaml
15-
mode: 0664
11+
- block:
12+
- name: Write out clouds.yaml
13+
copy:
14+
content: "{{ lookup('ansible.builtin.env', 'CLOUDS_YAML') }}"
15+
dest: clouds.yaml
16+
mode: 0600
1617

17-
- name: Write out secure.yml
18-
no_log: true
19-
vars:
20-
- os_secrets:
21-
clouds:
22-
openstack:
23-
auth:
24-
application_credential_id: "{{ lookup('ansible.builtin.env', 'OS_APPLICATION_CREDENTIAL_ID') }}"
25-
application_credential_secret: "{{ lookup('ansible.builtin.env', 'OS_APPLICATION_CREDENTIAL_SECRET') }}"
26-
copy:
27-
content: "{{ os_secrets | to_nice_yaml }}"
28-
dest: secure.yaml
29-
mode: 0664
18+
- name: Write out secure.yaml
19+
no_log: true
20+
vars:
21+
os_secrets:
22+
clouds:
23+
openstack:
24+
auth:
25+
application_credential_id: "{{ lookup('ansible.builtin.env', 'OS_APPLICATION_CREDENTIAL_ID') }}"
26+
application_credential_secret: "{{ lookup('ansible.builtin.env', 'OS_APPLICATION_CREDENTIAL_SECRET') }}"
27+
copy:
28+
content: "{{ os_secrets | to_nice_yaml }}"
29+
dest: secure.yaml
30+
mode: 0600
3031

31-
- name: Ensure dependencies are installed
32-
pip:
33-
name: openstacksdk
32+
- name: Ensure dependencies are installed
33+
pip:
34+
name: openstacksdk
3435

35-
- name: Upload an image to Glance
36-
openstack.cloud.image:
37-
cloud: openstack
38-
name: "{{ image_name }}"
39-
container_format: bare
40-
disk_format: qcow2
41-
state: present
42-
filename: "{{ local_image_path }}"
36+
- name: Upload an image to Glance
37+
openstack.cloud.image:
38+
cloud: openstack
39+
name: "{{ image_name }}"
40+
container_format: bare
41+
disk_format: qcow2
42+
state: present
43+
filename: "{{ local_image_path }}"
44+
45+
always:
46+
- name: Remove clouds.yaml
47+
file:
48+
path: clouds.yaml
49+
state: absent
50+
51+
- name: Remove secure.yaml
52+
file:
53+
path: secure.yaml
54+
state: absent
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# A 'seed' host used for building images.
22
[seed]
3-
localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python3
3+
# localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python3
4+
builder

0 commit comments

Comments
 (0)