install_support.yaml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. ---
  2. # This is the base configuration for installing the other components
  3. - name: Check for logging project already exists
  4. command: >
  5. {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig get project {{openshift_logging_namespace}} --no-headers
  6. register: logging_project_result
  7. ignore_errors: yes
  8. when: not ansible_check_mode
  9. - name: "Create logging project"
  10. command: >
  11. {{ openshift.common.admin_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig new-project {{openshift_logging_namespace}}
  12. when: not ansible_check_mode and "not found" in logging_project_result.stderr
  13. - name: Create logging cert directory
  14. file: path={{openshift.common.config_base}}/logging state=directory mode=0755
  15. changed_when: False
  16. check_mode: no
  17. - include: generate_certs.yaml
  18. vars:
  19. generated_certs_dir: "{{openshift.common.config_base}}/logging"
  20. - name: Create temp directory for all our templates
  21. file: path={{mktemp.stdout}}/templates state=directory mode=0755
  22. changed_when: False
  23. check_mode: no
  24. - include: generate_secrets.yaml
  25. vars:
  26. generated_certs_dir: "{{openshift.common.config_base}}/logging"
  27. - include: generate_configmaps.yaml
  28. - include: generate_services.yaml
  29. - name: Generate kibana-proxy oauth client
  30. template: src=oauth-client.j2 dest={{mktemp.stdout}}/templates/oauth-client.yaml
  31. vars:
  32. secret: "{{oauth_secret.stdout}}"
  33. when: oauth_secret.stdout is defined
  34. check_mode: no
  35. - include: generate_clusterroles.yaml
  36. - include: generate_rolebindings.yaml
  37. - include: generate_clusterrolebindings.yaml
  38. - include: generate_serviceaccounts.yaml
  39. - include: generate_routes.yaml