Skip to content

Commit 2484d97

Browse files
committed
pulp_repository: Fix remote removal with state=absent
Since remotes were made optional, they no longer get removed when state=absent. This change fixes the issue.
1 parent 7b4787b commit 2484d97

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

roles/pulp_repository/tasks/container.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
url: "{{ item.url | default(omit) }}"
3636
state: "{{ item.state }}"
3737
with_items: "{{ pulp_repository_container_repos }}"
38-
when: item.url is defined
38+
when: item.state == "absent" or item.url is defined
3939
loop_control:
4040
label: "{{ item.name }}"
4141

roles/pulp_repository/tasks/deb.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
url: "{{ item.url | default(omit) }}"
3636
state: "{{ item.state }}"
3737
with_items: "{{ pulp_repository_deb_repos }}"
38-
when: item.url is defined
38+
when: item.state == "absent" or item.url is defined
3939
loop_control:
4040
label: "{{ item.name }}"
4141

roles/pulp_repository/tasks/python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
url: "{{ item.url | default(omit) }}"
3636
state: "{{ item.state }}"
3737
with_items: "{{ pulp_repository_python_repos }}"
38-
when: item.url is defined
38+
when: item.state == "absent" or item.url is defined
3939
loop_control:
4040
label: "{{ item.name }}"
4141

roles/pulp_repository/tasks/rpm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
url: "{{ item.url | default(omit) }}"
3333
state: "{{ item.state }}"
3434
with_items: "{{ pulp_repository_rpm_repos }}"
35-
when: item.url is defined
35+
when: item.state == "absent" or item.url is defined
3636
loop_control:
3737
label: "{{ item.name }}"
3838

0 commit comments

Comments
 (0)