create_persistent_volumes.yml 776 B

123456789101112131415161718
  1. ---
  2. - name: Create persistent volumes
  3. hosts: oo_first_master
  4. vars:
  5. persistent_volumes: "{{ hostvars[groups.oo_first_master.0] | oo_persistent_volumes(groups) }}"
  6. persistent_volume_claims: "{{ hostvars[groups.oo_first_master.0] | oo_persistent_volume_claims }}"
  7. tasks:
  8. - debug: var=persistent_volumes
  9. - debug: var=persistent_volume_claims
  10. - name: Create Hosted Resources - persistent volumes
  11. hosts: oo_first_master
  12. vars:
  13. persistent_volumes: "{{ hostvars[groups.oo_first_master.0] | oo_persistent_volumes(groups) }}"
  14. persistent_volume_claims: "{{ hostvars[groups.oo_first_master.0] | oo_persistent_volume_claims }}"
  15. roles:
  16. - role: openshift_persistent_volumes
  17. when: persistent_volumes | length > 0 or persistent_volume_claims | length > 0