Skip to content

Commit a86d3fe

Browse files
hjensasopenshift-merge-bot[bot]
authored andcommitted
Adoption ironic hook - IPA var/lib/ironic/httpboot
For inspection we need to add the ironic-python-agent to the /var/lib/ironic/httpboot folder. Update the hook to install the package on groups - osp-controllers and osp-underclouds, and copy the file to the appropriate location.
1 parent 8ff18c6 commit a86d3fe

File tree

1 file changed

+56
-5
lines changed

1 file changed

+56
-5
lines changed

hooks/playbooks/adoption_ironic_post_oc.yml

Lines changed: 56 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,83 @@
1717
- name: OSP 17 - Ironic post overcloud
1818
hosts: "{{ cifmw_target_host | default('localhost') }}"
1919
tasks:
20-
- name: Gather ansible_user_dir from undercloud
21-
delegate_to: osp-undercloud-0
20+
- name: Gather ansible_user_dir from OSP nodes
21+
delegate_to: "{{ item }}"
2222
ansible.builtin.setup:
2323
gather_subset:
2424
- user_dir
25+
loop:
26+
- controller-0
27+
- osp-undercloud-0
28+
- osp-controller-0
29+
- osp-controller-1
30+
- osp-controller-2
2531

26-
- name: Glance images - ironic-python-agent
27-
delegate_to: osp-undercloud-0
32+
- name: Install ironic-python-agent images package
2833
block:
2934
- name: Install the ironic-python-agent images package
3035
become: true
36+
delegate_to: "{{ item }}"
3137
ansible.builtin.dnf:
3238
name: rhosp-director-images-ipa-x86_64
3339
state: present
40+
loop:
41+
- osp-undercloud-0
42+
- osp-controller-0
43+
- osp-controller-1
44+
- osp-controller-2
3445

35-
- name: Create ironic-python-agnet directory
46+
- name: Create ironic-python-agent directory
47+
delegate_to: "{{ item }}"
3648
ansible.builtin.file:
3749
state: directory
3850
path: "{{ ansible_user_dir }}/ironic-python-agent"
51+
loop:
52+
- osp-undercloud-0
53+
- osp-controller-0
54+
- osp-controller-1
55+
- osp-controller-2
3956

4057
- name: Extract ironic-python-images from tar
58+
delegate_to: "{{ item }}"
4159
ansible.builtin.unarchive:
4260
src: /usr/share/rhosp-director-images/ironic-python-agent-latest.tar
4361
dest: "{{ ansible_user_dir }}/ironic-python-agent"
4462
remote_src: true
63+
loop:
64+
- osp-undercloud-0
65+
- osp-controller-0
66+
- osp-controller-1
67+
- osp-controller-2
68+
69+
- name: Copy ironic-python-agent to /var/lib/ironic/httpboot
70+
become: true
71+
block:
72+
- name: Copy ironic-python-agent kernel
73+
delegate_to: "{{ item }}"
74+
ansible.builtin.copy:
75+
src: "{{ ansible_user_dir }}/ironic-python-agent/ironic-python-agent.kernel"
76+
dest: /var/lib/ironic/httpboot/agent.kernel
77+
remote_src: true
78+
loop:
79+
- osp-controller-0
80+
- osp-controller-1
81+
- osp-controller-2
4582

83+
- name: Copy ironic-python-agent ramdisk
84+
delegate_to: "{{ item }}"
85+
ansible.builtin.copy:
86+
src: "{{ ansible_user_dir }}/ironic-python-agent/ironic-python-agent.initramfs"
87+
dest: /var/lib/ironic/httpboot/agent.ramdisk
88+
remote_src: true
89+
loop:
90+
- osp-controller-0
91+
- osp-controller-1
92+
- osp-controller-2
93+
94+
- name: Glance images - ironic-python-agent
95+
delegate_to: osp-undercloud-0
96+
block:
4697
- name: Upload ironic-python-agent kernel to glance
4798
environment:
4899
OS_CLOUD: "{{ cifmw_adoption_osp_deploy_scenario.stacks[0].stackname }}"

0 commit comments

Comments
 (0)