katello_repository_set – Enable/disable repositories in Katello repository sets¶
Parameters¶
Parameter | Choices/Defaults | Comments | |
---|---|---|---|
all_repositories
boolean
|
|
Affect all available repositories in the repository set instead of listing them in repositories.
Required when repositories is unset or an empty list.
|
|
label
string
|
Label of the repository set, can be used in place of name & product
|
||
name
string
|
Name of the repository set
|
||
organization
string
/ required
|
Organization that the entity is in
|
||
password
string
/ required
|
Password of the user accessing the Foreman server
|
||
product
string
|
Name of the parent product
|
||
repositories
list
/ elements=dictionary
|
Release version and base architecture of the repositories to enable.
Some reposotory sets require only basearch or only releasever to be set.
See the examples how you can obtain this information using foreman_search_facts.
Required when all_repositories is unset or
false . |
||
basearch
string
|
Basearch of the repository to enable.
|
||
releasever
string
|
Releasever of the repository to enable.
|
||
server_url
string
/ required
|
URL of the Foreman server
|
||
state
string
|
|
Whether the repositories are enabled or not
|
|
username
string
/ required
|
Username accessing the Foreman server
|
||
validate_certs
boolean
|
|
Whether or not to verify the TLS certificates of the Foreman server
aliases: verify_ssl |
Examples¶
- name: "Enable RHEL 7 RPMs repositories"
katello_repository_set:
username: "admin"
password: "changeme"
server_url: "https://foreman.example.com"
name: "Red Hat Enterprise Linux 7 Server (RPMs)"
organization: "Default Organization"
product: "Red Hat Enterprise Linux Server"
repositories:
- releasever: "7.0"
basearch: "x86_64"
- releasever: "7.1"
basearch: "x86_64"
- releasever: "7.2"
basearch: "x86_64"
- releasever: "7.3"
basearch: "x86_64"
state: enabled
- name: "Enable RHEL 7 RPMs repositories with label"
katello_repository_set:
username: "admin"
password: "changeme"
server_url: "https://foreman.example.com"
organization: "Default Organization"
label: rhel-7-server-rpms
repositories:
- releasever: "7.0"
basearch: "x86_64"
- releasever: "7.1"
basearch: "x86_64"
- releasever: "7.2"
basearch: "x86_64"
- releasever: "7.3"
basearch: "x86_64"
state: enabled
- name: "Disable RHEL 7 Extras RPMs repository"
katello_repository_set:
username: "admin"
password: "changeme"
server_url: "https://foreman.example.com"
name: Red Hat Enterprise Linux 7 Server - Extras (RPMs)
organization: "Default Organization"
product: Red Hat Enterprise Linux Server
state: disabled
repositories:
- basearch: x86_64
- name: "Enable RHEL 8 BaseOS RPMs repository with label"
katello_repository_set:
username: "admin"
password: "changeme"
server_url: "https://foreman.example.com"
organization: "Default Organization"
label: rhel-8-for-x86_64-baseos-rpms
repositories:
- releasever: "8"
- name: "Enable Red Hat Virtualization Manager RPMs repository with label"
katello_repository_set:
username: "admin"
password: "changeme"
server_url: "https://foreman.example.com"
organization: "Default Organization"
label: "rhel-7-server-rhv-4.2-manager-rpms"
repositories:
- basearch: x86_64
state: enabled
- name: "Enable Red Hat Virtualization Manager RPMs repository without specifying basearch"
katello_repository_set:
username: "admin"
password: "changeme"
server_url: "https://foreman.example.com"
organization: "Default Organization"
label: "rhel-7-server-rhv-4.2-manager-rpms"
all_repositories: true
state: enabled
- name: "Search for possible repository sets of a product"
foreman_search_facts:
username: "admin"
password: "changeme"
server_url: "https://foreman.example.com"
organization: "Default Organization"
resource: repository_sets
search: product_name="Red Hat Virtualization Manager"
register: data
- name: "Output found repository sets, see the contentUrl section for possible repository substitutions"
debug:
var: data
- name: "Search for possible repository sets by label"
foreman_search_facts:
username: "admin"
password: "changeme"
server_url: "https://foreman.example.com"
organization: "Default Organization"
resource: repository_sets
search: label=rhel-7-server-rhv-4.2-manager-rpms
register: data
- name: "Output found repository sets, see the contentUrl section for possible repository substitutions"
debug:
var: data
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors¶
Andrew Kofink (@akofink)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.