Skip to content

Commit

Permalink
Add support for Rocky, bump default install version (#238)
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Nola <[email protected]>
  • Loading branch information
dereknola authored Nov 9, 2023
1 parent e6233d9 commit 45289ba
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ def provision(vm, role, node_num)

vm.provision "ansible", run: 'once' do |ansible|
ansible.compatibility_mode = "2.0"
ansible.playbook = "playbook/debug.yml"
ansible.playbook = "playbook/site.yml"
ansible.groups = {
"server" => NODE_ROLES.grep(/^server/),
"agent" => NODE_ROLES.grep(/^agent/),
"k3s_cluster:children" => ["server", "agent"],
}
ansible.extra_vars = {
k3s_version: "v1.26.5+k3s1",
k3s_version: "v1.26.9+k3s1",
api_endpoint: "#{NETWORK_PREFIX}.100",
token: "myvagrant",
# Required to use the private network configured above
Expand Down
2 changes: 1 addition & 1 deletion inventory-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ k3s_cluster:
vars:
ansible_port: 22
ansible_user: debian
k3s_version: v1.25.5+k3s2
k3s_version: v1.26.9+k3s1
token: "mytoken" # Use ansible vault if you want to keep it secret
api_endpoint: "{{ hostvars[groups['server'][0]]['ansible_host'] | default(groups['server'][0]) }}"
extra_server_args: ""
Expand Down
10 changes: 5 additions & 5 deletions roles/prereq/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: Set SELinux to disabled state
ansible.posix.selinux:
state: disabled
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux','RedHat']
when: ansible_os_family == 'RedHat'

- name: Install Dependent Ubuntu Packages
when: ansible_distribution in ['Ubuntu']
Expand Down Expand Up @@ -30,21 +30,21 @@
content: "br_netfilter"
dest: /etc/modules-load.d/br_netfilter.conf
mode: "u=rw,g=,o="
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux', 'RedHat', 'Archlinux']
when: (ansible_os_family == 'RedHat' or ansible_distribution == 'Archlinux')

- name: Load br_netfilter
community.general.modprobe:
name: br_netfilter
state: present
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux', 'RedHat', 'Archlinux']
when: (ansible_os_family == 'RedHat' or ansible_distribution == 'Archlinux')

- name: Set bridge-nf-call-iptables (just to be sure)
ansible.posix.sysctl:
name: "{{ item }}"
value: "1"
state: present
reload: true
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux', 'RedHat', 'Archlinux']
when: (ansible_os_family == 'RedHat' or ansible_distribution == 'Archlinux')
loop:
- net.bridge.bridge-nf-call-iptables
- net.bridge.bridge-nf-call-ip6tables
Expand All @@ -57,7 +57,7 @@
insertafter: EOF
path: /etc/sudoers
validate: 'visudo -cf %s'
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux','RedHat']
when: ansible_os_family == 'RedHat'

- name: Setup alternative K3s directory
when:
Expand Down

0 comments on commit 45289ba

Please sign in to comment.