Skip to content

Commit

Permalink
Set dell hosts boot order to director
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeshP524 committed Jul 19, 2023
1 parent 0221e7f commit 7727920
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
3 changes: 2 additions & 1 deletion group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ controller_count: 3
#compute_count: 1
ceph_node_count: 0
set_boot_order: true
#specify undercloud host when using scaleout.yml
#specify undercloud hostname and password when using scaleout.yml
#undercloud_hostname:
#undercloud_password:
alias:
#lab specific vars
lab_url: "http://quads.alias.bos.scalelab.redhat.com"
Expand Down
30 changes: 30 additions & 0 deletions scaleout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
ansible_host: "{{ undercloud_hostname }}"
ansible_user: "stack"
ansible_connection: "ssh"
ansible_ssh_pass: "{{ undercloud_password }}"

- hosts: undercloud
vars:
Expand Down Expand Up @@ -59,6 +60,24 @@
lab_vars: "{{ (lab_name == 'scale') | ternary(scale, alias) }}"
when: lab_name in ['scale', 'alias']

- block:
- name: clear existing dell-hosts file
shell: echo "" > {{ playbook_dir }}/badfish/dell-hosts

- name: prepare dell hosts for badfish
shell: echo "mgmt-{{ item[1].stdout }}" >> {{ playbook_dir }}/badfish/dell-hosts
when: vendors is defined and item[0] == "dell"
with_together:
- "{{ vendors }}"
- "{{ host_list.results }}"

- name: set boot order to director
include_tasks: tasks/set_boot_order_director.yml
vars:
chassis_password: "{{ stack_data.nodes[0].pm_password }}"
when: lab_name in ['scale', 'alias'] and set_boot_order == true
delegate_to: localhost

- name: set machine count
set_fact:
total_machine_count: {}
Expand Down Expand Up @@ -105,6 +124,17 @@
- name: delete instrospect failed nodes
include_tasks: tasks/delete_introspection_failed_nodes.yml

# when automated cleaning is enabled, this check is needed
- name: wait for nodes to reach available state
shell: |
source /home/stack/stackrc
openstack baremetal node show {{ item }} -f value -c provision_state
register: node_state
until: node_state.stdout == "available"
retries: 15
delay: 120
loop: "{{ manageable_nodes.stdout_lines | default([]) }}"

# keep track of count for each machine type after
# deleting introspect failed nodes.
- block:
Expand Down

0 comments on commit 7727920

Please sign in to comment.