You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
947 B

9 years ago
9 years ago
9 years ago
9 years ago
  1. ---
  2. - name: Flannel | Write flannel configuration
  3. template:
  4. src: flannel/network.json
  5. dest: /etc/flannel-network.json
  6. backup: yes
  7. - name: Flannel | Create flannel pod manifest
  8. template:
  9. src: flannel/flannel-pod.yml
  10. dest: /etc/kubernetes/manifests/flannel-pod.manifest
  11. notify: delete default docker bridge
  12. - name: Flannel | Wait for flannel subnet.env file presence
  13. wait_for:
  14. path: /run/flannel/subnet.env
  15. delay: 5
  16. - name: Get flannel_subnet from subnet.env
  17. shell: cat /run/flannel/subnet.env | awk -F'=' '$1 == "FLANNEL_SUBNET" {print $2}'
  18. register: flannel_subnet_output
  19. changed_when: false
  20. - set_fact:
  21. flannel_subnet: "{{ flannel_subnet_output.stdout }}"
  22. - name: Get flannel_mtu from subnet.env
  23. shell: cat /run/flannel/subnet.env | awk -F'=' '$1 == "FLANNEL_MTU" {print $2}'
  24. register: flannel_mtu_output
  25. changed_when: false
  26. - set_fact:
  27. flannel_mtu: "{{ flannel_mtu_output.stdout }}"