---
- name: Retrieve efs
  oc_obj:
    state: list
    kind: dc
    selector: "provisioners-infra=efs"
    namespace: "{{openshift_provisioners_project}}"
  register: efs_dc
  when: openshift_provisioners_efs | bool

- name: start efs
  oc_scale:
    kind: dc
    name: "{{ object }}"
    namespace: "{{openshift_provisioners_project}}"
    replicas: 1
  with_items: "{{ efs_dc.module_results.results[0]['items'] | map(attribute='metadata.name') | list }}"
  loop_control:
    loop_var: object
  when: openshift_provisioners_efs | bool
