Resolve ansible warnings and deprecated syntax

Removes Ansible deprecation warnings by adopting recommended syntax.

Change-Id: I5e9c1d0b3561abc643620eb832c6309d45cdbb47
This commit is contained in:
Sorin Sbarnea 2018-12-31 15:53:15 +00:00
parent 9c77f81b98
commit 6b6e758a1f
11 changed files with 18 additions and 18 deletions

View File

@ -3,7 +3,7 @@
# The [provision.yml](provision.yml.html) playbook is responsible for
# creating an inventory entry for our `virthost` and for creating an
# unprivileged user on that host for use by our virtual environment.
- include: provision.yml
- include_tasks: provision.yml
tags:
- provision

View File

@ -94,4 +94,4 @@ it in your extra. The example shown below would provide a fully functioning clou
your playbook to run against::
- name: Setup the cloud
include: quickstart-extras.yml
include_tasks: quickstart-extras.yml

View File

@ -1,4 +1,4 @@
---
- include: build-images.yml
- include: quickstart-extras.yml
- import_playbook: build-images.yml
- import_playbook: quickstart-extras.yml

View File

@ -33,7 +33,7 @@
# Allow the user to optionally perform a yum repo setup
# the virthost_repo_setup variable by default is set to false
- include: repo-setup-virthost.yml
- import_playbook: repo-setup-virthost.yml
when: virthost_repo_setup|bool
- name: Check if the target virthost distro is supported (RHEL or CentOS)

View File

@ -19,18 +19,18 @@
- teardown-provision
- teardown-environment
- include: teardown-provision.yml
- import_playbook: teardown-provision.yml
# The `provision.yml` playbook is responsible for
# creating an inventory entry for our `virthost` and for creating an
# unprivileged user on that host for use by our virtual environment.
- include: provision.yml
- import_playbook: provision.yml
# These teardown tasks only make sense after running provision.yml,
# because they assume they are connecting as the `stack` user rather
# than `root`.
- include: teardown-nodes.yml
- include: teardown-environment.yml
- import_playbook: teardown-nodes.yml
- import_playbook: teardown-environment.yml
# The `environment/setup` role performs any tasks that require `root`
# access on the target host.

View File

@ -31,7 +31,7 @@
tasks_from: get-dlrn-hash-newest
when: dlrn_hash_tag_newest is defined and dlrn_task_run_newest is not defined
- include: fetch.yml
- include_tasks: fetch.yml
vars:
image: "{{ item }}"
with_items: "{{ images }}"

View File

@ -63,7 +63,7 @@
with_items: "{{ overcloud_nodes }}"
when: libvirt_nodepool_vms|default("false")|bool
- include: libvirt_nodepool.yml
- include_tasks: libvirt_nodepool.yml
when: libvirt_nodepool_vms|default("false")|bool
# Create additional blockdevices for each objectstorage flavor node

View File

@ -1,3 +1,3 @@
---
- include: provision.yml
- include_tasks: provision.yml

View File

@ -3,14 +3,14 @@
fail:
msg: "The DLRN hash or tag is not recognized. The hash or tag should not contain path slashes."
when:
- not dlrn_hash_tag | match("[a-zA-Z0-9]{40}_[a-zA-Z0-9]{8}")
- not dlrn_hash_tag is match("[a-zA-Z0-9]{40}_[a-zA-Z0-9]{8}")
- dlrn_hash_tag not in known_hash_tags
- name: Check DLRN hash - passed ready hash
set_fact:
dlrn_hash: "{{ dlrn_hash_tag }}"
cacheable: true
when: dlrn_hash_tag | match("[a-zA-Z0-9]{40}_[a-zA-Z0-9]{8}")
when: dlrn_hash_tag is match("[a-zA-Z0-9]{40}_[a-zA-Z0-9]{8}")
- when: dlrn_hash_tag in known_hash_tags
block:

View File

@ -1,11 +1,11 @@
---
- include: get-dlrn-hash.yml
- include_tasks: get-dlrn-hash.yml
when: dlrn_hash_tag is defined and dlrn_task_run is not defined
- include: get-dlrn-hash-newest.yml
- include_tasks: get-dlrn-hash-newest.yml
when: dlrn_hash_tag_newest is defined and dlrn_task_run_newest is not defined
- include: create-repo-script.yml
- include_tasks: create-repo-script.yml
- include_tasks: setup_repos.yml
when: repo_run_live|bool

View File

@ -1,5 +1,5 @@
---
- name: Include VBMC setup if enabled
include: configure-vbmc.yml
include_tasks: configure-vbmc.yml
when: enable_vbmc|bool