install_support.yaml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. changed_when: no
  10. - name: "Create logging project"
  11. command: >
  12. {{ openshift.common.admin_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig new-project {{openshift_logging_namespace}}
  13. when: not ansible_check_mode and "not found" in logging_project_result.stderr
  14. - name: Create logging cert directory
  15. file: path={{openshift.common.config_base}}/logging state=directory mode=0755
  16. changed_when: False
  17. check_mode: no
  18. - include: generate_certs.yaml
  19. vars:
  20. generated_certs_dir: "{{openshift.common.config_base}}/logging"
  21. - name: Create temp directory for all our templates
  22. file: path={{mktemp.stdout}}/templates state=directory mode=0755
  23. changed_when: False
  24. check_mode: no
  25. - include: generate_secrets.yaml
  26. vars:
  27. generated_certs_dir: "{{openshift.common.config_base}}/logging"
  28. - include: generate_configmaps.yaml
  29. - include: generate_services.yaml
  30. - name: Generate kibana-proxy oauth client
  31. template: src=oauth-client.j2 dest={{mktemp.stdout}}/templates/oauth-client.yaml
  32. vars:
  33. secret: "{{oauth_secret}}"
  34. when: oauth_secret is defined
  35. check_mode: no
  36. changed_when: no
  37. - include: generate_clusterroles.yaml
  38. - include: generate_rolebindings.yaml
  39. - include: generate_clusterrolebindings.yaml
  40. - include: generate_serviceaccounts.yaml
  41. - include: generate_routes.yaml