mirror of https://github.com/easzlab/kubeasz.git
fix 删除etcd节点hosts文件不更新
parent
be6f0034d5
commit
f0aaad4b0f
|
@ -73,7 +73,7 @@
|
|||
|
||||
# lineinfile is inadequate to delete lines between some specific line range
|
||||
- name: remove the etcd's node entry in hosts
|
||||
shell: 'sed -i "/^\[etcd/,/^\[kube_master/ {/^{{ ETCD_TO_DEL }}[^0-9]/d}" {{ base_dir }}/clusters/{{ CLUSTER }}/hosts'
|
||||
shell: 'sed -i "/^\[etcd/,/^\[kube_master/ {/^{{ ETCD_TO_DEL }}[^0-9]*$/d}" {{ base_dir }}/clusters/{{ CLUSTER }}/hosts'
|
||||
args:
|
||||
warn: false
|
||||
when: "groups['etcd']|length > 1 and ETCD_TO_DEL in groups['etcd']"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
- import_tasks: hardening.yml
|
||||
ignore_errors: true
|
||||
when: os_hardening_enabled | bool
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
name: '{{ os_packages_pam_passwdqc }}'
|
||||
state: 'present'
|
||||
update_cache: 'yes'
|
||||
ignore_errors: true
|
||||
when:
|
||||
- ansible_facts.distribution in ['Debian', 'Ubuntu']
|
||||
- os_auth_pam_passwdqc_enable
|
||||
|
@ -98,7 +97,6 @@
|
|||
yum:
|
||||
name: '{{ os_packages_pam_passwdqc }}'
|
||||
state: 'present'
|
||||
ignore_errors: true
|
||||
when:
|
||||
- ansible_facts.os_family == 'RedHat'
|
||||
- ansible_facts.distribution_major_version|int is version('7', '<')
|
||||
|
|
Loading…
Reference in New Issue