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 27 additions and 28 deletions
......@@ -26,4 +26,3 @@ rules:
octal-values:
forbid-implicit-octal: true # yamllint defaults to false
forbid-explicit-octal: true # yamllint defaults to false
truthy: disable
---
- name: Generate Azure inventory
hosts: localhost
gather_facts: False
gather_facts: false
roles:
- generate-inventory
---
- name: Generate Azure inventory
hosts: localhost
gather_facts: False
gather_facts: false
roles:
- generate-inventory_2
---
- name: Generate Azure templates
hosts: localhost
gather_facts: False
gather_facts: false
roles:
- generate-templates
---
- name: Create nodes as docker containers
hosts: localhost
gather_facts: False
gather_facts: false
roles:
- { role: dind-host }
......
......@@ -15,7 +15,7 @@ docker_storage_options: -s overlay2 --storage-opt overlay2.override_kernel_check
dns_mode: coredns
deploy_netchecker: True
deploy_netchecker: true
netcheck_agent_image_repo: quay.io/l23network/k8s-netchecker-agent
netcheck_server_image_repo: quay.io/l23network/k8s-netchecker-server
netcheck_agent_image_tag: v1.0
......
......@@ -14,7 +14,7 @@
src: "/bin/true"
dest: "{{ item }}"
state: link
force: yes
force: true
with_items:
# DIND box may have swap enable, don't bother
- /sbin/swapoff
......@@ -58,7 +58,7 @@
name: "{{ distro_user }}"
uid: 1000
# groups: sudo
append: yes
append: true
- name: Allow password-less sudo to "{{ distro_user }}"
copy:
......
......@@ -19,7 +19,7 @@
state: started
hostname: "{{ item }}"
command: "{{ distro_init }}"
# recreate: yes
# recreate: true
privileged: true
tmpfs:
- /sys/module/nf_conntrack/parameters
......
---
- name: Prepare Hypervisor to later install kubespray VMs
hosts: localhost
gather_facts: False
become: yes
gather_facts: false
become: true
vars:
bootstrap_os: none
roles:
......
......@@ -11,12 +11,12 @@
- name: Install required packages
apt:
upgrade: yes
update_cache: yes
upgrade: true
update_cache: true
cache_valid_time: 3600
name: "{{ item }}"
state: present
install_recommends: no
install_recommends: false
with_items:
- dnsutils
- ntp
......
......@@ -30,7 +30,7 @@
value: 1
sysctl_file: "{{ sysctl_file_path }}"
state: present
reload: yes
reload: true
- name: Set bridge-nf-call-{arptables,iptables} to 0
ansible.posix.sysctl:
......@@ -38,7 +38,7 @@
state: present
value: 0
sysctl_file: "{{ sysctl_file_path }}"
reload: yes
reload: true
with_items:
- net.bridge.bridge-nf-call-arptables
- net.bridge.bridge-nf-call-ip6tables
......
......@@ -21,7 +21,7 @@ glusterfs_default_release: ""
You can specify a `default_release` for apt on Debian/Ubuntu by overriding this variable. This is helpful if you need a different package or version for the main GlusterFS packages (e.g. GlusterFS 3.5.x instead of 3.2.x with the `wheezy-backports` default release on Debian Wheezy).
```yaml
glusterfs_ppa_use: yes
glusterfs_ppa_use: true
glusterfs_ppa_version: "3.5"
```
......
---
# For Ubuntu.
glusterfs_default_release: ""
glusterfs_ppa_use: yes
glusterfs_ppa_use: true
glusterfs_ppa_version: "4.1"
# Gluster configuration.
......
......@@ -3,7 +3,7 @@
apt_repository:
repo: 'ppa:gluster/glusterfs-{{ glusterfs_ppa_version }}'
state: present
update_cache: yes
update_cache: true
register: glusterfs_ppa_added
when: glusterfs_ppa_use
......
---
# For Ubuntu.
glusterfs_default_release: ""
glusterfs_ppa_use: yes
glusterfs_ppa_use: true
glusterfs_ppa_version: "3.12"
# Gluster configuration.
......
......@@ -43,7 +43,7 @@
service:
name: "{{ glusterfs_daemon }}"
state: started
enabled: yes
enabled: true
- name: Ensure Gluster brick and mount directories exist.
file:
......@@ -62,7 +62,7 @@
replicas: "{{ groups['gfs-cluster'] | length }}"
cluster: "{% for item in groups['gfs-cluster'] -%}{{ hostvars[item]['ip'] | default(hostvars[item].ansible_default_ipv4['address']) }}{% if not loop.last %},{% endif %}{%- endfor %}"
host: "{{ inventory_hostname }}"
force: yes
force: true
run_once: true
when: groups['gfs-cluster'] | length > 1
......@@ -73,7 +73,7 @@
brick: "{{ gluster_brick_dir }}"
cluster: "{% for item in groups['gfs-cluster'] -%}{{ hostvars[item]['ip'] | default(hostvars[item].ansible_default_ipv4['address']) }}{% if not loop.last %},{% endif %}{%- endfor %}"
host: "{{ inventory_hostname }}"
force: yes
force: true
run_once: true
when: groups['gfs-cluster'] | length <= 1
......
......@@ -3,7 +3,7 @@
apt_repository:
repo: 'ppa:gluster/glusterfs-{{ glusterfs_ppa_version }}'
state: present
update_cache: yes
update_cache: true
register: glusterfs_ppa_added
when: glusterfs_ppa_use
......
......@@ -6,6 +6,6 @@
- name: Teardown disks in heketi
hosts: heketi-node
become: yes
become: true
roles:
- { role: tear-down-disks }
---
- name: Collect container images for offline deployment
hosts: localhost
become: no
become: false
roles:
# Just load default variables from roles.
......
......@@ -10,7 +10,7 @@
systemd_service:
name: firewalld
state: stopped
enabled: no
enabled: false
when:
"'firewalld.service' in services and services['firewalld.service'].status != 'not-found'"
......@@ -18,6 +18,6 @@
systemd_service:
name: ufw
state: stopped
enabled: no
enabled: false
when:
"'ufw.service' in services and services['ufw.service'].status != 'not-found'"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment