Clean up ansible variables.
The amount of variables defined inside the defaults/main.yml was piling up. It makes sense to provide flexibility via variables, but some of the ones defined in the role didn't change and won't change during its use. This patch remove most of the '_template' variables and add the template name in the src section of the task. Remove also workload variables. Change-Id: I443865bc95590a5cffcc28d98913110238e863b6
This commit is contained in:
parent
f5351055e8
commit
e1a3cb51a1
@ -65,15 +65,6 @@ workload_disk: 5
|
||||
workload_vcpu: 1
|
||||
workload_swap: 512
|
||||
|
||||
# note that both UC upgrade and update use the same template
|
||||
undercloud_upgrade_template: undercloud_upgrade.sh.j2
|
||||
undercloud_update_template: undercloud_upgrade.sh.j2
|
||||
overcloud_upgrade_prepare_template: overcloud_upgrade_prepare.sh.j2
|
||||
overcloud_system_upgrade_template: overcloud_system_upgrade.sh.j2
|
||||
overcloud_upgrade_run_template: overcloud_upgrade_run.sh.j2
|
||||
overcloud_upgrade_converge_template: overcloud_upgrade_converge.sh.j2
|
||||
workload_launch_template: workload_launch.sh.j2
|
||||
|
||||
# upgrade scripts name:
|
||||
undercloud_upgrade_script: "{{ working_dir }}/undercloud_upgrade.sh"
|
||||
undercloud_update_script: "{{ working_dir }}/undercloud_update.sh"
|
||||
@ -84,21 +75,13 @@ overcloud_upgrade_run_script_base: "{{ working_dir }}/overcloud_upgrade_run"
|
||||
overcloud_upgrade_converge_script: "{{ working_dir }}/overcloud_upgrade_converge.sh"
|
||||
workload_launch_script: "{{ working_dir }}/workload_launch.sh"
|
||||
|
||||
# overcloud jinja template name
|
||||
overcloud_update_prepare_template: overcloud_update_prepare.sh.j2
|
||||
overcloud_update_run_template: overcloud_update_run.sh.j2
|
||||
overcloud_update_converge_template: overcloud_update_converge.sh.j2
|
||||
|
||||
# overcloud update scripts
|
||||
overcloud_update_prepare_script: "{{ working_dir }}/overcloud_update_prepare.sh"
|
||||
overcloud_update_run_script_base: "{{ working_dir }}/overcloud_update_run"
|
||||
overcloud_update_converge_script: "{{ working_dir }}/overcloud_update_converge.sh"
|
||||
|
||||
overcloud_validate_images_template: validate_docker_images_versions.sh.j2
|
||||
overcloud_validate_images_script: "{{ working_dir }}/validate_docker_images_versions.sh"
|
||||
overcloud_validate_ap_services: openstack-cinder-volume openstack-cinder-backup openstack-manila-share
|
||||
|
||||
|
||||
# container registry file for overcloud
|
||||
container_registry_file: "docker-images.yaml"
|
||||
|
||||
@ -138,8 +121,6 @@ node_reboot_timeout: 300
|
||||
l3_agent_connectivity_check: false
|
||||
l3_agent_connectivity_check_start_script: "{{ working_dir }}/l3_agent_start_ping.sh"
|
||||
l3_agent_connectivity_check_stop_script: "{{ working_dir }}/l3_agent_stop_ping.sh"
|
||||
l3_agent_connectivity_check_start_template: l3_agent_start_ping.sh.j2
|
||||
l3_agent_connectivity_check_stop_template: l3_agent_stop_ping.sh.j2
|
||||
l3_agent_failover_check: false
|
||||
|
||||
# enable web load test
|
||||
@ -163,7 +144,6 @@ need_ssh_config: true
|
||||
upgrade_prepare_extra_params: []
|
||||
|
||||
# No upgrade_init_command by default
|
||||
upgrade_init_command_template: upgrade_init_command.yaml.j2
|
||||
upgrade_init_command_dest: "{{working_dir}}/UpgradeInitCommand.yaml"
|
||||
upgrade_init_command: false
|
||||
|
||||
|
@ -2,13 +2,13 @@
|
||||
- block:
|
||||
- name: create start l3 agent connectivity check scripts
|
||||
template:
|
||||
src: "{{ l3_agent_connectivity_check_start_template }}"
|
||||
src: "l3_agent_start_ping.sh.j2"
|
||||
dest: "{{ l3_agent_connectivity_check_start_script }}"
|
||||
mode: 0775
|
||||
|
||||
- name: create stop l3 agent connectivity check scripts
|
||||
template:
|
||||
src: "{{ l3_agent_connectivity_check_stop_template }}"
|
||||
src: "l3_agent_stop_ping.sh.j2"
|
||||
dest: "{{ l3_agent_connectivity_check_stop_script }}"
|
||||
mode: 0775
|
||||
when: l3_agent_connectivity_check|bool
|
||||
|
@ -1,18 +1,18 @@
|
||||
---
|
||||
- name: create workload launch script
|
||||
template:
|
||||
src: "{{ workload_launch_template }}"
|
||||
src: "workload_launch.sh.j2"
|
||||
dest: "{{ workload_launch_script }}"
|
||||
mode: 0775
|
||||
|
||||
- name: create start l3 agent connectivity check scripts
|
||||
template:
|
||||
src: "{{ l3_agent_connectivity_check_start_template }}"
|
||||
src: "l3_agent_start_ping.sh.j2"
|
||||
dest: "{{ l3_agent_connectivity_check_start_script }}"
|
||||
mode: 0775
|
||||
|
||||
- name: create stop l3 agent connectivity check scripts
|
||||
template:
|
||||
src: "{{ l3_agent_connectivity_check_stop_template }}"
|
||||
src: "l3_agent_stop_ping.sh.j2"
|
||||
dest: "{{ l3_agent_connectivity_check_stop_script }}"
|
||||
mode: 0775
|
||||
|
@ -14,12 +14,19 @@
|
||||
- name: get auxiliary facts for major upgrades
|
||||
import_tasks: ../common/auxilary-facts.yaml
|
||||
|
||||
- name: create update workaround scripts
|
||||
- name: create undercloud update script
|
||||
template:
|
||||
src: workarounds.sh.j2
|
||||
dest: "{{ working_dir }}/{{ item }}.sh"
|
||||
src: "undercloud_upgrade.sh.j2"
|
||||
dest: "{{ undercloud_update_script }}"
|
||||
mode: 0775
|
||||
force: true
|
||||
|
||||
- name: create scripts with workarounds
|
||||
template:
|
||||
src: "update_workarounds.sh.j2"
|
||||
dest: "{{ working_dir }}/{{ item.script }}"
|
||||
mode: 0755
|
||||
force: true
|
||||
loop:
|
||||
- 'pre_overcloud_update_prepare_workarounds'
|
||||
- 'post_overcloud_update_prepare_workarounds'
|
||||
@ -37,7 +44,7 @@
|
||||
|
||||
- name: create overcloud update prepare script
|
||||
template:
|
||||
src: "{{ overcloud_update_prepare_template }}"
|
||||
src: "overcloud_update_prepare.sh.j2"
|
||||
dest: "{{ overcloud_update_prepare_script }}"
|
||||
mode: 0775
|
||||
force: true
|
||||
@ -51,7 +58,7 @@
|
||||
|
||||
- name: create overcloud update script
|
||||
template:
|
||||
src: "{{ overcloud_update_run_template }}"
|
||||
src: "overcloud_update_run.sh.j2"
|
||||
dest: "{{ overcloud_update_run_script_base }}-{{ item }}.sh"
|
||||
mode: 0775
|
||||
force: true
|
||||
@ -66,14 +73,14 @@
|
||||
|
||||
- name: create overcloud update converge script
|
||||
template:
|
||||
src: "{{ overcloud_update_converge_template }}"
|
||||
src: "overcloud_update_converge.sh.j2"
|
||||
dest: "{{ overcloud_update_converge_script }}"
|
||||
mode: 0775
|
||||
force: true
|
||||
|
||||
- name: create docker container/images validate scripts
|
||||
template:
|
||||
src: "{{ overcloud_validate_images_template }}"
|
||||
src: "validate_docker_images_versions.sh.j2"
|
||||
dest: "{{ overcloud_validate_images_script }}"
|
||||
mode: 0755
|
||||
force: true
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
- name: create workload launch script
|
||||
template:
|
||||
src: "{{ workload_launch_template }}"
|
||||
src: "workload_launch.sh.j2"
|
||||
dest: "{{ workload_launch_script }}"
|
||||
mode: 0775
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
- name: create the custom upgrade init commands
|
||||
template:
|
||||
src: "{{ upgrade_init_command_template }}"
|
||||
src: "upgrade_init_command.yaml.j2"
|
||||
dest: "{{ upgrade_init_command_dest }}"
|
||||
mode: 0775
|
||||
when: upgrade_init_command is string
|
||||
@ -72,7 +72,7 @@
|
||||
|
||||
- name: create overcloud upgrade script
|
||||
template:
|
||||
src: "{{ overcloud_upgrade_run_template }}"
|
||||
src: "overcloud_update_run.sh.j2"
|
||||
dest: "{{ overcloud_upgrade_run_script_base }}-{{ item }}.sh"
|
||||
mode: 0775
|
||||
force: true
|
||||
@ -89,7 +89,7 @@
|
||||
vars:
|
||||
old_img: "{{ working_dir }}/{{ container_registry_file }}"
|
||||
template:
|
||||
src: "{{ overcloud_upgrade_converge_template }}"
|
||||
src: "overcloud_upgrade_converge.sh.j2"
|
||||
dest: "{{ overcloud_upgrade_converge_script }}"
|
||||
mode: 0775
|
||||
force: true
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: create undercloud upgrade script
|
||||
template:
|
||||
src: "{{ undercloud_upgrade_template }}"
|
||||
src: "undercloud_upgrade.sh.j2"
|
||||
dest: "{{ undercloud_upgrade_script }}"
|
||||
mode: 0775
|
||||
force: true
|
||||
|
@ -29,7 +29,7 @@
|
||||
vars:
|
||||
old_img: "{{ working_dir }}/{{ container_registry_file }}"
|
||||
template:
|
||||
src: "{{ overcloud_upgrade_prepare_template }}"
|
||||
src: "overcloud_upgrade_prepare.sh.j2"
|
||||
dest: "{{ overcloud_upgrade_prepare_script }}"
|
||||
mode: 0775
|
||||
force: true
|
||||
|
Loading…
Reference in New Issue
Block a user