.. Document meta :orphan: .. |antsibull-internal-nbsp| unicode:: 0xA0 :trim: .. meta:: :antsibull-docs: 2.10.0 .. Anchors .. _ansible_collections.theforeman.foreman.repository_module: .. Anchors: short name for ansible.builtin .. Title theforeman.foreman.repository module -- Manage Repositories +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: This module is part of the `theforeman.foreman collection `_ (version 4.1.0-dev). 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`. You need further requirements to be able to use this module, see :ref:`Requirements ` for details. To use it in a playbook, specify: :code:`theforeman.foreman.repository`. .. version_added .. rst-class:: ansible-version-added New in theforeman.foreman 1.0.0 .. contents:: :local: :depth: 1 .. Deprecated Synopsis -------- .. Description - Create and manage repositories .. Aliases Aliases: katello_repository .. Requirements .. _ansible_collections.theforeman.foreman.repository_module_requirements: Requirements ------------ The below requirements are needed on the host that executes this module. - requests .. Options Parameters ---------- .. tabularcolumns:: \X{1}{3}\X{2}{3} .. list-table:: :width: 100% :widths: auto :header-rows: 1 :class: longtable ansible-option-table * - Parameter - Comments * - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-ansible_collection_requirements: .. rst-class:: ansible-option-title **ansible_collection_requirements** .. raw:: html .. 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 .. 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 .. 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:`false` - :ansible-option-choices-entry:`true` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-checksum_type: .. rst-class:: ansible-option-title **checksum_type** .. raw:: html .. 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 .. 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 .. 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 .. 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 .. 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 .. 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 .. 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 .. 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`\ Deprecated since Katello 4.4 .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-docker_upstream_name: .. rst-class:: ansible-option-title **docker_upstream_name** .. raw:: html .. 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 .. ansible-option-type-line:: :ansible-option-type:`integer` :ansible-option-versionadded:`added in theforeman.foreman 3.0.0` .. 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 .. ansible-option-type-line:: :ansible-option-type:`string` .. raw:: html
- .. raw:: html
The download policy for sync from upstream. The download policy \ :literal:`background`\ is deprecated and not available since Katello 4.3. .. 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-exclude_tags: .. rst-class:: ansible-option-title **exclude_tags** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`list` / :ansible-option-elements:`elements=string` :ansible-option-versionadded:`added in theforeman.foreman 3.7.0` .. raw:: html
- .. raw:: html
List of tags to exclude when syncing a container image repository. .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-gpg_key: .. rst-class:: ansible-option-title **gpg_key** .. raw:: html .. 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 .. 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 .. 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 .. 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 .. 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:`false` - :ansible-option-choices-entry:`true` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-include_tags: .. rst-class:: ansible-option-title **include_tags** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`list` / :ansible-option-elements:`elements=string` :ansible-option-versionadded:`added in theforeman.foreman 3.7.0` .. raw:: html
- .. raw:: html
List of tags to sync for a container image repository. .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-label: .. rst-class:: ansible-option-title **label** .. raw:: html .. 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 .. 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 This is deprecated with Katello 4.3 It has been superseeded by \ :emphasis:`mirroring\_policy=mirror\_content\_only`\ .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`false` - :ansible-option-choices-entry:`true` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-mirroring_policy: .. rst-class:: ansible-option-title **mirroring_policy** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Policy to set for mirroring content Supported since Katello 4.3 .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`"additive"` - :ansible-option-choices-entry:`"mirror\_content\_only"` - :ansible-option-choices-entry:`"mirror\_complete"` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-name: .. rst-class:: ansible-option-title **name** .. raw:: html .. 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 .. 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 .. 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"` - :ansible-option-choices-entry:`"rhel-9"` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-password: .. rst-class:: ansible-option-title **password** .. raw:: html .. 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 .. 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 .. 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 .. 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 .. 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 .. 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 .. 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-choices-entry-default:`"present"` :ansible-option-choices-default-mark:`← (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 .. 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:`false` - :ansible-option-choices-entry:`true` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-upstream_password: .. rst-class:: ansible-option-title **upstream_password** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Password to access upstream repository. When this parameter is set, the module will not be idempotent. .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__parameter-upstream_username: .. rst-class:: ansible-option-title **upstream_username** .. raw:: html .. 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 .. 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 .. 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 .. 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:`false` - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (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 .. 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:`false` - :ansible-option-choices-entry:`true` .. raw:: html
.. Attributes Attributes ---------- .. tabularcolumns:: \X{2}{10}\X{3}{10}\X{5}{10} .. list-table:: :width: 100% :widths: auto :header-rows: 1 :class: longtable ansible-option-table * - Attribute - Support - Description * - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__attribute-check_mode: .. rst-class:: ansible-option-title **check_mode** .. raw:: html .. raw:: html
- .. raw:: html
:ansible-attribute-support-label:`Support: \ `\ :ansible-attribute-support-full:`full` .. raw:: html
- .. raw:: html
Can run in check\_mode and return changed status prediction without modifying the entity .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__attribute-diff_mode: .. rst-class:: ansible-option-title **diff_mode** .. raw:: html .. raw:: html
- .. raw:: html
:ansible-attribute-support-label:`Support: \ `\ :ansible-attribute-support-full:`full` .. raw:: html
- .. raw:: html
Will return details on what has changed (or possibly needs changing in check\_mode), when in diff mode .. raw:: html
.. 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: immediate - 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: on_demand 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: .. tabularcolumns:: \X{1}{3}\X{2}{3} .. list-table:: :width: 100% :widths: auto :header-rows: 1 :class: longtable ansible-option-table * - Key - Description * - .. raw:: html
.. _ansible_collections.theforeman.foreman.repository_module__return-entity: .. rst-class:: ansible-option-title **entity** .. raw:: html .. 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
.. raw:: latex \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} .. _ansible_collections.theforeman.foreman.repository_module__return-entity/repositories: .. rst-class:: ansible-option-title **repositories** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary` .. raw:: html
.. raw:: latex \end{minipage} - .. 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) .. Extra links Collection links ~~~~~~~~~~~~~~~~ .. ansible-links:: - title: "Issue Tracker" url: "https://github.com/theforeman/foreman-ansible-modules/issues" external: true - title: "Homepage" url: "https://theforeman.org/" external: true - title: "Repository (Sources)" url: "https://github.com/theforeman/foreman-ansible-modules" external: true .. Parsing errors