2016-01-26 18:58:14 +08:00
|
|
|
---
|
|
|
|
- name: Pause
|
|
|
|
pause: seconds=10
|
|
|
|
|
|
|
|
- name: reload systemd
|
|
|
|
command: systemctl daemon-reload
|
2016-02-13 18:17:20 +08:00
|
|
|
when: ansible_service_mgr == "systemd" and restart_apimaster is defined and restart_apimaster == True
|
2016-01-26 18:58:14 +08:00
|
|
|
|
|
|
|
- name: reload kube-apiserver
|
|
|
|
service:
|
|
|
|
name: kube-apiserver
|
|
|
|
state: restarted
|
|
|
|
enabled: yes
|
|
|
|
when: restart_apimaster is defined and restart_apimaster == True
|
|
|
|
|
|
|
|
- name: Enable apiserver
|
|
|
|
service:
|
|
|
|
name: kube-apiserver
|
|
|
|
enabled: yes
|
|
|
|
state: started
|
|
|
|
when: restart_apimaster is not defined or restart_apimaster == False
|