mirror of https://github.com/easzlab/kubeasz.git
增加centos7关闭Selinux,Firewalld,swap交换内存 (#270)
parent
f25c9109f7
commit
93e041c825
|
@ -1,3 +1,29 @@
|
|||
- name: close centos7 Firewalld
|
||||
shell: systemctl stop firewalld && systemctl disable firewalld
|
||||
when:
|
||||
- ansible_distribution == "CentOS"
|
||||
- ansible_distribution_major_version == "7"
|
||||
- name: close centos7 Selinux
|
||||
lineinfile:
|
||||
path: /etc/selinux/config
|
||||
regexp: '^SELINUX='
|
||||
line: 'SELINUX=disabled'
|
||||
when:
|
||||
- ansible_distribution == "CentOS"
|
||||
- ansible_distribution_major_version == "7"
|
||||
- name: close swap system
|
||||
shell: swapoff -a && sysctl -w vm.swappiness=0
|
||||
when:
|
||||
- ansible_distribution == "CentOS"
|
||||
- ansible_distribution_major_version == "7"
|
||||
- name: delete swap configuration
|
||||
lineinfile:
|
||||
path: /etc/fstab
|
||||
regexp: 'swap'
|
||||
state: absent
|
||||
when:
|
||||
- ansible_distribution == "CentOS"
|
||||
- ansible_distribution_major_version == "7"
|
||||
- name: prepare some dirs
|
||||
file: name={{ item }} state=directory
|
||||
with_items:
|
||||
|
|
Loading…
Reference in New Issue