Skip to content

Commit 8435e93

Browse files
committed
Add support for non-remote repositories
1 parent 5dccd72 commit 8435e93

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

roles/pulp_repository/tasks/container.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +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
3839
loop_control:
3940
label: "{{ item.name }}"
4041

@@ -47,6 +48,8 @@
4748
repository: "{{ item.name }}"
4849
remote: "{{ item.name }}-remote"
4950
with_items: "{{ pulp_repository_container_repos }}"
50-
when: item.state == "present"
51+
when:
52+
- item.url is defined
53+
- item.state == "present"
5154
loop_control:
5255
label: "{{ item.name }}"

roles/pulp_repository/tasks/deb.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +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
3839
loop_control:
3940
label: "{{ item.name }}"
4041

@@ -48,6 +49,8 @@
4849
remote: "{{ item.name }}-remote"
4950
mirror: "{{ item.mirror | default(omit) }}"
5051
with_items: "{{ pulp_repository_deb_repos }}"
51-
when: item.state == "present"
52+
when:
53+
- item.url is defined
54+
- item.state == "present"
5255
loop_control:
5356
label: "{{ item.name }}"

roles/pulp_repository/tasks/python.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +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
3839
loop_control:
3940
label: "{{ item.name }}"
4041

@@ -47,6 +48,8 @@
4748
repository: "{{ item.name }}"
4849
remote: "{{ item.name }}-remote"
4950
with_items: "{{ pulp_repository_python_repos }}"
50-
when: item.state == "present"
51+
when:
52+
- item.url is defined
53+
- item.state == "present"
5154
loop_control:
5255
label: "{{ item.name }}"

roles/pulp_repository/tasks/rpm.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +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
3536
loop_control:
3637
label: "{{ item.name }}"
3738

@@ -45,6 +46,8 @@
4546
remote: "{{ item.name }}-remote"
4647
sync_policy: "{{ item.sync_policy | default(omit) }}"
4748
with_items: "{{ pulp_repository_rpm_repos }}"
48-
when: item.state == "present"
49+
when:
50+
- item.url is defined
51+
- item.state == "present"
4952
loop_control:
5053
label: "{{ item.name }}"

0 commit comments

Comments
 (0)