glusterfs_endpoints.yml 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. ---
  2. - name: Create temp directory for doing work in
  3. command: mktemp -d /tmp/openshift-hosted-ansible-XXXXXX
  4. register: mktempHosted
  5. changed_when: False
  6. check_mode: no
  7. - name: Generate GlusterFS registry endpoints
  8. template:
  9. src: "{{ openshift_examples_content_version }}/glusterfs-registry-endpoints.yml.j2"
  10. dest: "{{ mktempHosted.stdout }}/glusterfs-registry-endpoints.yml"
  11. - name: Generate GlusterFS registry service
  12. template:
  13. src: "{{ openshift_examples_content_version }}/glusterfs-registry-service.yml.j2"
  14. dest: "{{ mktempHosted.stdout }}/glusterfs-registry-service.yml"
  15. - name: Create GlusterFS registry service and endpoint
  16. command: >
  17. {{ openshift_client_binary }} --config={{ openshift.common.config_base }}/master/admin.kubeconfig
  18. apply -f {{ item }} -n {{ openshift_hosted_registry_namespace | default('default') }}
  19. with_items:
  20. - "{{ mktempHosted.stdout }}/glusterfs-registry-service.yml"
  21. - "{{ mktempHosted.stdout }}/glusterfs-registry-endpoints.yml"
  22. - name: Delete temp directory
  23. file:
  24. name: "{{ mktempHosted.stdout }}"
  25. state: absent
  26. changed_when: False
  27. check_mode: no