diff --git a/01.prepare.yml b/01.prepare.yml index efc01e4..f82d633 100644 --- a/01.prepare.yml +++ b/01.prepare.yml @@ -8,6 +8,7 @@ - kube-cluster - deploy - etcd + - lb roles: - prepare diff --git a/roles/prepare/tasks/main.yml b/roles/prepare/tasks/main.yml index 2b0b1b4..518fc3e 100644 --- a/roles/prepare/tasks/main.yml +++ b/roles/prepare/tasks/main.yml @@ -27,3 +27,11 @@ - ca-key.pem - ca.csr - ca-config.json + +# 先拉取下节点的ansible setup信息,起到缓存效果,否则后续when 判断可能失败 +- name: 缓存ansilbe setup信息 + setup: gather_subset=min + +- name: 关闭 selinux + shell: "setenforce 0 && echo SELINUX=disabled > /etc/selinux/config" + when: ansible_distribution == "CentOS"