summaryrefslogtreecommitdiffstats
path: root/roles/flannel_register/tasks/main.yml
blob: c58c74d3472d91a2a92f58a613d318cd6d5a14e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
---
- name: Assures /etc/flannel dir exists
  sudo: true
  file: path=/etc/flannel state=directory

- name: Generate etcd configuration for etcd
  sudo: true
  template:
    src: "flannel-config.json"
    dest: "/etc/flannel/config.json"

- name: Insert flannel configuration into etcd
  sudo: true
  shell: 'curl -L --cacert "{{ etcd_peer_ca_file }}" --cert "{{ etcd_peer_cert_file }}" --key "{{ etcd_peer_key_file }}" "{{ etcd_hosts[0] }}/v2/keys{{ flannel_etcd_key }}/config" -XPUT --data-urlencode value@/etc/flannel/config.json'