This repository has been archived by the owner on Apr 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
main.yaml
64 lines (51 loc) · 3.23 KB
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
etcd_source_type: "pass"
etcd_version: 2.2.3
etcd_client_port: 2379
etcd_peer_port: 2380
# Remove etcd_client_legacy_port & etcd_peer_legacy_port
# when https://github.com/contiv/netplugin/issues/323 is fixed
etcd_client_legacy_port: 4001
etcd_peer_legacy_port: 7001
etcd_peers_group: etcd
etcd_url_scheme: http
etcd_peer_url_scheme: http
# Set correspondingly to true when use https values above to enable cert auth
etcd_client_cert_auth: false
etcd_peer_client_cert_auth: false
etcd_cert_group: root
etcd_conf_dir: /etc/etcd
etcd_certs_dir: "{{ etcd_conf_dir }}/certs"
etcd_script_dir: /usr/libexec/etcd
etcd_ca_file: "{{ etcd_certs_dir }}/ca.crt"
etcd_cert_file: "{{ etcd_certs_dir }}/server.crt"
etcd_key_file: "{{ etcd_certs_dir }}/server.key"
etcd_peer_ca_file: "{{ etcd_certs_dir }}/ca.crt"
etcd_peer_cert_file: "{{ etcd_certs_dir }}/peer.crt"
etcd_peer_key_file: "{{ etcd_certs_dir }}/peer.key"
etcd_client_cert_file: "{{ etcd_certs_dir }}/client.crt"
etcd_client_key_file: "{{ etcd_certs_dir }}/client.key"
etcd_initial_cluster_state: new
etcd_initial_cluster_token: etcd-k8-cluster
# Interface on which etcd listens.
# It is useful when you want define common network interface for etcd clusters and the interface is not connected to other machines (i.e. use same network interface for setup a etcd clusters),
# for example as in Vagrant+VirtualBox configuration.
# Note that this variable can't be set in per-host manner with current implementation.
# If not specified, fact "ansible_default_ipv4.address" will be applied by every host itself.
etcd_interface: ""
etcd_machine_address: "{% if etcd_interface != '' %}{{ hostvars[inventory_hostname]['ansible_' + etcd_interface].ipv4.address }}{%- else %}{{ hostvars[inventory_hostname].ansible_default_ipv4.address }}{% endif %}"
etcd_initial_advertise_peer_urls: "{{ etcd_peer_url_scheme }}://{{ etcd_machine_address }}:{{ etcd_peer_port }}"
etcd_listen_peer_urls: "{{ etcd_peer_url_scheme }}://0.0.0.0:{{ etcd_peer_port }}"
etcd_advertise_client_urls: "{{ etcd_url_scheme }}://{{ etcd_machine_address }}:{{ etcd_client_port }}"
etcd_listen_client_urls: "{{ etcd_url_scheme }}://0.0.0.0:{{ etcd_client_port }}"
# Remove etcd_listen_peer_legacy_urls, etcd_advertise_client_legacy_urls
# and etcd_listen_client_legacy_url when https://github.com/contiv/netplugin/issues/323 is fixed
etcd_listen_peer_legacy_urls: "{{ etcd_peer_url_scheme }}://0.0.0.0:{{ etcd_peer_port }},{{ etcd_peer_url_scheme }}://0.0.0.0:{{ etcd_peer_legacy_port }}"
etcd_advertise_client_legacy_urls: "{{ etcd_url_scheme }}://{{ etcd_machine_address }}:{{ etcd_client_port }},{{ etcd_url_scheme }}://{{ etcd_machine_address }}:{{ etcd_client_legacy_port }}"
etcd_listen_client_legacy_urls: "{{ etcd_url_scheme }}://0.0.0.0:{{ etcd_client_port }},{{ etcd_url_scheme }}://0.0.0.0:{{ etcd_client_legacy_port }}"
etcd_data_dir: /var/lib/etcd
etcd_download_url_base: "https://github.com/coreos/etcd/releases/download/v{{ etcd_version }}"
etcd_download_url: "{{ etcd_download_url_base }}/etcd-v{{ etcd_version }}-linux-{{ (ansible_architecture == 'x86_64') | ternary('amd64', ansible_architecture) }}.tar.gz"
etcd_enable: true
etcd_is_proxy: false
etcd_system_image: "{{ system_images_registry }}/{{ system_images_registry_namespace }}/etcd:{{system_images_tag }}"