theforeman.foreman.repository – Manage Repositories¶
Note
This plugin is part of the theforeman.foreman collection (version 2.1.1).
To install it use: ansible-galaxy collection install theforeman.foreman
.
To use it in a playbook, specify: theforeman.foreman.repository
.
New in version 1.0.0: of theforeman.foreman
Parameters¶
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 theforeman.foreman.repository_set module instead.
Examples¶
- name: "Create repository"
theforeman.foreman.repository:
username: "admin"
password: "changeme"
server_url: "https://foreman.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"
theforeman.foreman.repository:
username: "admin"
password: "changeme"
server_url: "https://foreman.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 | Returned | Description | |
---|---|---|---|
entity
dictionary
|
success |
Final state of the affected entities grouped by their type.
|
|
repositories
list
/ elements=dictionary
|
success |
List of repositories.
|
Authors¶
Eric D Helms (@ehelms)