netmaster.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. ---
  2. - include_tasks: netmaster_firewalld.yml
  3. when: contiv_has_firewalld
  4. - include_tasks: netmaster_iptables.yml
  5. when: not contiv_has_firewalld and contiv_has_iptables
  6. - include_tasks: etcd.yml
  7. - name: Netmaster | Create netmaster symlinks
  8. file:
  9. src: "{{ contiv_current_release_directory }}/{{ item }}"
  10. dest: "{{ contiv_bin_dir }}/{{ item }}"
  11. state: link
  12. with_items:
  13. - netmaster
  14. - netctl
  15. - name: Netmaster | Copy environment file for netmaster
  16. template:
  17. src: netmaster.env.j2
  18. dest: /etc/default/netmaster
  19. mode: 0644
  20. notify: restart netmaster
  21. - name: Netmaster | Ensure contiv_config_dir exists
  22. file:
  23. path: "{{ contiv_config_dir }}"
  24. recurse: yes
  25. state: directory
  26. - name: Netmaster | Setup contiv.json config for the cni plugin
  27. template:
  28. src: contiv.cfg.master.j2
  29. dest: "{{ contiv_config_dir }}/contiv.json"
  30. notify: restart netmaster
  31. - name: Netmaster | Copy systemd units for netmaster
  32. template:
  33. src: netmaster.service
  34. dest: /etc/systemd/system/netmaster.service
  35. notify: reload systemd
  36. - name: Netmaster | Enable Netmaster
  37. service:
  38. name: netmaster
  39. enabled: yes
  40. - name: Netmaster | Start Netmaster
  41. service:
  42. name: netmaster
  43. state: started
  44. register: netmaster_started
  45. - include_tasks: aci.yml
  46. when: contiv_fabric_mode == "aci"
  47. - include_tasks: default_network.yml
  48. when: contiv_default_network == true
  49. - include_tasks: api_proxy.yml