theforeman.foreman.content_export_info (4.0.0) — module

List content exports

| "added in version" 3.5.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

List information about content exports.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "List all full exports in the organization"
  theforeman.foreman.content_export_info:
    organization: "Default Organization"
    type: complete
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Get a specific export history and register the result for the next task"
  vars:
    organization_name: "Export Org"
  theforeman.foreman.content_export_info:
    id: 29
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    organization: "Default Organization"
  register: result
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Write metadata.json to disk using data from the previous task"
  vars:
    metadata: "{{ result['content_exports'][0]['metadata'] }}"
  ansible.builtin.copy:
    content: "{{ metadata }}"
    dest: ./metadata.json
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "List all exports of a specific content view version"
  theforeman.foreman.content_export_info:
    content_view: RHEL8
    content_view_version: '1.0'
    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: "List all exports marked for a specific destination server"
  theforeman.foreman.content_export_info:
    destination_server: "airgapped.example.com"
    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: "List incremental exports of a specific content view version marked for a specific destination server"
  theforeman.foreman.content_export_info:
    content_view: RHEL8
    destination_server: "airgapped.example.com"
    type: incremental
    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: "List all exports of a specific content view marked for a specific destination server"
  theforeman.foreman.content_export_info:
    content_view: RHEL8
    destination_server: "airgapped.example.com"
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    organization: "Default Organization"

Inputs

    
id:
    description:
    - Export history identifier.
    required: false
    type: int

type:
    choices:
    - complete
    - incremental
    description:
    - Specify complete or incremental exports.
    required: false
    type: str

search:
    description:
    - Search query to use
    - If None, all resources are returned.
    type: str

location:
    description:
    - Label of the Location to scope the search for.
    required: false
    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

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

content_view:
    description:
    - Content view name.
    required: false
    type: str

organization:
    description:
    - Name of the Organization to scope the search for.
    required: true
    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

destination_server:
    description:
    - Destination server name
    required: false
    type: str

content_view_version:
    description:
    - Content view version.
    required: false
    type: str