Skip to content

Commit a421543

Browse files
committed
替换playbook中hosts: all
1 parent bd67b29 commit a421543

File tree

5 files changed

+28
-5
lines changed

5 files changed

+28
-5
lines changed

01.prepare.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# [optional] to synchronize system time of nodes with 'chrony'
2-
- hosts: all
2+
- hosts:
3+
- kube-master
4+
- kube-node
5+
- etcd
6+
- ex-lb
7+
- chrony
38
roles:
49
- { role: chrony, when: "groups['chrony']|length > 0" }
510

24.restore.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323
- deploy
2424

2525
# pre-tasks on all nodes
26-
- hosts: all
26+
- hosts:
27+
- kube-master
28+
- kube-node
29+
- etcd
2730
roles:
2831
- prepare
2932

90.setup.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# [optional] to synchronize time of nodes with 'chrony'
2-
- hosts: all
2+
- hosts:
3+
- kube-master
4+
- kube-node
5+
- etcd
6+
- ex-lb
7+
- chrony
38
roles:
49
- { role: chrony, when: "groups['chrony']|length > 0" }
510

roles/chrony/chrony.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
- hosts: all
1+
- hosts:
2+
- kube-master
3+
- kube-node
4+
- etcd
5+
- ex-lb
6+
- chrony
27
roles:
38
- { role: chrony, when: "groups['chrony']|length > 0" }

roles/os-harden/os-harden.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# [可选]操作系统安全加固 https://github.com/dev-sec/ansible-os-hardening
2-
- hosts: all
2+
- hosts:
3+
- kube-master
4+
- kube-node
5+
- etcd
6+
- ex-lb
7+
- chrony
38
vars:
49
os_security_users_allow: change_user
510
os_auth_pam_passwdqc_enable: false

0 commit comments

Comments
 (0)