main.yaml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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_mon_rest_server_logdir }} 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. - include: certificates.yml
  23. - name: Create nuage-openshift-monitor.yaml
  24. sudo: true
  25. template: src=nuage-openshift-monitor.j2 dest=/usr/share/nuage-openshift-monitor/nuage-openshift-monitor.yaml owner=root mode=0644
  26. notify:
  27. - restart master
  28. - restart master api
  29. - restart master controllers
  30. - restart nuage-openshift-monitor