katello_activation_key – Create and Manage Katello activation keys

Synopsis

  • Create and Manage Katello activation keys

Requirements

The below requirements are needed on the host that executes this module.

  • apypie

Parameters

Parameter Choices/Defaults Comments
auto_attach
boolean
    Choices:
  • no
  • yes
Set Auto-Attach on or off
content_overrides
list / elements=dictionary
List of content overrides that include label and override state ('enabled', 'disabled' or 'default')
label
string / required
Label of the content override
override
string / required
    Choices:
  • enabled
  • disabled
  • default
Override value
content_view
string
Name of the content view
host_collections
list / elements=string
List of host collections to add to activation key
lifecycle_environment
string
Name of the lifecycle environment
max_hosts
integer
Maximum number of registered content hosts.
Required if unlimited_hosts=false
name
string / required
Name of the activation key
new_name
string
Name of the new activation key when state == copied
organization
string / required
Organization that the entity is in
password
string / required
Password of the user accessing the Foreman server
purpose_addons
list / elements=string
Sets the system purpose add-ons
purpose_role
string
Sets the system purpose role
purpose_usage
string
Sets the system purpose usage
release_version
string
Set the content release version
server_url
string / required
URL of the Foreman server
service_level
string
    Choices:
  • Self-Support
  • Standard
  • Premium
Set the service level
state
string
    Choices:
  • present ←
  • present_with_defaults
  • absent
  • copied
State of the Activation Key
If copied the key will be copied to a new one with new_name as the name and all other fields left untouched
present_with_defaults will ensure the entity exists, but won't update existing ones
subscriptions
list / elements=dictionary
List of subscriptions that include either Name or Pool ID.
Pool IDs are preferred since Names are not unique and the module will fail if it finds more than one subscription with the same name.
name
string
Name of the Subscription to be added.
Mutually exclusive with pool_id.
pool_id
string
Pool ID of the Subscription to be added.
Mutually exclusive with name.
unlimited_hosts
boolean
    Choices:
  • no
  • yes
Can the activation key have unlimited hosts
username
string / required
Username accessing the Foreman server
validate_certs
boolean
    Choices:
  • no
  • yes ←
Whether or not to verify the TLS certificates of the Foreman server

aliases: verify_ssl

Examples

- name: "Create katello client activation key"
  katello_activation_key:
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    name: "Katello Clients"
    organization: "Default Organization"
    lifecycle_environment: "Library"
    content_view: 'client content view'
    host_collections:
        - rhel7-servers
        - rhel7-production
    subscriptions:
      - pool_id: "8a88e9826db22df5016dd018abdd029b"
      - pool_id: "8a88e9826db22df5016dd01a23270344"
      - name: "Red Hat Enterprise Linux"
    content_overrides:
        - label: rhel-7-server-optional-rpms
          override: enabled
    auto_attach: False
    release_version: 7Server
    service_level: Standard

Status

Authors

  • Andrew Kofink (@akofink)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.