update to latest 2.26.0 kubespray version and add dns zones settings to coredns
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
- name: Confirm selinux deployed
|
||||
stat:
|
||||
path: /etc/selinux/config
|
||||
get_attributes: no
|
||||
get_checksum: no
|
||||
get_mime: no
|
||||
get_attributes: false
|
||||
get_checksum: false
|
||||
get_mime: false
|
||||
when:
|
||||
- ansible_os_family == "RedHat"
|
||||
- "'Amazon' not in ansible_distribution"
|
||||
@@ -27,9 +27,9 @@
|
||||
dest: /etc/gai.conf
|
||||
line: "precedence ::ffff:0:0/96 100"
|
||||
state: present
|
||||
create: yes
|
||||
backup: yes
|
||||
mode: 0644
|
||||
create: true
|
||||
backup: true
|
||||
mode: "0644"
|
||||
when:
|
||||
- disable_ipv6_dns
|
||||
- not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||
@@ -47,9 +47,9 @@
|
||||
- name: Stat sysctl file configuration
|
||||
stat:
|
||||
path: "{{ sysctl_file_path }}"
|
||||
get_attributes: no
|
||||
get_checksum: no
|
||||
get_mime: no
|
||||
get_attributes: false
|
||||
get_checksum: false
|
||||
get_mime: false
|
||||
register: sysctl_file_stat
|
||||
tags:
|
||||
- bootstrap-os
|
||||
@@ -67,7 +67,7 @@
|
||||
file:
|
||||
name: "{{ sysctl_file_path | dirname }}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
mode: "0755"
|
||||
|
||||
- name: Enable ip forwarding
|
||||
ansible.posix.sysctl:
|
||||
@@ -75,7 +75,7 @@
|
||||
name: net.ipv4.ip_forward
|
||||
value: "1"
|
||||
state: present
|
||||
reload: yes
|
||||
reload: true
|
||||
|
||||
- name: Enable ipv6 forwarding
|
||||
ansible.posix.sysctl:
|
||||
@@ -83,15 +83,15 @@
|
||||
name: net.ipv6.conf.all.forwarding
|
||||
value: "1"
|
||||
state: present
|
||||
reload: yes
|
||||
reload: true
|
||||
when: enable_dual_stack_networks | bool
|
||||
|
||||
- name: Check if we need to set fs.may_detach_mounts
|
||||
stat:
|
||||
path: /proc/sys/fs/may_detach_mounts
|
||||
get_attributes: no
|
||||
get_checksum: no
|
||||
get_mime: no
|
||||
get_attributes: false
|
||||
get_checksum: false
|
||||
get_mime: false
|
||||
register: fs_may_detach_mounts
|
||||
ignore_errors: true # noqa ignore-errors
|
||||
|
||||
@@ -101,16 +101,16 @@
|
||||
name: fs.may_detach_mounts
|
||||
value: 1
|
||||
state: present
|
||||
reload: yes
|
||||
reload: true
|
||||
when: fs_may_detach_mounts.stat.exists | d(false)
|
||||
|
||||
- name: Ensure kube-bench parameters are set
|
||||
- name: Ensure kubelet expected parameters are set
|
||||
ansible.posix.sysctl:
|
||||
sysctl_file: "{{ sysctl_file_path }}"
|
||||
name: "{{ item.name }}"
|
||||
value: "{{ item.value }}"
|
||||
state: present
|
||||
reload: yes
|
||||
reload: true
|
||||
with_items:
|
||||
- { name: kernel.keys.root_maxbytes, value: 25000000 }
|
||||
- { name: kernel.keys.root_maxkeys, value: 1000000 }
|
||||
@@ -133,12 +133,12 @@
|
||||
name: "{{ item.name }}"
|
||||
value: "{{ item.value }}"
|
||||
state: present
|
||||
reload: yes
|
||||
reload: true
|
||||
with_items: "{{ additional_sysctl }}"
|
||||
|
||||
- name: Disable fapolicyd service
|
||||
failed_when: false
|
||||
systemd:
|
||||
systemd_service:
|
||||
name: fapolicyd
|
||||
state: stopped
|
||||
enabled: false
|
||||
|
||||
Reference in New Issue
Block a user