install.yaml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. ---
  2. - name: create operator-lifecycle-manager project
  3. oc_project:
  4. name: operator-lifecycle-manager
  5. state: present
  6. node_selector:
  7. - ""
  8. - name: Make temp directory for manifests
  9. command: mktemp -d /tmp/olm-ansible-XXXXXX
  10. register: mktemp
  11. changed_when: False
  12. - name: Copy manifests to temp directory
  13. copy:
  14. src: "{{ item }}"
  15. dest: "{{ mktemp.stdout }}"
  16. with_fileglob: files/*.yaml
  17. - name: Apply alm-operator-serviceaccount ServiceAccount manifest
  18. oc_obj:
  19. state: present
  20. kind: ServiceAccount
  21. name: alm-operator-serviceaccount
  22. namespace: operator-lifecycle-manager
  23. files:
  24. - "{{ mktemp.stdout }}/01-alm-operator.serviceaccount.yaml"
  25. - name: Apply alm-operator-binding ClusterRoleBinding manifest
  26. oc_obj:
  27. state: present
  28. kind: ClusterRoleBinding
  29. name: alm-operator-binding
  30. namespace: operator-lifecycle-manager
  31. files:
  32. - "{{ mktemp.stdout }}/02-alm-operator.rolebinding.yaml"
  33. - name: Apply clusterserviceversion-v1s.app.coreos.com CustomResourceDefinition manifest
  34. oc_obj:
  35. state: present
  36. kind: CustomResourceDefinition
  37. name: clusterserviceversion-v1s.app.coreos.com
  38. namespace: operator-lifecycle-manager
  39. files:
  40. - "{{ mktemp.stdout }}/03-clusterserviceversion.crd.yaml"
  41. - name: Apply catalogsource-v1s.app.coreos.com CustomResourceDefinition manifest
  42. oc_obj:
  43. state: present
  44. kind: CustomResourceDefinition
  45. name: catalogsource-v1s.app.coreos.com
  46. namespace: operator-lifecycle-manager
  47. files:
  48. - "{{ mktemp.stdout }}/05-catalogsource.crd.yaml"
  49. - name: Apply installplan-v1s.app.coreos.com CustomResourceDefinition manifest
  50. oc_obj:
  51. state: present
  52. kind: CustomResourceDefinition
  53. name: installplan-v1s.app.coreos.com
  54. namespace: operator-lifecycle-manager
  55. files:
  56. - "{{ mktemp.stdout }}/06-installplan.crd.yaml"
  57. - name: Apply subscription-v1s.app.coreos.com CustomResourceDefinition manifest
  58. oc_obj:
  59. state: present
  60. kind: CustomResourceDefinition
  61. name: subscription-v1s.app.coreos.com
  62. namespace: operator-lifecycle-manager
  63. files:
  64. - "{{ mktemp.stdout }}/07-subscription.crd.yaml"
  65. - name: Apply tectonic-ocs ConfigMap manifest
  66. oc_obj:
  67. state: present
  68. kind: ConfigMap
  69. name: tectonic-ocs
  70. namespace: operator-lifecycle-manager
  71. files:
  72. - "{{ mktemp.stdout }}/08-tectonicocs.configmap.yaml"
  73. - name: Apply tectonic-ocs CatalogSource-v1 manifest
  74. oc_obj:
  75. state: present
  76. kind: CatalogSource-v1
  77. name: tectonic-ocs
  78. namespace: operator-lifecycle-manager
  79. files:
  80. - "{{ mktemp.stdout }}/10-tectonicocs.catalogsource.yaml"
  81. - name: Apply alm-operator Deployment manifest
  82. oc_obj:
  83. state: present
  84. kind: Deployment
  85. name: alm-operator
  86. namespace: operator-lifecycle-manager
  87. files:
  88. - "{{ mktemp.stdout }}/12-alm-operator.deployment.yaml"
  89. - name: Apply catalog-operator Deployment manifest
  90. oc_obj:
  91. state: present
  92. kind: Deployment
  93. name: catalog-operator
  94. namespace: operator-lifecycle-manager
  95. files:
  96. - "{{ mktemp.stdout }}/13-catalog-operator.deployment.yaml"
  97. - name: Apply upstream-components ConfigMap manifest
  98. oc_obj:
  99. state: present
  100. kind: ConfigMap
  101. name: upstream-components
  102. namespace: operator-lifecycle-manager
  103. files:
  104. - "{{ mktemp.stdout }}/18-upstreamcomponents.configmap.yaml"
  105. - name: Apply upstream-components CatalogSource-v1 manifest
  106. oc_obj:
  107. state: present
  108. kind: CatalogSource-v1
  109. name: upstream-components
  110. namespace: operator-lifecycle-manager
  111. files:
  112. - "{{ mktemp.stdout }}/19-upstreamcomponents.catalogsource.yaml"