diff --git a/roles/pulp_repository/tasks/container.yml b/roles/pulp_repository/tasks/container.yml index 037394e..b534564 100644 --- a/roles/pulp_repository/tasks/container.yml +++ b/roles/pulp_repository/tasks/container.yml @@ -35,6 +35,7 @@ url: "{{ item.url | default(omit) }}" state: "{{ item.state }}" with_items: "{{ pulp_repository_container_repos }}" + when: item.url is defined loop_control: label: "{{ item.name }}" @@ -47,6 +48,8 @@ repository: "{{ item.name }}" remote: "{{ item.name }}-remote" with_items: "{{ pulp_repository_container_repos }}" - when: item.state == "present" + when: + - item.url is defined + - item.state == "present" loop_control: label: "{{ item.name }}" diff --git a/roles/pulp_repository/tasks/deb.yml b/roles/pulp_repository/tasks/deb.yml index c8e0b15..5acc48f 100644 --- a/roles/pulp_repository/tasks/deb.yml +++ b/roles/pulp_repository/tasks/deb.yml @@ -35,6 +35,7 @@ url: "{{ item.url | default(omit) }}" state: "{{ item.state }}" with_items: "{{ pulp_repository_deb_repos }}" + when: item.url is defined loop_control: label: "{{ item.name }}" @@ -48,6 +49,8 @@ remote: "{{ item.name }}-remote" mirror: "{{ item.mirror | default(omit) }}" with_items: "{{ pulp_repository_deb_repos }}" - when: item.state == "present" + when: + - item.url is defined + - item.state == "present" loop_control: label: "{{ item.name }}" diff --git a/roles/pulp_repository/tasks/python.yml b/roles/pulp_repository/tasks/python.yml index 653d8ae..04fe2b1 100644 --- a/roles/pulp_repository/tasks/python.yml +++ b/roles/pulp_repository/tasks/python.yml @@ -35,6 +35,7 @@ url: "{{ item.url | default(omit) }}" state: "{{ item.state }}" with_items: "{{ pulp_repository_python_repos }}" + when: item.url is defined loop_control: label: "{{ item.name }}" @@ -47,6 +48,8 @@ repository: "{{ item.name }}" remote: "{{ item.name }}-remote" with_items: "{{ pulp_repository_python_repos }}" - when: item.state == "present" + when: + - item.url is defined + - item.state == "present" loop_control: label: "{{ item.name }}" diff --git a/roles/pulp_repository/tasks/rpm.yml b/roles/pulp_repository/tasks/rpm.yml index e7421ee..ec9898d 100644 --- a/roles/pulp_repository/tasks/rpm.yml +++ b/roles/pulp_repository/tasks/rpm.yml @@ -32,6 +32,7 @@ url: "{{ item.url | default(omit) }}" state: "{{ item.state }}" with_items: "{{ pulp_repository_rpm_repos }}" + when: item.url is defined loop_control: label: "{{ item.name }}" @@ -45,6 +46,8 @@ remote: "{{ item.name }}-remote" sync_policy: "{{ item.sync_policy | default(omit) }}" with_items: "{{ pulp_repository_rpm_repos }}" - when: item.state == "present" + when: + - item.url is defined + - item.state == "present" loop_control: label: "{{ item.name }}"