redhat.satellite.repository – Manage Repositories
Note
This plugin is part of the redhat.satellite collection (version 3.1.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install redhat.satellite
.
To use it in a playbook, specify: redhat.satellite.repository
.
New in version 1.0.0: of redhat.satellite
Synopsis
Create and manage repositories
Requirements
The below requirements are needed on the host that executes this module.
requests
Parameters
Parameter |
Comments |
---|---|
Contents of requirement yaml file to sync from URL |
|
Architecture of content in the repository Set to |
|
repositories will be automatically enabled on a registered host subscribed to this product Choices:
|
|
Checksum of the repository Choices:
|
|
The content type of the repository Choices:
|
|
comma separated list of architectures to be synced from deb-archive only available for content_type=deb |
|
comma separated list of repo components to be synced from deb-archive only available for content_type=deb |
|
URL to sync Debian or Ubuntu errata information from only available on Orcharhino only available for content_type=deb |
|
comma separated list of releases to be synced from deb-archive only available for content_type=deb |
|
Description of the repository |
|
list of tags to sync for Container Image repository only available for content_type=docker |
|
name of the upstream docker repository only available for content_type=docker |
|
download concurrency for sync from upstream as the API does not return this value, this will break idempotence for this module |
|
download policy for sync from upstream Choices:
|
|
Repository GPG key |
|
Name of the http proxy to use for content synching Should be combined with http_proxy_policy=’use_selected_http_proxy’ |
|
Which proxy to use for content synching Choices:
|
|
List of content units to ignore while syncing a yum repository. Must be subset of rpm,drpm,srpm,distribution,erratum. |
|
Whether content sync should use or ignore the global http proxy setting This is deprecated with Katello 3.13 It has been superseeded by http_proxy_policy Choices:
|
|
label of the repository |
|
toggle “mirror on sync” where the state of the repository mirrors that of the upstream repository at sync time Choices:
|
|
Name of the repository |
|
Organization that the entity is in |
|
Identifies whether the repository should be disabled on a client with a non-matching OS version. A maximum of one OS version can be selected. Set to Choices:
|
|
Password of the user accessing the Foreman server. If the value is not specified in the task, the value of environment variable |
|
Product to which the repository lives in |
|
URL of the Foreman server. If the value is not specified in the task, the value of environment variable |
|
Repository SSL CA certificate |
|
Repository SSL client certificate |
|
Repository SSL client private key |
|
State of the entity
Choices:
|
|
publish the repository via HTTP Choices:
|
|
password to access upstream repository |
|
username to access upstream repository |
|
Repository URL to sync from |
|
Username accessing the Foreman server. If the value is not specified in the task, the value of environment variable |
|
Whether or not to verify the TLS certificates of the Foreman server. If the value is not specified in the task, the value of environment variable Choices:
|
|
verify the upstream certifcates are signed by a trusted CA Choices:
|
Notes
Note
You can configure certain aspects of existing Red Hat Repositories (like download_policy) using this module, but you can’t create (enable) or delete (disable) them.
If you want to enable or disable Red Hat Repositories available through your subscription, please use the redhat.satellite.repository_set module instead.
Examples
- name: "Create repository"
redhat.satellite.repository:
username: "admin"
password: "changeme"
server_url: "https://satellite.example.com"
name: "My repository"
state: present
content_type: "yum"
product: "My Product"
organization: "Default Organization"
url: "http://yum.theforeman.org/plugins/latest/el7/x86_64/"
mirror_on_sync: true
download_policy: background
- name: "Create repository with content credentials"
redhat.satellite.repository:
username: "admin"
password: "changeme"
server_url: "https://satellite.example.com"
name: "My repository 2"
state: present
content_type: "yum"
product: "My Product"
organization: "Default Organization"
url: "http://yum.theforeman.org/releases/latest/el7/x86_64/"
download_policy: background
mirror_on_sync: true
gpg_key: RPM-GPG-KEY-my-product2
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Final state of the affected entities grouped by their type. Returned: success |
|
List of repositories. Returned: success |