main.yaml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. ---
  2. - name: setup firewall
  3. include: firewall.yml
  4. static: yes
  5. - name: Create directory /usr/share/nuage-openshift-monitor
  6. become: yes
  7. file: path=/usr/share/nuage-openshift-monitor state=directory
  8. - name: Create the log directory
  9. become: yes
  10. file: path={{ nuage_mon_rest_server_logdir }} state=directory
  11. - name: Install Nuage Openshift Monitor
  12. become: yes
  13. yum: name={{ nuage_openshift_rpm }} state=present
  14. - include: serviceaccount.yml
  15. - name: Download the certs and keys
  16. become: yes
  17. fetch: src={{ cert_output_dir }}/{{ item }} dest=/tmp/{{ item }} flat=yes
  18. with_items:
  19. - ca.crt
  20. - nuage.crt
  21. - nuage.key
  22. - nuage.kubeconfig
  23. - name: Copy the certificates and keys
  24. become: yes
  25. copy: src="/tmp/{{ item }}" dest="{{ cert_output_dir }}/{{ item }}"
  26. with_items:
  27. - ca.crt
  28. - nuage.crt
  29. - nuage.key
  30. - nuage.kubeconfig
  31. - include: certificates.yml
  32. - name: Install Nuage VSD user certificate
  33. become: yes
  34. copy: src="{{ vsd_user_cert_file }}" dest="{{ cert_output_dir }}/{{ vsd_user_cert_file | basename }}"
  35. - name: Install Nuage VSD user key
  36. become: yes
  37. copy: src="{{ vsd_user_key_file }}" dest="{{ cert_output_dir }}/{{ vsd_user_key_file | basename }}"
  38. - name: Create nuage-openshift-monitor.yaml
  39. become: yes
  40. template: src=nuage-openshift-monitor.j2 dest=/usr/share/nuage-openshift-monitor/nuage-openshift-monitor.yaml owner=root mode=0644
  41. notify:
  42. - restart master
  43. - restart master api
  44. - restart master controllers
  45. - restart nuage-openshift-monitor