Skip to content

Commit

Permalink
Adds kolla_ansible_venv_ansible
Browse files Browse the repository at this point in the history
This adds a variable that allows you to modify the version of ansible
installed in the kolla-ansible virtualenv. This is useful if you want
to use a customised version of ansible.

Change-Id: I319dd51ed3221826f820fbc0ae3639b89e9c82ea
(cherry picked from commit 1375517)
  • Loading branch information
jovial authored and markgoddard committed Jun 20, 2022
1 parent 6142e31 commit 969bfef
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
5 changes: 5 additions & 0 deletions ansible/roles/kolla-ansible/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ kolla_ansible_venv_python: python3
# Extra requirements to install inside the kolla-ansible virtualenv.
kolla_ansible_venv_extra_requirements: []

# Pip requirement specifier for the ansible package. NOTE: This limits the
# version of ansible used by kolla-ansible to avoid new releases from breaking
# tested code. Changes to this limit should be tested.
kolla_ansible_venv_ansible: 'ansible>=4,<6.0'

# 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:
Expand Down
5 changes: 1 addition & 4 deletions ansible/roles/kolla-ansible/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,7 @@
{% else %}
kolla-ansible=={{ kolla_openstack_release }}
{% endif %}
# Limit the version of ansible used by kolla-ansible to avoid new
# releases from breaking tested code. Changes to this limit should be
# tested.
- ansible>=2.10.0,<5.0
- "{{ kolla_ansible_venv_ansible }}"
- selinux
pip:
name: "{{ (kolla_ansible_packages + kolla_ansible_venv_extra_requirements) | select | list }}"
Expand Down
5 changes: 5 additions & 0 deletions etc/kayobe/kolla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
# Extra requirements to install inside the kolla-ansible virtualenv.
#kolla_ansible_venv_extra_requirements:

# Pip requirement specifier for the ansible package. NOTE: This limits the
# version of ansible used by kolla-ansible to avoid new releases from breaking
# tested code. Changes to this limit should be tested.
#kolla_ansible_venv_ansible:

# Path to Kolla-ansible configuration directory. Default is $KOLLA_CONFIG_PATH
# or /etc/kolla if $KOLLA_CONFIG_PATH is not set.
#kolla_config_path:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
features:
- |
Adds the ``kolla_ansible_venv_ansible`` configuration option. This allows
you to override the version of ansible installed in the kolla-ansible
virtualenv.

0 comments on commit 969bfef

Please sign in to comment.