--- - name: list storage account include: list.yml vars: sa: "{{ item }}" when: - action is defined - action == 'list' - (sas | default([], true) | length) > 0 with_items: "{{ sas }}" - name: In storage account state include: "{{ item.state | default('present', true) }}.yml" vars: sa: "{{ item }}" when: - action is undefined - (sas | default([], true) | length) > 0 with_items: "{{ sas }}" - name: Update/create storage account include: present.yml vars: sa: "{{ item }}" when: - action is defined - action == 'present' - (sas | default([], true) | length) > 0 with_items: "{{ sas }}" - name: Delete storage account include: absent.yml vars: sa: "{{ item }}" when: - action is defined - action == 'absent' - (sas | default([], true) | length) > 0 with_items: "{{ sas }}" ...