Skip to content
Snippets Groups Projects
Unverified Commit 9a7b021e authored by Vlad Korolev's avatar Vlad Korolev Committed by GitHub
Browse files

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

Consistent boolean values in ansible playbooks
parent 5c5421e4
No related branches found
No related tags found
No related merge requests found
Showing
with 43 additions and 43 deletions
...@@ -87,9 +87,9 @@ ...@@ -87,9 +87,9 @@
- name: Check presence of fastestmirror.conf - name: Check presence of fastestmirror.conf
stat: stat:
path: /etc/yum/pluginconf.d/fastestmirror.conf path: /etc/yum/pluginconf.d/fastestmirror.conf
get_attributes: no get_attributes: false
get_checksum: no get_checksum: false
get_mime: no get_mime: false
register: fastestmirror register: fastestmirror
# the fastestmirror plugin can actually slow down Ansible deployments # the fastestmirror plugin can actually slow down Ansible deployments
......
--- ---
is_fedora_coreos: True is_fedora_coreos: true
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
- name: Containerd-common | check if fedora coreos - name: Containerd-common | check if fedora coreos
stat: stat:
path: /run/ostree-booted path: /run/ostree-booted
get_attributes: no get_attributes: false
get_checksum: no get_checksum: false
get_mime: no get_mime: false
register: ostree register: ostree
- name: Containerd-common | set is_ostree - name: Containerd-common | set is_ostree
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
systemd_service: systemd_service:
name: containerd name: containerd
state: restarted state: restarted
enabled: yes enabled: true
daemon-reload: yes daemon-reload: true
masked: no masked: false
listen: Restart containerd listen: Restart containerd
- name: Containerd | wait for containerd - name: Containerd | wait for containerd
......
--- ---
- name: Prepare - name: Prepare
hosts: all hosts: all
gather_facts: False gather_facts: false
become: true become: true
vars: vars:
ignore_assert_errors: true ignore_assert_errors: true
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
- name: Prepare CNI - name: Prepare CNI
hosts: all hosts: all
gather_facts: False gather_facts: false
become: true become: true
vars: vars:
ignore_assert_errors: true ignore_assert_errors: true
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
src: "{{ downloads.containerd.dest }}" src: "{{ downloads.containerd.dest }}"
dest: "{{ containerd_bin_dir }}" dest: "{{ containerd_bin_dir }}"
mode: "0755" mode: "0755"
remote_src: yes remote_src: true
extra_opts: extra_opts:
- --strip-components=1 - --strip-components=1
notify: Restart containerd notify: Restart containerd
...@@ -138,6 +138,6 @@ ...@@ -138,6 +138,6 @@
- name: Containerd | Ensure containerd is started and enabled - name: Containerd | Ensure containerd is started and enabled
systemd_service: systemd_service:
name: containerd name: containerd
daemon_reload: yes daemon_reload: true
enabled: yes enabled: true
state: started state: started
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
systemd_service: systemd_service:
name: cri-dockerd name: cri-dockerd
daemon_reload: true daemon_reload: true
masked: no masked: false
listen: Restart and enable cri-dockerd listen: Restart and enable cri-dockerd
- name: Cri-dockerd | restart docker.service - name: Cri-dockerd | restart docker.service
...@@ -27,5 +27,5 @@ ...@@ -27,5 +27,5 @@
- name: Cri-dockerd | enable cri-dockerd service - name: Cri-dockerd | enable cri-dockerd service
service: service:
name: cri-dockerd.service name: cri-dockerd.service
enabled: yes enabled: true
listen: Restart and enable cri-dockerd listen: Restart and enable cri-dockerd
...@@ -8,5 +8,5 @@ ...@@ -8,5 +8,5 @@
service: service:
name: crio name: crio
state: restarted state: restarted
enabled: yes enabled: true
listen: Restart crio listen: Restart crio
--- ---
- name: Prepare - name: Prepare
hosts: all hosts: all
gather_facts: False gather_facts: false
become: true become: true
vars: vars:
ignore_assert_errors: true ignore_assert_errors: true
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
- name: Prepare CNI - name: Prepare CNI
hosts: all hosts: all
gather_facts: False gather_facts: false
become: true become: true
vars: vars:
ignore_assert_errors: true ignore_assert_errors: true
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
- name: Cri-o | check if fedora coreos - name: Cri-o | check if fedora coreos
stat: stat:
path: /run/ostree-booted path: /run/ostree-booted
get_attributes: no get_attributes: false
get_checksum: no get_checksum: false
get_mime: no get_mime: false
register: ostree register: ostree
- name: Cri-o | set is_ostree - name: Cri-o | set is_ostree
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
lineinfile: lineinfile:
dest: /etc/yum.repos.d/amzn2-extras.repo dest: /etc/yum.repos.d/amzn2-extras.repo
line: "[amzn2extra-docker]" line: "[amzn2extra-docker]"
check_mode: yes check_mode: true
register: amzn2_extras_docker_repo register: amzn2_extras_docker_repo
when: when:
- amzn2_extras_file_stat.stat.exists - amzn2_extras_file_stat.stat.exists
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
section: amzn2extra-docker section: amzn2extra-docker
option: enabled option: enabled
value: "0" value: "0"
backup: yes backup: true
mode: "0644" mode: "0644"
when: when:
- amzn2_extras_file_stat.stat.exists - amzn2_extras_file_stat.stat.exists
......
--- ---
- name: Get crictl completion - name: Get crictl completion
command: "{{ bin_dir }}/crictl completion" command: "{{ bin_dir }}/crictl completion"
changed_when: False changed_when: false
register: cri_completion register: cri_completion
check_mode: false check_mode: false
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
state: present state: present
- name: Docker-storage-setup | install and run container-storage-setup - name: Docker-storage-setup | install and run container-storage-setup
become: yes become: true
script: | script: |
install_container_storage_setup.sh \ install_container_storage_setup.sh \
{{ docker_container_storage_setup_repository }} \ {{ docker_container_storage_setup_repository }} \
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
systemd_service: systemd_service:
name: docker name: docker
daemon_reload: true daemon_reload: true
masked: no masked: false
listen: Restart docker listen: Restart docker
- name: Docker | reload docker.socket - name: Docker | reload docker.socket
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
- name: Check if fedora coreos - name: Check if fedora coreos
stat: stat:
path: /run/ostree-booted path: /run/ostree-booted
get_attributes: no get_attributes: false
get_checksum: no get_checksum: false
get_mime: no get_mime: false
register: ostree register: ostree
- name: Set is_ostree - name: Set is_ostree
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
path: /etc/apt/sources.list path: /etc/apt/sources.list
regexp: 'buster-backports' regexp: 'buster-backports'
state: absent state: absent
backup: yes backup: true
when: when:
- ansible_os_family == 'Debian' - ansible_os_family == 'Debian'
- ansible_distribution_release == "buster" - ansible_distribution_release == "buster"
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
- name: Ensure docker service is started and enabled - name: Ensure docker service is started and enabled
service: service:
name: "{{ item }}" name: "{{ item }}"
enabled: yes enabled: true
state: started state: started
with_items: with_items:
- docker - docker
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
shell: set -o pipefail && grep "^nameserver" /etc/resolv.conf | sed -r 's/^nameserver\s*([^#\s]+)\s*(#.*)?/\1/' shell: set -o pipefail && grep "^nameserver" /etc/resolv.conf | sed -r 's/^nameserver\s*([^#\s]+)\s*(#.*)?/\1/'
args: args:
executable: /bin/bash executable: /bin/bash
changed_when: False changed_when: false
register: system_nameservers register: system_nameservers
check_mode: no check_mode: false
- name: Check system search domains - name: Check system search domains
# noqa risky-shell-pipe - if resolf.conf has no search domain, grep will exit 1 which would force us to add failed_when: false # noqa risky-shell-pipe - if resolf.conf has no search domain, grep will exit 1 which would force us to add failed_when: false
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
shell: grep "^search" /etc/resolv.conf | sed -r 's/^search\s*([^#]+)\s*(#.*)?/\1/' shell: grep "^search" /etc/resolv.conf | sed -r 's/^search\s*([^#]+)\s*(#.*)?/\1/'
args: args:
executable: /bin/bash executable: /bin/bash
changed_when: False changed_when: false
register: system_search_domains register: system_search_domains
check_mode: no check_mode: false
- name: Add system nameservers to docker options - name: Add system nameservers to docker options
set_fact: set_fact:
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
src: "{{ item.src }}" src: "{{ item.src }}"
dest: "{{ bin_dir }}/{{ item.dest }}" dest: "{{ bin_dir }}/{{ item.dest }}"
mode: "0755" mode: "0755"
remote_src: yes remote_src: true
with_items: with_items:
- { src: "{{ downloads.gvisor_runsc.dest }}", dest: "runsc" } - { src: "{{ downloads.gvisor_runsc.dest }}", dest: "runsc" }
- { src: "{{ downloads.gvisor_containerd_shim.dest }}", dest: "containerd-shim-runsc-v1" } - { src: "{{ downloads.gvisor_containerd_shim.dest }}", dest: "containerd-shim-runsc-v1" }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
mode: "0755" mode: "0755"
owner: root owner: root
group: root group: root
remote_src: yes remote_src: true
- name: Kata-containers | Create config directory - name: Kata-containers | Create config directory
file: file:
......
--- ---
- name: Get nerdctl completion - name: Get nerdctl completion
command: "{{ bin_dir }}/nerdctl completion bash" command: "{{ bin_dir }}/nerdctl completion bash"
changed_when: False changed_when: false
register: nerdctl_completion register: nerdctl_completion
check_mode: false check_mode: false
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
- name: Runc | check if fedora coreos - name: Runc | check if fedora coreos
stat: stat:
path: /run/ostree-booted path: /run/ostree-booted
get_attributes: no get_attributes: false
get_checksum: no get_checksum: false
get_mime: no get_mime: false
register: ostree register: ostree
- name: Runc | set is_ostree - name: Runc | set is_ostree
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment