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: Id26b3f254e68f0707c6d8b23b501868213b11224 Related-Bug: https://github.com/ansible/ansible/issues/17687
This commit is contained in:
parent
ab6f6697ad
commit
79aec1112c
|
@ -29,13 +29,15 @@
|
|||
- include: zaqar_post_install.yml
|
||||
|
||||
- include: zaqar_service_setup.yml
|
||||
when: >
|
||||
inventory_hostname == groups['zaqar_all'][0]
|
||||
static: no
|
||||
when: inventory_hostname == groups['zaqar_all'][0]
|
||||
|
||||
- include: zaqar_apache.yml
|
||||
static: no
|
||||
when: zaqar_install_apache | bool
|
||||
|
||||
- include: zaqar_nginx.yml
|
||||
static: no
|
||||
when: zaqar_install_nginx | bool
|
||||
|
||||
- name: Flush handlers
|
||||
|
|
|
@ -12,9 +12,10 @@
|
|||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- include: install-apt.yml
|
||||
when:
|
||||
- ansible_pkg_mgr == 'apt'
|
||||
static: no
|
||||
when: ansible_pkg_mgr == 'apt'
|
||||
tags:
|
||||
- install-apt
|
||||
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
src: https://git.openstack.org/openstack/openstack-ansible-pip_install
|
||||
scm: git
|
||||
version: master
|
||||
- name: openstack_hosts
|
||||
src: https://git.openstack.org/openstack/openstack-ansible-openstack_hosts
|
||||
scm: git
|
||||
version: master
|
||||
- name: lxc_hosts
|
||||
src: https://git.openstack.org/openstack/openstack-ansible-lxc_hosts
|
||||
scm: git
|
||||
|
|
Loading…
Reference in New Issue