` 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_auth_token:
      .. rst-class:: ansible-option-title
      **ansible_collection_auth_token**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`string`
      :ansible-option-versionadded:`added in theforeman.foreman 5.5.0`
      .. raw:: html
        
 
    - .. raw:: html
        
      The token key to use for authentication.
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.repository_module__parameter-ansible_collection_auth_url:
      .. rst-class:: ansible-option-title
      **ansible_collection_auth_url**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`string`
      :ansible-option-versionadded:`added in theforeman.foreman 5.5.0`
      .. raw:: html
        
 
    - .. raw:: html
        
      The URL to receive a session token from, e.g. used with Automation Hub.
      .. raw:: html
        
  * - .. 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-ca_path:
      .. rst-class:: ansible-option-title
      **ca_path**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`path`
      .. raw:: html
        
 
    - .. raw:: html
        
      PEM formatted file that contains a CA certificate to be used for validation.
      If the value is not specified in the task, the value of environment variable :literal:`FOREMAN\_CA\_PATH` will be used instead.
      .. 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"`
      - :ansible-option-choices-entry:`"python"`
      .. 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-depth:
      .. rst-class:: ansible-option-title
      **depth**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`integer`
      :ansible-option-versionadded:`added in theforeman.foreman 5.5.0`
      .. raw:: html
        
 
    - .. raw:: html
        
      An option to specify how many ostree commits to traverse.
      .. 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_refs:
      .. rst-class:: ansible-option-title
      **exclude_refs**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`list` / :ansible-option-elements:`elements=string`
      :ansible-option-versionadded:`added in theforeman.foreman 5.5.0`
      .. raw:: html
        
 
    - .. raw:: html
        
      List of tags to exclude during an ostree sync.
      The wildcards :literal:`\*`\ , :literal:`?` are recognized.
      :literal:`exclude\_refs` is evaluated after :literal:`include\_refs`.
      .. 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-excludes:
      .. rst-class:: ansible-option-title
      **excludes**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`list` / :ansible-option-elements:`elements=string`
      :ansible-option-versionadded:`added in theforeman.foreman 5.5.0`
      .. raw:: html
        
 
    - .. raw:: html
        
      Python packages to exclude from the upstream URL.
      You may also specify versions, for example: :literal:`django~=2.0`.
      .. 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_refs:
      .. rst-class:: ansible-option-title
      **include_refs**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`list` / :ansible-option-elements:`elements=string`
      :ansible-option-versionadded:`added in theforeman.foreman 5.5.0`
      .. raw:: html
        
 
    - .. raw:: html
        
      List of refs to include during an ostree sync.
      The wildcards :literal:`\*`\ , :literal:`?` are recognized.
      .. 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-includes:
      .. rst-class:: ansible-option-title
      **includes**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`list` / :ansible-option-elements:`elements=string`
      :ansible-option-versionadded:`added in theforeman.foreman 5.5.0`
      .. raw:: html
        
 
    - .. raw:: html
        
      Python packages to include from the upstream URL,
      You may also specify versions, for example: :literal:`django~=2.0`.
      Leave empty to include every package.
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.repository_module__parameter-keep_latest_packages:
      .. rst-class:: ansible-option-title
      **keep_latest_packages**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`integer`
      :ansible-option-versionadded:`added in theforeman.foreman 5.5.0`
      .. raw:: html
        
 
    - .. raw:: html
        
      The amount of latest versions of a package to keep on sync, includes pre\-releases if synced.
      Defaults to keep all versions.
      .. 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-metadata_expire:
      .. rst-class:: ansible-option-title
      **metadata_expire**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`integer`
      :ansible-option-versionadded:`added in theforeman.foreman 5.4.0`
      .. raw:: html
        
 
    - .. raw:: html
        
      Set the metadata expiration time (in seconds) for a yum 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"`
      - :ansible-option-choices-entry:`"rhel\-10"`
      .. raw:: html
        
  * - .. raw:: html
        
        
      .. _ansible_collections.theforeman.foreman.repository_module__parameter-package_types:
      .. rst-class:: ansible-option-title
      **package_types**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`list` / :ansible-option-elements:`elements=string`
      :ansible-option-versionadded:`added in theforeman.foreman 5.5.0`
      .. raw:: html
        
 
    - .. raw:: html
        
      Package types to sync for Python content, separated by comma. FIXME
      Leave empty to get every package type.
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry:`"bdist\_dmg"`
      - :ansible-option-choices-entry:`"bdist\_dumb"`
      - :ansible-option-choices-entry:`"bdist\_egg"`
      - :ansible-option-choices-entry:`"bdist\_msi"`
      - :ansible-option-choices-entry:`"bdist\_rpm"`
      - :ansible-option-choices-entry:`"bdist\_wheel"`
      - :ansible-option-choices-entry:`"bdist\_wininst"`
      - :ansible-option-choices-entry:`"sdist"`
      .. 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`
      .. 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-retain_package_versions_count:
      .. rst-class:: ansible-option-title
      **retain_package_versions_count**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`integer`
      :ansible-option-versionadded:`added in theforeman.foreman 5.4.0`
      .. raw:: html
        
 
    - .. raw:: html
        
      The maximum number of versions of each package to keep.
      .. 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_authentication_token:
      .. rst-class:: ansible-option-title
      **upstream_authentication_token**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`string`
      :ansible-option-versionadded:`added in theforeman.foreman 5.5.0`
      .. raw:: html
        
 
    - .. raw:: html
        
      Upstream authentication token string for yum repositories.
      .. 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-use_gssapi:
      .. rst-class:: ansible-option-title
      **use_gssapi**
      .. raw:: html
        
      .. ansible-option-type-line::
        :ansible-option-type:`boolean`
      .. raw:: html
        
 
    - .. raw:: html
        
      Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication.
      Requires the Python library \ `requests\-gssapi `__ to be installed.
      If the value is not specified in the task, the value of environment variable :literal:`FOREMAN\_USE\_GSSAPI` will be used instead.
      .. rst-class:: ansible-option-line
      :ansible-option-choices:`Choices:`
      - :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)`
      - :ansible-option-choices-entry:`true`
      .. 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`
      .. 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