theforeman / theforeman.foreman / 4.0.0 / module / repository Manage Repositories | "added in version" 1.0.0 of theforeman.foreman" Authors: Eric D Helms (@ehelms)theforeman.foreman.repository (4.0.0) — module
Install with ansible-galaxy collection install theforeman.foreman:==4.0.0
collections: - name: theforeman.foreman version: 4.0.0
Create and manage repositories
- 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
url: description: - Repository URL to sync from required: false type: str arch: description: - Architecture of content in the repository - Set to C(noarch) to disable the architecture restriction again. required: false type: str name: description: - Name of the repository required: true type: str label: description: - label of the repository type: str state: choices: - present - present_with_defaults - absent default: present description: - State of the entity - C(present_with_defaults) will ensure the entity exists, but won't update existing ones type: str gpg_key: description: - Repository GPG key required: false type: str product: description: - Product to which the repository lives in required: true type: str password: description: - Password of the user accessing the Foreman server. - If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead. required: true type: str username: description: - Username accessing the Foreman server. - If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead. required: true type: str http_proxy: description: - Name of the http proxy to use for content synching - Should be combined with I(http_proxy_policy='use_selected_http_proxy') required: false type: str server_url: description: - URL of the Foreman server. - If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead. required: true type: str description: description: - Description of the repository required: false type: str os_versions: choices: - rhel-6 - rhel-7 - rhel-8 - rhel-9 description: - 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 C([]) to disable filtering again. elements: str required: false type: list ssl_ca_cert: description: - Repository SSL CA certificate required: false type: str unprotected: description: - publish the repository via HTTP required: false type: bool auto_enabled: description: - repositories will be automatically enabled on a registered host subscribed to this product required: false type: bool content_type: choices: - deb - docker - file - ostree - puppet - yum - ansible_collection description: - The content type of the repository required: true type: str deb_releases: description: - comma separated list of releases to be synced from deb-archive - only available for I(content_type=deb) type: str exclude_tags: description: - List of tags to exclude when syncing a container image repository. elements: str required: false type: list version_added: 3.7.0 version_added_collection: theforeman.foreman include_tags: description: - List of tags to sync for a container image repository. elements: str required: false type: list version_added: 3.7.0 version_added_collection: theforeman.foreman organization: description: - Organization that the entity is in required: true type: str checksum_type: choices: - sha1 - sha256 description: - Checksum of the repository required: false type: str deb_components: description: - comma separated list of repo components to be synced from deb-archive - only available for I(content_type=deb) type: str deb_errata_url: description: - URL to sync Debian or Ubuntu errata information from - only available on Orcharhino - only available for I(content_type=deb) required: false type: str mirror_on_sync: description: - 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 I(mirroring_policy=mirror_content_only) required: false type: bool ssl_client_key: description: - Repository SSL client private key required: false type: str validate_certs: default: true description: - 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 C(FOREMAN_VALIDATE_CERTS) will be used instead. type: bool download_policy: choices: - background - immediate - on_demand description: - The download policy for sync from upstream. - The download policy C(background) is deprecated and not available since Katello 4.3. required: false type: str ssl_client_cert: description: - Repository SSL client certificate required: false type: str mirroring_policy: choices: - additive - mirror_content_only - mirror_complete description: - Policy to set for mirroring content - Supported since Katello 4.3 type: str deb_architectures: description: - comma separated list of architectures to be synced from deb-archive - only available for I(content_type=deb) type: str http_proxy_policy: choices: - global_default_http_proxy - none - use_selected_http_proxy description: - Which proxy to use for content synching required: false type: str ignorable_content: description: - List of content units to ignore while syncing a yum repository. - Must be subset of rpm,drpm,srpm,distribution,erratum. elements: str required: false type: list upstream_password: description: - Password to access upstream repository. - When this parameter is set, the module will not be idempotent. type: str upstream_username: description: - username to access upstream repository type: str verify_ssl_on_sync: description: - verify the upstream certifcates are signed by a trusted CA required: false type: bool ignore_global_proxy: description: - Whether content sync should use or ignore the global http proxy setting - This is deprecated with Katello 3.13 - It has been superseeded by I(http_proxy_policy) required: false type: bool docker_upstream_name: description: - name of the upstream docker repository - only available for I(content_type=docker) type: str download_concurrency: description: - download concurrency for sync from upstream - as the API does not return this value, this will break idempotence for this module required: false type: int version_added: 3.0.0 version_added_collection: theforeman.foreman docker_tags_whitelist: description: - list of tags to sync for Container Image repository - only available for I(content_type=docker) - Deprecated since Katello 4.4 elements: str type: list ansible_collection_requirements: description: - Contents of requirement yaml file to sync from URL required: false type: str
entity: contains: repositories: description: List of repositories. elements: dict type: list description: Final state of the affected entities grouped by their type. returned: success type: dict