Do not use ‘yes/no’ for boolean values (#11472)

Consistent boolean values in ansible playbooks
This commit is contained in:
Vlad Korolev
2024-08-28 01:30:56 -04:00
committed by GitHub
parent 5c5421e453
commit 9a7b021eb8
162 changed files with 507 additions and 508 deletions

View File

@@ -5,7 +5,7 @@
shell: "{{ image_info_command }}"
register: docker_images
changed_when: false
check_mode: no
check_mode: false
when: not download_always_pull
- name: Check_pull_required | Set pull_required if the desired image is not yet loaded

View File

@@ -26,12 +26,12 @@
- name: Download_container | Determine if image is in cache
stat:
path: "{{ image_path_cached }}"
get_attributes: no
get_checksum: no
get_mime: no
get_attributes: false
get_checksum: false
get_mime: false
delegate_to: localhost
connection: local
delegate_facts: no
delegate_facts: false
register: cache_image
changed_when: false
become: false
@@ -57,7 +57,7 @@
- name: Download_container | Download image if required
command: "{{ image_pull_command_on_localhost if download_localhost else image_pull_command }} {{ image_reponame }}"
delegate_to: "{{ download_delegate if download_run_once else inventory_hostname }}"
delegate_facts: yes
delegate_facts: true
run_once: "{{ download_run_once }}"
register: pull_task_result
until: pull_task_result is succeeded
@@ -72,7 +72,7 @@
- name: Download_container | Save and compress image
shell: "{{ image_save_command_on_localhost if download_localhost else image_save_command }}" # noqa command-instead-of-shell - image_save_command_on_localhost contains a pipe, therefore requires shell
delegate_to: "{{ download_delegate }}"
delegate_facts: no
delegate_facts: false
register: container_save_status
failed_when: container_save_status.stderr
run_once: true
@@ -99,7 +99,7 @@
dest: "{{ image_path_final }}"
use_ssh_args: true
mode: push
delegate_facts: no
delegate_facts: false
register: upload_image
failed_when: not upload_image
until: upload_image is succeeded

View File

@@ -24,13 +24,13 @@
owner: "{{ download.owner | default(omit) }}"
mode: "0755"
state: directory
recurse: yes
recurse: true
- name: Download_file | Create local cache directory
file:
path: "{{ file_path_cached | dirname }}"
state: directory
recurse: yes
recurse: true
delegate_to: localhost
connection: local
delegate_facts: false
@@ -45,7 +45,7 @@
file:
path: "{{ file_path_cached | dirname }}"
state: directory
recurse: yes
recurse: true
delegate_to: "{{ download_delegate }}"
delegate_facts: false
run_once: true

View File

@@ -5,7 +5,7 @@
dest: "{{ download.dest | dirname }}"
owner: "{{ download.owner | default(omit) }}"
mode: "{{ download.mode | default(omit) }}"
copy: no
copy: false
extra_opts: "{{ download.unarchive_extra_opts | default(omit) }}"
when:
- download.unarchive | default(false)

View File

@@ -62,7 +62,7 @@
register: docker_images
failed_when: false
changed_when: false
check_mode: no
check_mode: false
when: download_container
- name: Prep_download | Create staging directory on remote node
@@ -81,7 +81,7 @@
mode: "0755"
delegate_to: localhost
connection: local
delegate_facts: no
delegate_facts: false
run_once: true
become: false
when: