ansible.builtin.katello (v2.3.3.0-1) — module

Manage Katello Resources

| "added in version" 2.3 of ansible.builtin"

Authors: Eric D Helms (@ehelms)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.3.3.0.post1

Description

Allows the management of Katello resources inside your Foreman server


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
---
# Simple Example:

- name: "Create Product"
  local_action:
      module: katello
      username: "admin"
      password: "admin"
      server_url: "https://fakeserver.com"
      entity: "product"
      params:
        name: "Centos 7"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
---
# Simple Example:

- name: "Create Product"
  local_action:
      module: katello
      username: "admin"
      password: "admin"
      server_url: "https://fakeserver.com"
      entity: "product"
      params:
        name: "Centos 7"

# Abstraction Example:
# katello.yml
---
- name: "{{ name }}"
  local_action:
      module: katello
      username: "admin"
      password: "admin"
      server_url: "https://fakeserver.com"
      entity: "{{ entity }}"
      params: "{{ params }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
---
# Simple Example:

- name: "Create Product"
  local_action:
      module: katello
      username: "admin"
      password: "admin"
      server_url: "https://fakeserver.com"
      entity: "product"
      params:
        name: "Centos 7"

# Abstraction Example:
# katello.yml
---
- name: "{{ name }}"
  local_action:
      module: katello
      username: "admin"
      password: "admin"
      server_url: "https://fakeserver.com"
      entity: "{{ entity }}"
      params: "{{ params }}"

# tasks.yml
---
- include: katello.yml
  vars:
    name: "Create Dev Environment"
    entity: "lifecycle_environment"
    params:
      name: "Dev"
      prior: "Library"
      organization: "Default Organization"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- include: katello.yml
  vars:
    name: "Create Centos Product"
    entity: "product"
    params:
      name: "Centos 7"
      organization: "Default Organization"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- include: katello.yml
  vars:
    name: "Create 7.2 Repository"
    entity: "repository"
    params:
      name: "Centos 7.2"
      product: "Centos 7"
      organization: "Default Organization"
      content_type: "yum"
      url: "http://mirror.centos.org/centos/7/os/x86_64/"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- include: katello.yml
  vars:
      name: "Create Centos 7 View"
      entity: "content_view"
      params:
        name: "Centos 7 View"
        organization: "Default Organization"
        repositories:
          - name: "Centos 7.2"
            product: "Centos 7"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- include: katello.yml
  vars:
      name: "Enable RHEL Product"
      entity: "repository_set"
      params:
        name: "Red Hat Enterprise Linux 7 Server (RPMs)"
        product: "Red Hat Enterprise Linux Server"
        organization: "Default Organization"
        basearch: "x86_64"
        releasever: "7"

Inputs

    
entity:
    description:
    - The Foreman resource that the action will be performed on (e.g. organization, host)
    required: true

params:
    description:
    - Parameters associated to the entity resource to set or edit in dictionary format
      (e.g. name, description)
    required: true

password:
    description:
    - Password for user accessing Foreman server
    required: true

username:
    description:
    - Username on Foreman server
    required: true

server_url:
    description:
    - URL of Foreman server
    required: true