Skip to content

Commit dec9867

Browse files
author
Power Cloud Robot
authored
Merge pull request ppc64le-cloud#65 from kishen-v/permissive-selinux
Set SELinux to permissive mode to enable deployment of CNI with cri-o.
2 parents a269645 + 62a496d commit dec9867

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

roles/disable-swap-selinux/tasks/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
regexp: '^([^#].*?\sswap\s+sw\s+.*)$'
99
replace: '# \1'
1010

11-
- name: Disable SELinux
12-
shell: |
13-
setenforce 0
14-
sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config
11+
- name: Set SELinux to permissive mode
12+
ansible.posix.selinux:
13+
state: permissive
14+
policy: targeted

roles/install-k8s/tasks/main.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,9 @@
66
command: ethtool --offload {{ ansible_default_ipv4['interface'] }} tx-checksumming off
77
when: ansible_default_ipv4['interface'] is defined
88

9-
- name: Disable SWAP since kubernetes can't work with swap enabled (1/2)
10-
shell: |
11-
swapoff -a
12-
13-
- name: Disable SWAP in fstab since kubernetes can't work with swap enabled (2/2)
14-
replace:
15-
path: /etc/fstab
16-
regexp: '^([^#].*?\sswap\s+sw\s+.*)$'
17-
replace: '# \1'
9+
- name: Disable SELinux and disable SWAP in fstab
10+
include_role:
11+
name: disable-swap-selinux
1812

1913
# PowerVS has default domainname set as .power-iaas.cloud.ibm.com which is not present in the cloud
2014
- name: Remove domainname from the hostname

0 commit comments

Comments
 (0)