86e3506ae6
The current way to setup the etc cluster is messy and buggy. - It checks for cluster is healthy before the cluster is even created. - The unit files are started on handlers, not in the task, so you mess with "flush handlers". - The join_member.yml is not used. - etcd events cluster is not configured for kubeadm - remove duplicate runs between running the role on etcd nodes and k8s nodes
30 lines
900 B
YAML
30 lines
900 B
YAML
---
|
|
- name: Trust etcd container
|
|
command: >-
|
|
/usr/bin/rkt trust
|
|
--skip-fingerprint-review
|
|
--root
|
|
https://quay.io/aci-signing-key
|
|
register: etcd_rkt_trust_result
|
|
until: etcd_rkt_trust_result.rc == 0
|
|
retries: 4
|
|
delay: "{{ retry_stagger | random + 3 }}"
|
|
changed_when: false
|
|
environment: "{{proxy_env}}"
|
|
when: etcd_cluster_setup
|
|
|
|
- name: Install | Copy etcdctl binary from rkt container
|
|
command: >-
|
|
/usr/bin/rkt run
|
|
--volume=bin-dir,kind=host,source={{ bin_dir}},readOnly=false
|
|
--mount=volume=bin-dir,target=/host/bin
|
|
{{ etcd_image_repo }}:{{ etcd_image_tag }}
|
|
--name=etcdctl-binarycopy
|
|
--exec=/bin/cp -- /usr/local/bin/etcdctl /host/bin/etcdctl
|
|
register: etcd_task_result
|
|
until: etcd_task_result.rc == 0
|
|
retries: 4
|
|
delay: "{{ retry_stagger | random + 3 }}"
|
|
changed_when: false
|
|
environment: "{{proxy_env}}"
|
|
when: etcd_cluster_setup
|