.. Document meta :orphan: .. |antsibull-internal-nbsp| unicode:: 0xA0 :trim: .. role:: ansible-attribute-support-label .. role:: ansible-attribute-support-property .. role:: ansible-attribute-support-full .. role:: ansible-attribute-support-partial .. role:: ansible-attribute-support-none .. role:: ansible-attribute-support-na .. role:: ansible-option-type .. role:: ansible-option-elements .. role:: ansible-option-required .. role:: ansible-option-versionadded .. role:: ansible-option-aliases .. role:: ansible-option-choices .. role:: ansible-option-choices-entry .. role:: ansible-option-default .. role:: ansible-option-default-bold .. role:: ansible-option-configuration .. role:: ansible-option-returned-bold .. role:: ansible-option-sample-bold .. Anchors .. _ansible_collections.theforeman.foreman.repository_module: .. Anchors: short name for ansible.builtin .. Anchors: aliases .. Title theforeman.foreman.repository -- Manage Repositories ++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: This plugin is part of the `theforeman.foreman 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 :code:`ansible-galaxy collection list`. To install it, use: :code:`ansible-galaxy collection install theforeman.foreman`. To use it in a playbook, specify: :code:`theforeman.foreman.repository`. .. version_added .. versionadded:: 1.0.0 of theforeman.foreman .. contents:: :local: :depth: 1 .. Deprecated Synopsis -------- .. Description - Create and manage repositories .. Aliases .. Requirements Requirements ------------ The below requirements are needed on the host that executes this module. - requests .. Options Parameters ---------- .. rst-class:: ansible-option-table .. list-table:: :width: 100% :widths: auto :header-rows: 1 * - Parameter - Comments * - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-ansible_collection_requirements: .. rst-class:: ansible-option-title **ansible_collection_requirements** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Contents of requirement yaml file to sync from URL .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-arch: .. rst-class:: ansible-option-title **arch** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Architecture of content in the repository Set to \ :literal:`noarch`\ to disable the architecture restriction again. .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-auto_enabled: .. rst-class:: ansible-option-title **auto_enabled** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`boolean` .. raw:: html
- .. raw:: html
repositories will be automatically enabled on a registered host subscribed to this product .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`no` - :ansible-option-choices-entry:`yes` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-checksum_type: .. rst-class:: ansible-option-title **checksum_type** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Checksum of the repository .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`sha1` - :ansible-option-choices-entry:`sha256` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-content_type: .. rst-class:: ansible-option-title **content_type** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` / :ansible-option-required:`required` .. raw:: html
- .. raw:: html
The content type of the repository .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`deb` - :ansible-option-choices-entry:`docker` - :ansible-option-choices-entry:`file` - :ansible-option-choices-entry:`ostree` - :ansible-option-choices-entry:`puppet` - :ansible-option-choices-entry:`yum` - :ansible-option-choices-entry:`ansible\_collection` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-deb_architectures: .. rst-class:: ansible-option-title **deb_architectures** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
comma separated list of architectures to be synced from deb-archive only available for \ :emphasis:`content\_type=deb`\ .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-deb_components: .. rst-class:: ansible-option-title **deb_components** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
comma separated list of repo components to be synced from deb-archive only available for \ :emphasis:`content\_type=deb`\ .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-deb_errata_url: .. rst-class:: ansible-option-title **deb_errata_url** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
URL to sync Debian or Ubuntu errata information from only available on Orcharhino only available for \ :emphasis:`content\_type=deb`\ .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-deb_releases: .. rst-class:: ansible-option-title **deb_releases** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
comma separated list of releases to be synced from deb-archive only available for \ :emphasis:`content\_type=deb`\ .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-description: .. rst-class:: ansible-option-title **description** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Description of the repository .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-docker_tags_whitelist: .. rst-class:: ansible-option-title **docker_tags_whitelist** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
list of tags to sync for Container Image repository only available for \ :emphasis:`content\_type=docker`\ .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-docker_upstream_name: .. rst-class:: ansible-option-title **docker_upstream_name** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
name of the upstream docker repository only available for \ :emphasis:`content\_type=docker`\ .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-download_concurrency: .. rst-class:: ansible-option-title **download_concurrency** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`integer` :ansible-option-versionadded:`added in 3.0.0 of theforeman.foreman` .. raw:: html
- .. raw:: html
download concurrency for sync from upstream as the API does not return this value, this will break idempotence for this module .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-download_policy: .. rst-class:: ansible-option-title **download_policy** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
download policy for sync from upstream .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`background` - :ansible-option-choices-entry:`immediate` - :ansible-option-choices-entry:`on\_demand` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-gpg_key: .. rst-class:: ansible-option-title **gpg_key** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Repository GPG key .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-http_proxy: .. rst-class:: ansible-option-title **http_proxy** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Name of the http proxy to use for content synching Should be combined with \ :emphasis:`http\_proxy\_policy='use\_selected\_http\_proxy'`\ .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-http_proxy_policy: .. rst-class:: ansible-option-title **http_proxy_policy** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Which proxy to use for content synching .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`global\_default\_http\_proxy` - :ansible-option-choices-entry:`none` - :ansible-option-choices-entry:`use\_selected\_http\_proxy` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-ignorable_content: .. rst-class:: ansible-option-title **ignorable_content** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
List of content units to ignore while syncing a yum repository. Must be subset of rpm,drpm,srpm,distribution,erratum. .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-ignore_global_proxy: .. rst-class:: ansible-option-title **ignore_global_proxy** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`boolean` .. raw:: html
- .. raw:: html
Whether content sync should use or ignore the global http proxy setting This is deprecated with Katello 3.13 It has been superseeded by \ :emphasis:`http\_proxy\_policy`\ .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`no` - :ansible-option-choices-entry:`yes` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-label: .. rst-class:: ansible-option-title **label** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
label of the repository .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-mirror_on_sync: .. rst-class:: ansible-option-title **mirror_on_sync** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`boolean` .. raw:: html
- .. raw:: html
toggle "mirror on sync" where the state of the repository mirrors that of the upstream repository at sync time .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`no` - :ansible-option-default-bold:`yes` :ansible-option-default:`← (default)` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-name: .. rst-class:: ansible-option-title **name** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` / :ansible-option-required:`required` .. raw:: html
- .. raw:: html
Name of the repository .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-organization: .. rst-class:: ansible-option-title **organization** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` / :ansible-option-required:`required` .. raw:: html
- .. raw:: html
Organization that the entity is in .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-os_versions: .. rst-class:: ansible-option-title **os_versions** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
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 \ :literal:`[]`\ to disable filtering again. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`rhel-6` - :ansible-option-choices-entry:`rhel-7` - :ansible-option-choices-entry:`rhel-8` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-password: .. rst-class:: ansible-option-title **password** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` / :ansible-option-required:`required` .. raw:: html
- .. raw:: html
Password of the user accessing the Foreman server. If the value is not specified in the task, the value of environment variable \ :literal:`FOREMAN\_PASSWORD`\ will be used instead. .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-product: .. rst-class:: ansible-option-title **product** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` / :ansible-option-required:`required` .. raw:: html
- .. raw:: html
Product to which the repository lives in .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-server_url: .. rst-class:: ansible-option-title **server_url** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` / :ansible-option-required:`required` .. raw:: html
- .. raw:: html
URL of the Foreman server. If the value is not specified in the task, the value of environment variable \ :literal:`FOREMAN\_SERVER\_URL`\ will be used instead. .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-ssl_ca_cert: .. rst-class:: ansible-option-title **ssl_ca_cert** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Repository SSL CA certificate .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-ssl_client_cert: .. rst-class:: ansible-option-title **ssl_client_cert** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Repository SSL client certificate .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-ssl_client_key: .. rst-class:: ansible-option-title **ssl_client_key** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Repository SSL client private key .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-state: .. rst-class:: ansible-option-title **state** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
State of the entity \ :literal:`present\_with\_defaults`\ will ensure the entity exists, but won't update existing ones .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-default-bold:`present` :ansible-option-default:`← (default)` - :ansible-option-choices-entry:`present\_with\_defaults` - :ansible-option-choices-entry:`absent` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-unprotected: .. rst-class:: ansible-option-title **unprotected** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`boolean` .. raw:: html
- .. raw:: html
publish the repository via HTTP .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`no` - :ansible-option-choices-entry:`yes` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-upstream_password: .. rst-class:: ansible-option-title **upstream_password** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
password to access upstream repository .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-upstream_username: .. rst-class:: ansible-option-title **upstream_username** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
username to access upstream repository .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-url: .. rst-class:: ansible-option-title **url** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Repository URL to sync from .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-username: .. rst-class:: ansible-option-title **username** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` / :ansible-option-required:`required` .. raw:: html
- .. raw:: html
Username accessing the Foreman server. If the value is not specified in the task, the value of environment variable \ :literal:`FOREMAN\_USERNAME`\ will be used instead. .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-validate_certs: .. rst-class:: ansible-option-title **validate_certs** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`boolean` .. raw:: html
- .. raw:: html
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 \ :literal:`FOREMAN\_VALIDATE\_CERTS`\ will be used instead. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`no` - :ansible-option-default-bold:`yes` :ansible-option-default:`← (default)` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-verify_ssl_on_sync: .. rst-class:: ansible-option-title **verify_ssl_on_sync** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`boolean` .. raw:: html
- .. raw:: html
verify the upstream certifcates are signed by a trusted CA .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`no` - :ansible-option-choices-entry:`yes` .. raw:: html
.. Attributes .. Notes Notes ----- .. note:: - You can configure certain aspects of existing Red Hat Repositories (like \ :emphasis:`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 \ :ref:`theforeman.foreman.repository\_set `\ module instead. .. Seealso .. Examples Examples -------- .. code-block:: yaml+jinja - 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 .. Facts .. Return values Return Values ------------- Common return values are documented :ref:`here `, the following are the fields unique to this module: .. rst-class:: ansible-option-table .. list-table:: :width: 100% :widths: auto :header-rows: 1 * - Key - Description * - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__return-entity: .. rst-class:: ansible-option-title **entity** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`dictionary` .. raw:: html
- .. raw:: html
Final state of the affected entities grouped by their type. .. rst-class:: ansible-option-line :ansible-option-returned-bold:`Returned:` success .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__return-entity/repositories: .. rst-class:: ansible-option-title **repositories** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary` .. raw:: html
- .. raw:: html
List of repositories. .. rst-class:: ansible-option-line :ansible-option-returned-bold:`Returned:` success .. raw:: html
.. Status (Presently only deprecated) .. Authors Authors ~~~~~~~ - Eric D Helms (@ehelms) .. Parsing errors