theforeman.foreman.content_export_repository (4.0.0) — module

Manage repository content exports

| "added in version" 3.6.0 of theforeman.foreman"

Authors: Jeremy Lenz (@jeremylenz)

Install collection

Install with ansible-galaxy collection install theforeman.foreman:==4.0.0


Add to requirements.yml

  collections:
    - name: theforeman.foreman
      version: 4.0.0

Description

Export repository content to a directory.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Export repository (full)"
  theforeman.foreman.content_export_repository:
    product: "Example Product"
    repository: "Example Repository"
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    organization: "Default Organization"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Export repository (full) in chunks of 10 GB"
  theforeman.foreman.content_export_repository:
    product: "Example Product"
    repository: "Example Repository"
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    organization: "Default Organization"
    chunk_size_gb: 10
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Export repository (incremental) since the most recent export"
  theforeman.foreman.content_export_repository:
    product: "Example Product"
    repository: "Example Repository"
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    organization: "Default Organization"
    incremental: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Export repository (incremental) since a specific export"
  theforeman.foreman.content_export_repository:
    product: "Example Product"
    repository: "Example Repository"
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    organization: "Default Organization"
    incremental: true
    from_history_id: 12345

Inputs

    
format:
    choices:
    - syncable
    - importable
    description:
    - Export format.
    - Choose C(syncable) if the exported content needs to be in a yum format.
    required: false
    type: str
    version_added: 3.10.0
    version_added_collection: theforeman.foreman

product:
    description:
    - Name of the product that the repository belongs to.
    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

repository:
    description:
    - Name of the repository to export.
    required: true
    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

incremental:
    description:
    - Export only the content that has changed since the last export.
    required: false
    type: bool

organization:
    description:
    - Organization that the entity is in
    required: true
    type: str

chunk_size_gb:
    description:
    - Split the exported content into archives no greater than the specified size in gigabytes.
    required: false
    type: int

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

from_history_id:
    description:
    - Export history identifier used for incremental export. If not provided the most
      recent export history will be used.
    required: false
    type: int