Define install_method default when hosts resolution depend on it
In some playbooks we try to fetch openstack_service_setup_host based on
install_method variable. However, if variable is not defined,
and it is not by default, playbooks will run against localhost,
which will result in failure.
Closes-Bug: #2031647
Change-Id: I247ce2a808076ff55347db54327a1e4913ea3006
(cherry picked from commit f05c90103c
)
This commit is contained in:
parent
ec8136cf7b
commit
49677812ae
|
@ -7,3 +7,6 @@ warn_list:
|
|||
- unnamed-task
|
||||
- no-handler
|
||||
- var-naming
|
||||
|
||||
extra_vars:
|
||||
openstack_service_setup_host: utility_all
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
hosts: "{{ openstack_service_setup_host | default('localhost') }}"
|
||||
user: root
|
||||
vars_files:
|
||||
- "defaults/{{ install_method }}_install.yml"
|
||||
- "defaults/{{ install_method | default('source') }}_install.yml"
|
||||
vars:
|
||||
ansible_python_interpreter: >-
|
||||
{{ openstack_service_setup_host_python_interpreter |
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
hosts: "{{ openstack_service_setup_host | default('localhost') }}"
|
||||
gather_facts: no
|
||||
vars_files:
|
||||
- "defaults/{{ install_method }}_install.yml"
|
||||
- "defaults/{{ install_method | default('source') }}_install.yml"
|
||||
vars:
|
||||
ansible_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default(ansible_facts['python']['executable']) }}"
|
||||
tasks:
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
hosts: "{{ openstack_service_setup_host | default('localhost') }}"
|
||||
gather_facts: "{{ osa_gather_facts | default(True) }}"
|
||||
vars_files:
|
||||
- "defaults/{{ install_method }}_install.yml"
|
||||
- "defaults/{{ install_method | default('source') }}_install.yml"
|
||||
become: yes
|
||||
tags:
|
||||
- openrc
|
||||
|
|
|
@ -145,7 +145,7 @@ elif [[ "${ACTION}" == "linters" ]]; then
|
|||
else
|
||||
ROLE_DIR="${OSA_CLONE_DIR}"
|
||||
${VENV_BIN_DIR}/ansible-lint playbooks/ --exclude /etc/ansible/roles
|
||||
ansible-playbook --syntax-check --list-tasks playbooks/setup-everything.yml
|
||||
ansible-playbook --syntax-check --list-tasks playbooks/setup-everything.yml -e openstack_service_setup_host=utility_all
|
||||
fi
|
||||
|
||||
# Run bashate
|
||||
|
|
Loading…
Reference in New Issue