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
996 B

9 years ago
  1. ---
  2. - name: Write script for calico/docker bridge configuration
  3. template: src=create_cbr.j2 dest=/etc/network/if-up.d/create_cbr mode=u+x
  4. when: overlay_network_plugin is defined and overlay_network_plugin == "calico"
  5. - name: Configure calico/docker bridge
  6. shell: /etc/network/if-up.d/create_cbr
  7. when: overlay_network_plugin is defined and overlay_network_plugin == "calico"
  8. - name: Configure docker to use cbr0 bridge
  9. lineinfile:
  10. dest=/etc/default/docker
  11. regexp='.*DOCKER_OPTS=.*'
  12. line='DOCKER_OPTS="--bridge=cbr0 --iptables=false --ip-masq=false"'
  13. notify:
  14. - restart docker
  15. when: overlay_network_plugin is defined and overlay_network_plugin == "calico"
  16. - name: enable docker
  17. service:
  18. name: docker
  19. enabled: yes
  20. state: started
  21. tags:
  22. - docker
  23. - meta: flush_handlers
  24. #- name: login to arkena's docker registry
  25. # shell : >
  26. # docker login --username={{ dockerhub_user }}
  27. # --password={{ dockerhub_pass }}
  28. # --email={{ dockerhub_email }}