netmaster.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. force: yes
  13. with_items:
  14. - netmaster
  15. - netctl
  16. - name: Netmaster | Copy environment file for netmaster
  17. template:
  18. src: netmaster.j2
  19. dest: /etc/default/netmaster
  20. mode: 0644
  21. notify: restart netmaster
  22. - name: Netmaster | Ensure contiv_config_dir exists
  23. file:
  24. path: "{{ contiv_config_dir }}"
  25. recurse: yes
  26. state: directory
  27. - name: Netmaster | Setup contiv.json config for the cni plugin
  28. template:
  29. src: contiv.cfg.master.j2
  30. dest: "{{ contiv_config_dir }}/contiv.json"
  31. notify: restart netmaster
  32. - name: Netmaster | Copy systemd units for netmaster
  33. template:
  34. src: netmaster.service
  35. dest: /etc/systemd/system/netmaster.service
  36. notify: reload systemd
  37. - name: Netmaster | Flush handlers
  38. meta: flush_handlers
  39. - name: Netmaster | Enable Netmaster
  40. service:
  41. name: netmaster
  42. enabled: yes
  43. - name: Netmaster | Start Netmaster
  44. service:
  45. name: netmaster
  46. state: started
  47. - include_tasks: aci.yml
  48. when: contiv_fabric_mode == "aci"
  49. - include_tasks: default_network.yml
  50. when: contiv_default_network == true
  51. - include_tasks: api_proxy.yml