main.yaml 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. ---
  2. - name: Create directory /usr/share/nuage-openshift-monitor
  3. sudo: true
  4. file: path=/usr/share/nuage-openshift-monitor state=directory
  5. - name: Create the log directory
  6. sudo: true
  7. file: path={{ nuage_openshift_monitor_log_dir }} state=directory
  8. - name: Install Nuage Openshift Monitor
  9. sudo: true
  10. yum: name={{ nuage_openshift_rpm }} state=present
  11. - name: Run the service account creation script
  12. sudo: true
  13. script: serviceaccount.sh --server={{ openshift.master.api_url }} --output-cert-dir={{ cert_output_dir }} --master-cert-dir={{ openshift_master_config_dir }}
  14. - name: Download the certs and keys
  15. sudo: true
  16. fetch: src={{ cert_output_dir }}/{{ item }} dest=/tmp/{{ item }} flat=yes
  17. with_items:
  18. - ca.crt
  19. - nuage.crt
  20. - nuage.key
  21. - nuage.kubeconfig
  22. - name: Create nuage-openshift-monitor.yaml
  23. sudo: true
  24. template: src=nuage-openshift-monitor.j2 dest=/usr/share/nuage-openshift-monitor/nuage-openshift-monitor.yaml owner=root mode=0644
  25. notify:
  26. - restart master
  27. - restart master api
  28. - restart master controllers
  29. - restart nuage-openshift-monitor