Update include

Ansible is deprecating include, replace it with
include_task/import_playbook.

Change-Id: If9e9a5ff7918ae88b39d4fa225986bd3149301f4
This commit is contained in:
Andreas Jaeger 2020-05-26 14:45:29 +02:00
parent 6bdd9def82
commit 065e75ee2f
4 changed files with 9 additions and 11 deletions

View File

@ -30,8 +30,7 @@
# If we have ephemeral storage and we don't appear to have setup swap, # If we have ephemeral storage and we don't appear to have setup swap,
# we will create a swap and move /opt to a large data partition there. # we will create a swap and move /opt to a large data partition there.
- include: ephemeral.yaml - include_tasks: ephemeral.yaml
static: no
when: when:
- ephemeral_device is defined - ephemeral_device is defined
- ansible_memory_mb['swap']['total'] | int + 10 <= configure_swap_size - ansible_memory_mb['swap']['total'] | int + 10 <= configure_swap_size
@ -39,8 +38,7 @@
# If no ephemeral device and no swap, then we will setup some swap # If no ephemeral device and no swap, then we will setup some swap
# space on the root device to ensure all hosts a consistent memory # space on the root device to ensure all hosts a consistent memory
# environment. # environment.
- include: root.yaml - include_tasks: root.yaml
static: no
when: when:
- ephemeral_device is undefined - ephemeral_device is undefined
- ansible_memory_mb['swap']['total'] | int + 10 <= configure_swap_size - ansible_memory_mb['swap']['total'] | int + 10 <= configure_swap_size

View File

@ -8,15 +8,15 @@
content: "Project: {{ zuul.project.name }} Branch: {{ zuul.branch }} Build: {{ zuul.build }} Revision: {{ zuul.ref }}" content: "Project: {{ zuul.project.name }} Branch: {{ zuul.branch }} Build: {{ zuul.build }} Revision: {{ zuul.ref }}"
- name: Process tagged build - name: Process tagged build
include: tagged.yaml include_tasks: tagged.yaml
when: "zuul.branch != 'master' and zuul.tag is defined" when: "zuul.branch != 'master' and zuul.tag is defined"
- name: Process stable branch build - name: Process stable branch build
include: stable.yaml include_tasks: stable.yaml
when: "'stable' in zuul.branch and zuul.tag is not defined" when: "'stable' in zuul.branch and zuul.tag is not defined"
- name: Process branch build - name: Process branch build
include: branch.yaml include_tasks: branch.yaml
when: "zuul.branch != 'master' and 'stable' not in zuul.branch and zuul.tag is not defined" when: "zuul.branch != 'master' and 'stable' not in zuul.branch and zuul.tag is not defined"
- name: Rearrange publish directories - name: Rearrange publish directories

View File

@ -15,13 +15,13 @@
when: "zuul.tag is defined" when: "zuul.tag is defined"
- name: Process tagged build - name: Process tagged build
include: tagged.yaml include_tasks: tagged.yaml
when: "zuul.tag is defined" when: "zuul.tag is defined"
- name: Process stable branch build - name: Process stable branch build
include: stable.yaml include_tasks: stable.yaml
when: "zuul.branch is defined and 'stable' in zuul.branch and zuul.tag is not defined" when: "zuul.branch is defined and 'stable' in zuul.branch and zuul.tag is not defined"
- name: Process branch build - name: Process branch build
include: branch.yaml include_tasks: branch.yaml
when: "zuul.branch is defined and zuul.branch != 'master' and 'stable' not in zuul.branch and zuul.tag is not defined" when: "zuul.branch is defined and zuul.branch != 'master' and 'stable' not in zuul.branch and zuul.tag is not defined"

View File

@ -3,5 +3,5 @@
# If you add new tests, also update the files section in job # If you add new tests, also update the files section in job
# extra-integration in zuul.d/jobs.yaml. # extra-integration in zuul.d/jobs.yaml.
- include: prepare-zanata-client.yaml - import_playbook: prepare-zanata-client.yaml
when: ansible_os_family == 'Debian' when: ansible_os_family == 'Debian'