2019-06-20 18:12:51 +00:00
|
|
|
---
|
|
|
|
- name: Calculate etcd cert serial
|
|
|
|
command: "openssl x509 -in {{ kube_cert_dir }}/apiserver-etcd-client.crt -noout -serial"
|
|
|
|
register: "etcd_client_cert_serial_result"
|
|
|
|
changed_when: false
|
|
|
|
tags:
|
|
|
|
- network
|
|
|
|
|
|
|
|
- name: Set etcd_client_cert_serial
|
|
|
|
set_fact:
|
|
|
|
etcd_client_cert_serial: "{{ etcd_client_cert_serial_result.stdout.split('=')[1] }}"
|
|
|
|
tags:
|
|
|
|
- network
|
|
|
|
|
|
|
|
- name: Ensure etcdctl binary is installed
|
|
|
|
include_tasks: "{{ role_path }}/../../etcd/tasks/install_host.yml"
|
|
|
|
vars:
|
|
|
|
etcd_cluster_setup: true
|
2020-11-04 08:20:04 +00:00
|
|
|
when: etcd_deployment_type == "host" and not etcd_kubeadm_enabled
|
2020-03-24 15:12:47 +00:00
|
|
|
|
|
|
|
- name: Ensure etcdctl binary is installed
|
|
|
|
include_tasks: "{{ role_path }}/../../etcd/tasks/install_etcdctl_docker.yml"
|
|
|
|
vars:
|
|
|
|
etcd_cluster_setup: true
|
|
|
|
etcd_retries: 4
|
|
|
|
when:
|
2020-11-04 08:20:04 +00:00
|
|
|
- etcd_deployment_type == "docker" and not etcd_kubeadm_enabled
|
|
|
|
|
|
|
|
- name: Ensure etcdctl script is installed
|
|
|
|
import_role:
|
|
|
|
name: etcdctl
|
|
|
|
when: etcd_kubeadm_enabled
|