mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2025-12-25 00:12:37 +01:00
Add support for Rocky, bump default install version (#238)
Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
4
Vagrantfile
vendored
4
Vagrantfile
vendored
@@ -19,14 +19,14 @@ def provision(vm, role, node_num)
|
|||||||
|
|
||||||
vm.provision "ansible", run: 'once' do |ansible|
|
vm.provision "ansible", run: 'once' do |ansible|
|
||||||
ansible.compatibility_mode = "2.0"
|
ansible.compatibility_mode = "2.0"
|
||||||
ansible.playbook = "playbook/debug.yml"
|
ansible.playbook = "playbook/site.yml"
|
||||||
ansible.groups = {
|
ansible.groups = {
|
||||||
"server" => NODE_ROLES.grep(/^server/),
|
"server" => NODE_ROLES.grep(/^server/),
|
||||||
"agent" => NODE_ROLES.grep(/^agent/),
|
"agent" => NODE_ROLES.grep(/^agent/),
|
||||||
"k3s_cluster:children" => ["server", "agent"],
|
"k3s_cluster:children" => ["server", "agent"],
|
||||||
}
|
}
|
||||||
ansible.extra_vars = {
|
ansible.extra_vars = {
|
||||||
k3s_version: "v1.26.5+k3s1",
|
k3s_version: "v1.26.9+k3s1",
|
||||||
api_endpoint: "#{NETWORK_PREFIX}.100",
|
api_endpoint: "#{NETWORK_PREFIX}.100",
|
||||||
token: "myvagrant",
|
token: "myvagrant",
|
||||||
# Required to use the private network configured above
|
# Required to use the private network configured above
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ k3s_cluster:
|
|||||||
vars:
|
vars:
|
||||||
ansible_port: 22
|
ansible_port: 22
|
||||||
ansible_user: debian
|
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
|
token: "mytoken" # Use ansible vault if you want to keep it secret
|
||||||
api_endpoint: "{{ hostvars[groups['server'][0]]['ansible_host'] | default(groups['server'][0]) }}"
|
api_endpoint: "{{ hostvars[groups['server'][0]]['ansible_host'] | default(groups['server'][0]) }}"
|
||||||
extra_server_args: ""
|
extra_server_args: ""
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
- name: Set SELinux to disabled state
|
- name: Set SELinux to disabled state
|
||||||
ansible.posix.selinux:
|
ansible.posix.selinux:
|
||||||
state: disabled
|
state: disabled
|
||||||
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux','RedHat']
|
when: ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
- name: Install Dependent Ubuntu Packages
|
- name: Install Dependent Ubuntu Packages
|
||||||
when: ansible_distribution in ['Ubuntu']
|
when: ansible_distribution in ['Ubuntu']
|
||||||
@@ -30,13 +30,13 @@
|
|||||||
content: "br_netfilter"
|
content: "br_netfilter"
|
||||||
dest: /etc/modules-load.d/br_netfilter.conf
|
dest: /etc/modules-load.d/br_netfilter.conf
|
||||||
mode: "u=rw,g=,o="
|
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
|
- name: Load br_netfilter
|
||||||
community.general.modprobe:
|
community.general.modprobe:
|
||||||
name: br_netfilter
|
name: br_netfilter
|
||||||
state: present
|
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)
|
- name: Set bridge-nf-call-iptables (just to be sure)
|
||||||
ansible.posix.sysctl:
|
ansible.posix.sysctl:
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
value: "1"
|
value: "1"
|
||||||
state: present
|
state: present
|
||||||
reload: true
|
reload: true
|
||||||
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux', 'RedHat', 'Archlinux']
|
when: (ansible_os_family == 'RedHat' or ansible_distribution == 'Archlinux')
|
||||||
loop:
|
loop:
|
||||||
- net.bridge.bridge-nf-call-iptables
|
- net.bridge.bridge-nf-call-iptables
|
||||||
- net.bridge.bridge-nf-call-ip6tables
|
- net.bridge.bridge-nf-call-ip6tables
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
insertafter: EOF
|
insertafter: EOF
|
||||||
path: /etc/sudoers
|
path: /etc/sudoers
|
||||||
validate: 'visudo -cf %s'
|
validate: 'visudo -cf %s'
|
||||||
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux','RedHat']
|
when: ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
- name: Setup alternative K3s directory
|
- name: Setup alternative K3s directory
|
||||||
when:
|
when:
|
||||||
|
|||||||
Reference in New Issue
Block a user