main.yaml 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. ---
  2. - name: Create directory /usr/share/nuagekubemon
  3. sudo: true
  4. file: path=/usr/share/nuagekubemon state=directory
  5. - name: Create the log directory
  6. sudo: true
  7. file: path={{ nuagekubemon_log_dir }} state=directory
  8. - name: Install Nuage Kubemon
  9. sudo: true
  10. yum: name={{ nuage_kubemon_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 nuagekubemon.yaml
  23. sudo: true
  24. template: src=nuagekubemon.j2 dest=/usr/share/nuagekubemon/nuagekubemon.yaml owner=root mode=0644
  25. notify:
  26. - restart master
  27. - restart master api
  28. - restart master controllers
  29. - restart nuagekubemon