mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-02 17:28:59 -03:30
Merge branch 'master' into pedantic-syntax-cleanup
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#FIXME: remove if kubernetes/features#124 is implemented
|
||||
- name: Weave | Purge old weave daemonset
|
||||
run_once: true
|
||||
kube:
|
||||
name: "weave-net"
|
||||
kubectl: "{{ bin_dir }}/kubectl"
|
||||
@@ -12,7 +11,6 @@
|
||||
|
||||
|
||||
- name: Weave | Start Resources
|
||||
run_once: true
|
||||
kube:
|
||||
name: "weave-net"
|
||||
kubectl: "{{ bin_dir }}/kubectl"
|
||||
@@ -21,17 +19,16 @@
|
||||
namespace: "{{system_namespace}}"
|
||||
state: "{{ item | ternary('latest','present') }}"
|
||||
with_items: "{{ weave_manifest.changed }}"
|
||||
delegate_to: "{{groups['kube-master'][0]}}"
|
||||
when: inventory_hostname == groups['kube-master'][0]
|
||||
|
||||
|
||||
- name: "Weave | wait for weave to become available"
|
||||
uri:
|
||||
url: http://127.0.0.1:6784/status
|
||||
return_content: yes
|
||||
run_once: true
|
||||
register: weave_status
|
||||
retries: 12
|
||||
retries: 180
|
||||
delay: 10
|
||||
until: "{{ weave_status.status == 200 and
|
||||
'Status: ready' in weave_status.content }}"
|
||||
delegate_to: "{{groups['kube-master'][0]}}"
|
||||
when: inventory_hostname == groups['kube-master'][0]
|
||||
|
||||
@@ -131,11 +131,17 @@
|
||||
tags: bootstrap-os
|
||||
|
||||
# Todo : selinux configuration
|
||||
- name: Confirm selinux deployed
|
||||
stat:
|
||||
path: /etc/selinux/config
|
||||
when: ansible_os_family == "RedHat"
|
||||
register: slc
|
||||
|
||||
- name: Set selinux policy to permissive
|
||||
selinux:
|
||||
policy: targeted
|
||||
state: permissive
|
||||
when: ansible_os_family == "RedHat"
|
||||
when: ansible_os_family == "RedHat" and slc.stat.exists == True
|
||||
changed_when: False
|
||||
tags: bootstrap-os
|
||||
|
||||
|
||||
5
roles/upgrade/post-upgrade/tasks/main.yml
Normal file
5
roles/upgrade/post-upgrade/tasks/main.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
|
||||
- name: Uncordon node
|
||||
command: "{{ bin_dir }}/kubectl uncordon {{ ansible_hostname }}"
|
||||
delegate_to: "{{ groups['kube-master'][0] }}"
|
||||
12
roles/upgrade/pre-upgrade/tasks/main.yml
Normal file
12
roles/upgrade/pre-upgrade/tasks/main.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
|
||||
- name: Cordon node
|
||||
command: "{{ bin_dir }}/kubectl cordon {{ ansible_hostname }}"
|
||||
delegate_to: "{{ groups['kube-master'][0] }}"
|
||||
|
||||
- name: Drain node
|
||||
command: "{{ bin_dir }}/kubectl drain --force --ignore-daemonsets --grace-period 30 --delete-local-data {{ ansible_hostname }}"
|
||||
delegate_to: "{{ groups['kube-master'][0] }}"
|
||||
|
||||
- name: Sleep for grace period for draining
|
||||
pause: seconds=30
|
||||
Reference in New Issue
Block a user