diff --git a/roles/pulp_repository/tasks/container.yml b/roles/pulp_repository/tasks/container.yml index b534564..3724a4e 100644 --- a/roles/pulp_repository/tasks/container.yml +++ b/roles/pulp_repository/tasks/container.yml @@ -35,7 +35,7 @@ url: "{{ item.url | default(omit) }}" state: "{{ item.state }}" with_items: "{{ pulp_repository_container_repos }}" - when: item.url is defined + when: item.state == "absent" or item.url is defined loop_control: label: "{{ item.name }}" diff --git a/roles/pulp_repository/tasks/deb.yml b/roles/pulp_repository/tasks/deb.yml index 5acc48f..a3f5efe 100644 --- a/roles/pulp_repository/tasks/deb.yml +++ b/roles/pulp_repository/tasks/deb.yml @@ -35,7 +35,7 @@ url: "{{ item.url | default(omit) }}" state: "{{ item.state }}" with_items: "{{ pulp_repository_deb_repos }}" - when: item.url is defined + when: item.state == "absent" or item.url is defined loop_control: label: "{{ item.name }}" diff --git a/roles/pulp_repository/tasks/python.yml b/roles/pulp_repository/tasks/python.yml index 04fe2b1..cc2a1f1 100644 --- a/roles/pulp_repository/tasks/python.yml +++ b/roles/pulp_repository/tasks/python.yml @@ -35,7 +35,7 @@ url: "{{ item.url | default(omit) }}" state: "{{ item.state }}" with_items: "{{ pulp_repository_python_repos }}" - when: item.url is defined + when: item.state == "absent" or item.url is defined loop_control: label: "{{ item.name }}" diff --git a/roles/pulp_repository/tasks/rpm.yml b/roles/pulp_repository/tasks/rpm.yml index ec9898d..904e3d9 100644 --- a/roles/pulp_repository/tasks/rpm.yml +++ b/roles/pulp_repository/tasks/rpm.yml @@ -32,7 +32,7 @@ url: "{{ item.url | default(omit) }}" state: "{{ item.state }}" with_items: "{{ pulp_repository_rpm_repos }}" - when: item.url is defined + when: item.state == "absent" or item.url is defined loop_control: label: "{{ item.name }}"