Skip to content

Commit

Permalink
Merge branch 'master' into galaxy
Browse files Browse the repository at this point in the history
  • Loading branch information
timothystewart6 committed Jan 15, 2024
2 parents d0d7026 + cddbfc8 commit c9b94a6
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 24 deletions.
3 changes: 1 addition & 2 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ rules:
max: 120
level: warning
truthy:
allowed-values: ['true', 'false', 'yes', 'no']

allowed-values: ['true', 'false']
ignore:
- galaxy.yml
2 changes: 1 addition & 1 deletion inventory/sample/group_vars/all.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
k3s_version: v1.25.12+k3s1
k3s_version: v1.25.16+k3s4
# this is the user that has ssh access to these machines
ansible_user: ansibleuser
systemd_dir: /etc/systemd/system
Expand Down
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
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ molecule==4.0.4
# molecule-vagrant
molecule-vagrant==1.0.0
# via -r requirements.in
netaddr==0.9.0
netaddr==0.10.0
# via -r requirements.in
nodeenv==1.7.0
# via pre-commit
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 c9b94a6

Please sign in to comment.