theforeman.foreman.content_view_filter (4.0.0) — module

Manage Content View Filters

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

Authors: Sean O'Keeffe (@sean797)

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

Create and manage content View filters


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Exclude csh
  theforeman.foreman.content_view_filter:
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    name: "package filter 1"
    organization: "Default Organization"
    content_view: Web Servers
    filter_type: "rpm"
    package_name: tcsh
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Include newer csh versions
  theforeman.foreman.content_view_filter:
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    name: "package filter 1"
    organization: "Default Organization"
    content_view: Web Servers
    filter_type: "rpm"
    package_name: tcsh
    min_version: 6.20.00
    inclusion: true

Inputs

    
name:
    description:
    - Name of the Content View Filter
    required: true
    type: str

state:
    aliases:
    - filter_state
    choices:
    - present
    - absent
    default: present
    description:
    - State of the content view filter
    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

inclusion:
    default: false
    description:
    - Create an include filter
    type: bool

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 Content View Filter
    type: str

filter_type:
    choices:
    - rpm
    - package_group
    - erratum
    - docker
    - modulemd
    - deb
    description:
    - Content view filter type
    required: true
    type: str

content_view:
    description:
    - Name of the content view
    required: true
    type: str

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

repositories:
    default: []
    description:
    - List of repositories that include name and product
    - An empty Array means all current and future repositories
    elements: dict
    type: list

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

original_packages:
    description:
    - Include all RPMs with no errata
    type: bool

original_module_streams:
    description:
    - Include all module streams with no errata
    - Only valid on I(filter_type=modulemd).
    type: bool
    version_added: 3.10.0
    version_added_collection: theforeman.foreman

Outputs

entity:
  contains:
    content_view_filters:
      description: List of content view filters.
      elements: dict
      type: list
  description: Final state of the affected entities grouped by their type.
  returned: success
  type: dict