Force Ansible to use dynamic includes
Ansible 2.1.1 introduces a regression in the way conditional includes are handled which results in every task in the included file being evaluated even if the condition for the include is not met. This extends the run time significantly for a deployment. This patch forces all conditional includes to be dynamic. Change-Id: I27afcb8e650dc296e06d2bfaa9e084eb406fa4ef Related-Bug: https://github.com/ansible/ansible/issues/17687
This commit is contained in:
parent
a23b07cdbb
commit
0b56e3dc7e
|
@ -14,9 +14,11 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- include: init_upstart.yml
|
- include: init_upstart.yml
|
||||||
|
static: no
|
||||||
when: pid1_name == "init"
|
when: pid1_name == "init"
|
||||||
|
|
||||||
- include: init_systemd.yml
|
- include: init_systemd.yml
|
||||||
|
static: no
|
||||||
when: pid1_name == "systemd"
|
when: pid1_name == "systemd"
|
||||||
|
|
||||||
- name: Load service
|
- name: Load service
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- include: barbican_install_apt.yml
|
- include: barbican_install_apt.yml
|
||||||
|
static: no
|
||||||
when:
|
when:
|
||||||
- ansible_pkg_mgr == 'apt'
|
- ansible_pkg_mgr == 'apt'
|
||||||
|
|
||||||
|
|
|
@ -57,14 +57,14 @@
|
||||||
- barbican-config
|
- barbican-config
|
||||||
|
|
||||||
- include: database-setup.yml
|
- include: database-setup.yml
|
||||||
when: >
|
static: no
|
||||||
inventory_hostname == groups['barbican_all'][0]
|
when: inventory_hostname == groups['barbican_all'][0]
|
||||||
tags:
|
tags:
|
||||||
- barbican-install
|
- barbican-install
|
||||||
|
|
||||||
- include: service-setup.yml
|
- include: service-setup.yml
|
||||||
when: >
|
static: no
|
||||||
inventory_hostname == groups['barbican_all'][0]
|
when: inventory_hostname == groups['barbican_all'][0]
|
||||||
tags:
|
tags:
|
||||||
- barbican-install
|
- barbican-install
|
||||||
|
|
||||||
|
|
|
@ -14,13 +14,13 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- include: create-ssl-key.yml
|
- include: create-ssl-key.yml
|
||||||
when: >
|
static: no
|
||||||
inventory_hostname == groups['barbican_all'][0]
|
when: inventory_hostname == groups['barbican_all'][0]
|
||||||
|
|
||||||
- include: store-ssl-key.yml
|
- include: store-ssl-key.yml
|
||||||
when: >
|
static: no
|
||||||
inventory_hostname == groups['barbican_all'][0]
|
when: inventory_hostname == groups['barbican_all'][0]
|
||||||
|
|
||||||
- include: distribute-ssl-key.yml
|
- include: distribute-ssl-key.yml
|
||||||
when: >
|
static: no
|
||||||
inventory_hostname != groups['barbican_all'][0]
|
when: inventory_hostname != groups['barbican_all'][0]
|
||||||
|
|
|
@ -14,8 +14,9 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- include: self-signed-ssl.yml
|
- include: self-signed-ssl.yml
|
||||||
when: >
|
static: no
|
||||||
barbican_ssl | bool and
|
when:
|
||||||
(barbican_user_ssl_cert is not defined or barbican_user_ssl_key is not defined)
|
- barbican_ssl | bool
|
||||||
|
- barbican_user_ssl_cert is not defined or barbican_user_ssl_key is not defined
|
||||||
|
|
||||||
- include: user-provided-ssl.yml
|
- include: user-provided-ssl.yml
|
||||||
|
|
Loading…
Reference in New Issue