|
15 | 15 | validate_certs: "{{ pulp_validate_certs | bool }}" |
16 | 16 | register: pulp_pubs_list |
17 | 17 |
|
| 18 | +# Verbatim publications use a different API endpoint than regular Deb |
| 19 | +# publications. |
| 20 | +- name: Query verbatim publications |
| 21 | + pulp.squeezer.deb_publication: |
| 22 | + pulp_url: "{{ pulp_url }}" |
| 23 | + username: "{{ pulp_username }}" |
| 24 | + password: "{{ pulp_password }}" |
| 25 | + validate_certs: "{{ pulp_validate_certs | bool }}" |
| 26 | + mode: "verbatim" |
| 27 | + register: pulp_verbatim_pubs_list |
| 28 | + |
18 | 29 | - name: Query distributions |
19 | 30 | pulp.squeezer.deb_distribution: |
20 | 31 | pulp_url: "{{ pulp_url }}" |
|
26 | 37 | - name: Ensure Deb distributions are defined |
27 | 38 | vars: |
28 | 39 | repo: "{{ pulp_repos_list.repositories | selectattr('name', 'equalto', item.repository) | first }}" |
| 40 | + all_pubs_list: "{{ pulp_pubs_list.publications + pulp_verbatim_pubs_list.publications }}" |
29 | 41 | # If the distribution references a specific version: |
30 | | - specific_pub: "{{ pulp_pubs_list.publications | selectattr('repository_version', 'equalto', repo.pulp_href ~ 'versions/' ~ item.version | default ~ '/') }}" |
| 42 | + specific_pub: "{{ all_pubs_list | selectattr('repository_version', 'equalto', repo.pulp_href ~ 'versions/' ~ item.version | default ~ '/') }}" |
31 | 43 | # If the distribution uses the latest version: |
32 | | - latest_pub: "{{ pulp_pubs_list.publications | selectattr('repository', 'equalto', repo.pulp_href) | stackhpc.pulp.sort_publications }}" |
| 44 | + latest_pub: "{{ all_pubs_list | selectattr('repository', 'equalto', repo.pulp_href) | stackhpc.pulp.sort_publications }}" |
33 | 45 | # If another distribution is being promoted to this one: |
34 | 46 | promoted_dist: "{{ pulp_dists_list.distributions | selectattr('name', 'equalto', item.distribution | default) }}" |
35 | | - promoted_pub: "{{ pulp_pubs_list.publications | selectattr('pulp_href', 'equalto', (promoted_dist | first).publication | default) }}" |
| 47 | + promoted_pub: "{{ all_pubs_list | selectattr('pulp_href', 'equalto', (promoted_dist | first).publication | default) }}" |
36 | 48 | # Pick the right publication based on the type of distribution. |
37 | 49 | pubs: "{{ specific_pub if item.version is defined else promoted_pub if item.distribution is defined else latest_pub }}" |
38 | 50 | # Whether any distributions exist for this publication. |
|
0 commit comments