Files
tripleo-quickstart-extras/roles/overcloud-scale/tasks/scale-nodes.yml
Sorin Sbarnea 8b2e5653e4 lint: fixed ansible-lint 301 rule
Change-Id: I8ce7e11cd6027b53f1112c5880a5891c778db9d4
2020-01-05 19:37:09 +00:00

46 lines
1.3 KiB
YAML

---
# Do the scale
- name: Call scale deployment script
shell: >
source {{ working_dir }}/stackrc;
set -o pipefail &&
{{ working_dir }}/scale-deployment.sh 2>&1 {{ timestamper_cmd }} >
overcloud_deployment_scale_console.log;
changed_when: true
- name: Poll heat stack-list to determine when node scale is complete
shell: >
source {{ working_dir }}/stackrc;
heat stack-list
register: heat_stack_list_result
until: heat_stack_list_result.stdout.find("COMPLETE") != -1
retries: 20
delay: 90
changed_when: false
- name: Register post-scale nova list
shell: >
source {{ working_dir }}/stackrc;
nova list
register: post_scale_nova_list
changed_when: false
- name: Display post-scale nova list
debug:
msg: "{{ post_scale_nova_list.stdout_lines }}"
when: post_scale_nova_list is defined
# Verify the scale
- name: Determine the post scale node count
shell: >
source {{ working_dir }}/stackrc;
nova list | grep {{ node_to_scale }} | cut -f2- -d':' | wc -l
register: post_scale_node_count
changed_when: false
- name: Check that post scale node count is correct
fail:
msg: "Overcloud nova list does not show expected number of {{ node_to_scale }} services"
when: post_scale_node_count.stdout|int != (final_scale_value|int)