Skip to content

Commit

Permalink
Update truthy values to true/false only, #204 (#387)
Browse files Browse the repository at this point in the history
Co-authored-by: Techno Tim <[email protected]>
  • Loading branch information
balazshasprai and timothystewart6 authored Jan 15, 2024
1 parent 70e658c commit cddbfc8
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ rules:
max: 120
level: warning
truthy:
allowed-values: ['true', 'false', 'yes', 'no']
allowed-values: ['true', 'false']
2 changes: 1 addition & 1 deletion molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
# and security needs.
ansible.builtin.systemd:
name: firewalld
enabled: no
enabled: false
state: stopped
become: true
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
- name: Assert that the nginx welcome page is available
ansible.builtin.uri:
url: http://{{ ip | ansible.utils.ipwrap }}:{{ port_ }}/
return_content: yes
return_content: true
register: result
failed_when: "'Welcome to nginx!' not in result.content"
vars:
Expand Down
2 changes: 1 addition & 1 deletion reboot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Reboot k3s_cluster
hosts: k3s_cluster
gather_facts: yes
gather_facts: true
tasks:
- name: Reboot the nodes (and Wait upto 5 mins max)
become: true
Expand Down
4 changes: 2 additions & 2 deletions reset.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Reset k3s cluster
hosts: k3s_cluster
gather_facts: yes
gather_facts: true
roles:
- role: reset
become: true
Expand All @@ -17,7 +17,7 @@
- name: Revert changes to Proxmox cluster
hosts: proxmox
gather_facts: true
become: yes
become: true
remote_user: "{{ proxmox_lxc_ssh_user }}"
roles:
- role: reset_proxmox_lxc
Expand Down
4 changes: 2 additions & 2 deletions roles/k3s_agent/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
- name: Enable and check K3s service
systemd:
name: k3s-node
daemon_reload: yes
daemon_reload: true
state: restarted
enabled: yes
enabled: true
6 changes: 3 additions & 3 deletions roles/k3s_server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@
- name: Enable and check K3s service
systemd:
name: k3s
daemon_reload: yes
daemon_reload: true
state: restarted
enabled: yes
enabled: true

- name: Wait for node-token
wait_for:
Expand Down Expand Up @@ -110,7 +110,7 @@
copy:
src: /etc/rancher/k3s/k3s.yaml
dest: "{{ ansible_user_dir }}/.kube/config"
remote_src: yes
remote_src: true
owner: "{{ ansible_user_id }}"
mode: "u=rw,g=,o="

Expand Down
8 changes: 4 additions & 4 deletions roles/prereq/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@
name: net.ipv4.ip_forward
value: "1"
state: present
reload: yes
reload: true
tags: sysctl

- name: Enable IPv6 forwarding
ansible.posix.sysctl:
name: net.ipv6.conf.all.forwarding
value: "1"
state: present
reload: yes
reload: true
tags: sysctl

- name: Enable IPv6 router advertisements
ansible.posix.sysctl:
name: net.ipv6.conf.all.accept_ra
value: "2"
state: present
reload: yes
reload: true
tags: sysctl

- name: Add br_netfilter to /etc/modules-load.d/
Expand All @@ -51,7 +51,7 @@
name: "{{ item }}"
value: "1"
state: present
reload: yes
reload: true
when: ansible_os_family == "RedHat"
loop:
- net.bridge.bridge-nf-call-iptables
Expand Down
2 changes: 1 addition & 1 deletion roles/raspberrypi/tasks/setup/Rocky.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: Enable cgroup via boot commandline if not already enabled for Rocky
lineinfile:
path: /boot/cmdline.txt
backrefs: yes
backrefs: true
regexp: '^((?!.*\bcgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\b).*)$'
line: '\1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory'
notify: reboot
Expand Down
2 changes: 1 addition & 1 deletion roles/raspberrypi/tasks/setup/Ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: Enable cgroup via boot commandline if not already enabled for Ubuntu on a Raspberry Pi
lineinfile:
path: /boot/firmware/cmdline.txt
backrefs: yes
backrefs: true
regexp: '^((?!.*\bcgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\b).*)$'
line: '\1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory'
notify: reboot
Expand Down
4 changes: 2 additions & 2 deletions roles/reset/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
systemd:
name: "{{ item }}"
state: stopped
enabled: no
enabled: false
failed_when: false
with_items:
- k3s
Expand Down Expand Up @@ -57,7 +57,7 @@

- name: Reload daemon_reload
systemd:
daemon_reload: yes
daemon_reload: true

- name: Remove tmp directory used for manifests
file:
Expand Down
4 changes: 2 additions & 2 deletions site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
- name: Prepare Proxmox cluster
hosts: proxmox
gather_facts: true
become: yes
become: true
environment: "{{ proxy_env | default({}) }}"
roles:
- role: proxmox_lxc
when: proxmox_lxc_configure

- name: Prepare k3s nodes
hosts: k3s_cluster
gather_facts: yes
gather_facts: true
environment: "{{ proxy_env | default({}) }}"
roles:
- role: lxc
Expand Down

0 comments on commit cddbfc8

Please sign in to comment.