Add names to include tasks

Latest ansible-lint is finding this.  It seems reasonable enough to
ensure the task is named; it's always nice to have context about what
is happening as you read the file.

Change-Id: Ia7e490aaba99da9694a6f3fdb1bca9838221b30a
This commit is contained in:
Ian Wienand 2022-10-17 13:49:47 +11:00
parent 9d8cdfaaad
commit b2ae863f50
No known key found for this signature in database
8 changed files with 28 additions and 14 deletions

View File

@ -1,16 +1,20 @@
--- ---
- include_tasks: find.yaml - name: Include find tasks
include_tasks: find.yaml
when: bindep_file is not defined when: bindep_file is not defined
- include_tasks: find-bindep.yaml - name: Include bindep tasks
include_tasks: find-bindep.yaml
when: bindep_file is defined when: bindep_file is defined
- include_tasks: install.yaml - name: Include install tasks
include_tasks: install.yaml
when: when:
- bindep_file is defined - bindep_file is defined
- bindep_command is not defined - bindep_command is not defined
- include_tasks: packages.yaml - name: Include package tasks
include_tasks: packages.yaml
loop: "{{ bindep_file is string | ternary([bindep_file], bindep_file) }}" loop: "{{ bindep_file is string | ternary([bindep_file], bindep_file) }}"
loop_control: loop_control:
loop_var: zj_bindep_file loop_var: zj_bindep_file

View File

@ -11,4 +11,5 @@
- not (use_upstream_docker | bool) - not (use_upstream_docker | bool)
notify: Assure docker service is running notify: Assure docker service is running
- include_tasks: docker-setup.yaml - name: Setup docker
include_tasks: docker-setup.yaml

View File

@ -35,4 +35,5 @@
state: present state: present
notify: Restart docker notify: Restart docker
- include_tasks: docker-setup.yaml - name: Setup docker
include_tasks: docker-setup.yaml

View File

@ -57,7 +57,8 @@
- not docker_mirror_base_url - not docker_mirror_base_url
- use_upstream_docker | bool - use_upstream_docker | bool
- include_tasks: "docker-{{ (use_upstream_docker | bool) | ternary('upstream', 'distro') }}.yaml" - name: Include tasks for docker install
include_tasks: "docker-{{ (use_upstream_docker | bool) | ternary('upstream', 'distro') }}.yaml"
- name: Install docker-compose - name: Install docker-compose
become: true become: true

View File

@ -22,7 +22,8 @@
loop_control: loop_control:
loop_var: zj_output_dir loop_var: zj_output_dir
- include_tasks: rsync.yaml - name: Include rsync tasks
include_tasks: rsync.yaml
when: zj_pod.1.pod is defined when: zj_pod.1.pod is defined
loop: "{{ openshift_pods.items()|list }}" loop: "{{ openshift_pods.items()|list }}"
loop_control: loop_control:

View File

@ -1,7 +1,8 @@
# Note (dmsimard) # Note (dmsimard)
# We explicitely declare a PATH environment variable because '/sbin' is not in # We explicitely declare a PATH environment variable because '/sbin' is not in
# PATH when using 'become: yes' on some distributions # PATH when using 'become: yes' on some distributions
- include_tasks: - name: Include common tasks
include_tasks:
file: common.yaml file: common.yaml
apply: apply:
environment: environment:
@ -10,14 +11,16 @@
inventory_hostname in groups['switch'] or inventory_hostname in groups['switch'] or
inventory_hostname in groups['peers'] inventory_hostname in groups['peers']
- include_tasks: - name: Include switch tasks
include_tasks:
file: switch.yaml file: switch.yaml
apply: apply:
environment: environment:
PATH: "{{ ansible_env.PATH }}:/sbin:/usr/sbin" PATH: "{{ ansible_env.PATH }}:/sbin:/usr/sbin"
when: inventory_hostname in groups['switch'] when: inventory_hostname in groups['switch']
- include_tasks: - name: Include peer tasks
include_tasks:
file: peer.yaml file: peer.yaml
apply: apply:
environment: environment:

View File

@ -1,5 +1,6 @@
--- ---
- include_tasks: rsync.yaml - name: Include rsync tasks
include_tasks: rsync.yaml
when: zj_pod.1.pod is defined when: zj_pod.1.pod is defined
loop: "{{ openshift_pods.items()|list }}" loop: "{{ openshift_pods.items()|list }}"
loop_control: loop_control:

View File

@ -124,11 +124,13 @@
become_user: "{{ buildset_registry_docker_user }}" become_user: "{{ buildset_registry_docker_user }}"
when: buildset_registry_docker_user is defined when: buildset_registry_docker_user is defined
block: block:
- include_tasks: user-config.yaml - name: Include user config
include_tasks: user-config.yaml
- name: Update docker user config to use buildset registry - name: Update docker user config to use buildset registry
when: buildset_registry_docker_user is not defined when: buildset_registry_docker_user is not defined
block: block:
- include_tasks: user-config.yaml - name: Include user config
include_tasks: user-config.yaml
- name: Check if cri-o is installed - name: Check if cri-o is installed
stat: stat: