Support configuration of a remote virtualenv for kolla-ansible

This commit is contained in:
Mark Goddard 2017-12-07 19:01:18 +00:00
parent d757f90e0b
commit 7f7d367385
5 changed files with 21 additions and 0 deletions

View File

@ -250,6 +250,10 @@ kolla_overcloud_inventory_kolla_top_level_groups:
###############################################################################
# Kolla-ansible configuration.
# Virtualenv directory where Kolla-ansible's ansible modules will execute
# remotely on the target nodes. If None, no virtualenv will be used.
kolla_ansible_target_venv: "{{ virtualenv_path ~ '/kolla-ansible' }}"
# Password to use to encrypt the kolla-ansible passwords.yml file.
kolla_ansible_vault_password: "{{ lookup('env', 'KAYOBE_VAULT_PASSWORD') | default }}"

View File

@ -15,6 +15,10 @@ kolla_ansible_source_version:
# Virtualenv directory where Kolla-ansible will be installed.
kolla_ansible_venv: "{{ ansible_env['PWD'] }}/kolla-venv"
# Virtualenv directory where Kolla-ansible's ansible modules will execute
# remotely on the target nodes. If None, no virtualenv will be used.
kolla_ansible_target_venv:
# Password to use to encrypt the passwords.yml file.
kolla_ansible_vault_password:

View File

@ -30,6 +30,11 @@
[overcloud:vars]
ansible_user=kolla
ansible_become=true
{% if kolla_ansible_target_venv is not none %}
# Execute ansible modules on the remote target hosts using a virtualenv.
ansible_python_interpreter={{ kolla_ansible_target_venv }}/bin/python
{% endif %}
{% for kolla_group, kolla_group_config in kolla_overcloud_inventory_top_level_group_map.items() %}
{% if 'groups' in kolla_group_config %}

View File

@ -7,6 +7,10 @@
[seed:vars]
ansible_user=kolla
{% if kolla_ansible_target_venv is not none %}
# Execute ansible modules on the remote target hosts using a virtualenv.
ansible_python_interpreter={{ kolla_ansible_target_venv }}/bin/python
{% endif %}
[baremetal:children]
seed

View File

@ -131,6 +131,10 @@
###############################################################################
# Kolla-ansible configuration.
# Virtualenv directory where Kolla-ansible's ansible modules will execute
# remotely on the target nodes. If None, no virtualenv will be used.
#kolla_ansible_target_venv:
# Whether TLS is enabled for the external API endpoints.
#kolla_enable_tls_external: