替换playbook中hosts: all

pull/641/head
gjmzj 2019-06-23 07:36:51 +08:00
parent bd67b298ac
commit a4215438fe
5 changed files with 28 additions and 5 deletions

View File

@ -1,5 +1,10 @@
# [optional] to synchronize system time of nodes with 'chrony'
- hosts: all
- hosts:
- kube-master
- kube-node
- etcd
- ex-lb
- chrony
roles:
- { role: chrony, when: "groups['chrony']|length > 0" }

View File

@ -23,7 +23,10 @@
- deploy
# pre-tasks on all nodes
- hosts: all
- hosts:
- kube-master
- kube-node
- etcd
roles:
- prepare

View File

@ -1,5 +1,10 @@
# [optional] to synchronize time of nodes with 'chrony'
- hosts: all
- hosts:
- kube-master
- kube-node
- etcd
- ex-lb
- chrony
roles:
- { role: chrony, when: "groups['chrony']|length > 0" }

View File

@ -1,3 +1,8 @@
- hosts: all
- hosts:
- kube-master
- kube-node
- etcd
- ex-lb
- chrony
roles:
- { role: chrony, when: "groups['chrony']|length > 0" }

View File

@ -1,5 +1,10 @@
# [可选]操作系统安全加固 https://github.com/dev-sec/ansible-os-hardening
- hosts: all
- hosts:
- kube-master
- kube-node
- etcd
- ex-lb
- chrony
vars:
os_security_users_allow: change_user
os_auth_pam_passwdqc_enable: false