shell加载环境变量 (#1202)

dev3
WeiLai 2022-12-04 09:39:51 +08:00 committed by GitHub
parent 38925ccc56
commit 82c6bc595e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
# 禁用系统swap
- name: 禁用系统 swap
shell: "swapoff -a && sysctl -w vm.swappiness=0"
shell: "source /etc/profile; swapoff -a && sysctl -w vm.swappiness=0"
ignore_errors: true
- name: 删除fstab swap 相关配置
@ -42,7 +42,7 @@
template: src=95-k8s-sysctl.conf.j2 dest=/etc/sysctl.d/95-k8s-sysctl.conf
- name: 生效系统参数
shell: "sysctl -p /etc/sysctl.d/95-k8s-sysctl.conf"
shell: "source /etc/profile; sysctl -p /etc/sysctl.d/95-k8s-sysctl.conf"
ignore_errors: true
# 设置系统 ulimits