| 1 |
--- |
| 2 |
- name: 'Enable Red Hat Repositories' |
| 3 |
theforeman.foreman.repository_set: |
| 4 |
username: "{{ foreman_username | default(omit) }}" |
| 5 |
password: "{{ foreman_password | default(omit) }}" |
| 6 |
server_url: "{{ foreman_server_url | default(omit) }}" |
| 7 |
validate_certs: "{{ foreman_validate_certs | default(omit) }}" |
| 8 |
organization: "{{ item.0.organization | default(foreman_organization) }}" |
| 9 |
product: "{{ item.0.name }}" |
| 10 |
name: "{{ item.1.name }}" |
| 11 |
all_repositories: false |
| 12 |
state: "{{ item.1.state | default(omit) }}" |
| 13 |
repositories: |
| 14 |
- releasever: "{{ item.1.releasever | default(omit) }}" |
| 15 |
basearch: "{{ item.1.basearch | default(omit) }}" |
| 16 |
with_subelements: |
| 17 |
- "{{ foreman_products | selectattr('repository_sets', 'defined') | list }}" |
| 18 |
- repository_sets |
| 19 |
|
| 20 |
- name: 'Enable Red Hat Repository Sets' |
| 21 |
theforeman.foreman.repository_set: |
| 22 |
username: "{{ foreman_username | default(omit) }}" |
| 23 |
password: "{{ foreman_password | default(omit) }}" |
| 24 |
server_url: "{{ foreman_server_url | default(omit) }}" |
| 25 |
validate_certs: "{{ foreman_validate_certs | default(omit) }}" |
| 26 |
organization: "{{ item.0.organization | default(foreman_organization) }}" |
| 27 |
label: "{{ item.1 }}" |
| 28 |
all_repositories: true |
| 29 |
state: "{{ item.1.state | default(omit) }}" |
| 30 |
with_subelements: |
| 31 |
- "{{ foreman_products | selectattr('all_repositories', 'defined') | selectattr('all_repositories', 'equalto', True) | list }}" |
| 32 |
- labels |
| 33 |
|
| 34 |
- name: 'Create Products' |
| 35 |
theforeman.foreman.product: |
| 36 |
username: "{{ foreman_username | default(omit) }}" |
| 37 |
password: "{{ foreman_password | default(omit) }}" |
| 38 |
server_url: "{{ foreman_server_url | default(omit) }}" |
| 39 |
validate_certs: "{{ foreman_validate_certs | default(omit) }}" |
| 40 |
organization: "{{ item.organization | default(foreman_organization) }}" |
| 41 |
name: "{{ item.name }}" |
| 42 |
description: "{{ item.description | default(omit) }}" |
| 43 |
label: "{{ item.label | default(omit) }}" |
| 44 |
gpg_key: "{{ item.gpg_key | default(omit) }}" |
| 45 |
ssl_ca_cert: "{{ item.ssl_ca_cert | default(omit) }}" |
| 46 |
ssl_client_cert: "{{ item.ssl_client_cert | default(omit) }}" |
| 47 |
ssl_client_key: "{{ item.ssl_client_key | default(omit) }}" |
| 48 |
state: "{{ item.state | default(omit) }}" |
| 49 |
sync_plan: "{{ item.sync_plan | default(omit) }}" |
| 50 |
with_items: |
| 51 |
- "{{ foreman_products | selectattr('repositories', 'defined') | map('combine', {'repositories': '[FILTERED]'}) | list }}" |
| 52 |
|
| 53 |
- name: 'Create Repositories' |
| 54 |
theforeman.foreman.repository: |
| 55 |
username: "{{ foreman_username | default(omit) }}" |
| 56 |
password: "{{ foreman_password | default(omit) }}" |
| 57 |
server_url: "{{ foreman_server_url | default(omit) }}" |
| 58 |
validate_certs: "{{ foreman_validate_certs | default(omit) }}" |
| 59 |
organization: "{{ item.0.organization | default(foreman_organization) }}" |
| 60 |
name: "{{ item.1.name }}" |
| 61 |
url: "{{ item.1.url | default(omit) }}" |
| 62 |
product: "{{ item.0.name }}" |
| 63 |
arch: "{{ item.1.arch | default(omit) }}" |
| 64 |
auto_enabled: "{{ item.1.auto_enabled | default(omit) }}" |
| 65 |
checksum_type: "{{ item.1.checksum_type | default(omit) }}" |
| 66 |
content_type: "{{ item.1.content_type }}" |
| 67 |
deb_architectures: "{{ item.1.deb_architectures | default(omit) }}" |
| 68 |
deb_components: "{{ item.1.deb_components | default(omit) }}" |
| 69 |
deb_errata_url: "{{ item.1.deb_errata_url | default(omit) }}" |
| 70 |
deb_releases: "{{ item.1.deb_releases | default(omit) }}" |
| 71 |
description: "{{ item.1.description | default(omit) }}" |
| 72 |
docker_tags_whitelist: "{{ item.1.docker_tags_whitelist | default(omit) }}" |
| 73 |
docker_upstream_name: "{{ item.1.docker_upstream_name | default(omit) }}" |
| 74 |
include_tags: "{{ item.1.include_tags | default(omit) }}" |
| 75 |
exclude_tags: "{{ item.1.exclude_tags | default(omit) }}" |
| 76 |
download_policy: "{{ item.1.download_policy | default(omit) }}" |
| 77 |
gpg_key: "{{ item.1.gpg_key | default(omit) }}" |
| 78 |
http_proxy: "{{ item.1.http_proxy | default(omit) }}" |
| 79 |
http_proxy_policy: "{{ item.1.http_proxy_policy | default(omit) }}" |
| 80 |
ignorable_content: "{{ item.1.ignorable_content | default(omit) }}" |
| 81 |
ignore_global_proxy: "{{ item.1.ignore_global_proxy | default(omit) }}" |
| 82 |
label: "{{ item.1.label | default(omit) }}" |
| 83 |
mirror_on_sync: "{{ item.1.mirror_on_sync | default(omit) }}" |
| 84 |
mirroring_policy: "{{ item.1.mirroring_policy | default(omit) }}" |
| 85 |
os_versions: "{{ item.1.os_versions | default(omit) }}" |
| 86 |
ssl_ca_cert: "{{ item.1.ssl_ca_cert | default(omit) }}" |
| 87 |
ssl_client_cert: "{{ item.1.ssl_client_cert | default(omit) }}" |
| 88 |
ssl_client_key: "{{ item.1.ssl_client_key | default(omit) }}" |
| 89 |
state: "{{ item.1.state | default(omit) }}" |
| 90 |
unprotected: "{{ item.1.unprotected | default(omit) }}" |
| 91 |
upstream_password: "{{ item.1.upstream_password | default(omit) }}" |
| 92 |
upstream_username: "{{ item.1.upstream_username | default(omit) }}" |
| 93 |
verify_ssl_on_sync: "{{ item.1.verify_ssl_on_sync | default(omit) }}" |
| 94 |
ansible_collection_requirements: "{{ item.1.ansible_collection_requirements | default(omit) }}" |
| 95 |
with_subelements: |
| 96 |
- "{{ foreman_products | selectattr('repositories', 'defined') | list }}" |
| 97 |
- repositories |
| 98 |
no_log: "{{ item.1.upstream_password is defined }}" |