Properly skip task when variable is undefined
This commit is contained in:
parent
2a3b31915f
commit
d47dfa8073
|
@ -27,8 +27,7 @@
|
|||
|
||||
- name: Configure repository subscriptions
|
||||
command: subscription-manager repos --{{ item.state }} {{ item.name }}
|
||||
with_items: "{{ rhsub_repos }}"
|
||||
when: rhsub_repos is defined
|
||||
with_items: "{{ rhsub_repos | default([]) }}"
|
||||
tags:
|
||||
- rhsub
|
||||
- rhsub_repos
|
||||
|
|
Loading…
Reference in New Issue