theforeman.foreman.activation_key module – Manage Activation Keys
Note
This module is part of the theforeman.foreman collection (version 4.2.0).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install theforeman.foreman
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: theforeman.foreman.activation_key
.
New in theforeman.foreman 1.0.0
Synopsis
Create and manage activation keys
Aliases: katello_activation_key
Requirements
The below requirements are needed on the host that executes this module.
requests
Parameters
Parameter |
Comments |
---|---|
Set Auto-Attach on or off Choices:
|
|
List of content overrides that include label and override state Label refers to repository Override state (‘enabled’, ‘disabled’, or ‘default’) sets initial state of repository for newly registered hosts |
|
Repository |
|
Override value to use for the repository when registering hosts with the activation key Choices:
|
|
Name of the content view |
|
Description of the activation key |
|
List of host collections to add to activation key |
|
Name of the lifecycle environment |
|
Maximum number of registered content hosts. Required if unlimited_hosts=false |
|
Name of the activation key |
|
Name of the new activation key when state == copied |
|
Organization that the entity is in |
|
Password of the user accessing the Foreman server. If the value is not specified in the task, the value of environment variable |
|
Sets the system purpose add-ons |
|
Sets the system purpose role |
|
Sets the system purpose usage |
|
Set the content release version |
|
URL of the Foreman server. If the value is not specified in the task, the value of environment variable |
|
Set the service level Choices:
|
|
State of the Activation Key If
Choices:
|
|
List of subscriptions that include either Name, Pool ID, or Upstream Pool ID. Pool IDs are preferred since Names and Upstream Pool IDs are not guaranteed to be unique. The module will fail if it finds more than one match. This parameter is not supported in SCA mode. |
|
Name of the Subscription to be added. Mutually exclusive with pool_id and upstream_pool_id. |
|
Pool ID of the Subscription to be added. Mutually exclusive with name and upstream_pool_id. Also named it is as well the |
|
Upstream Pool ID of the Subscription to be added. Mutually exclusive with name and pool_id. Also named |
|
Can the activation key have unlimited hosts Choices:
|
|
Username accessing the Foreman server. If the value is not specified in the task, the value of environment variable |
|
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 Choices:
|
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in check_mode and return changed status prediction without modifying the entity |
|
Support: full |
Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode |
Examples
- name: "Create client activation key"
theforeman.foreman.activation_key:
username: "admin"
password: "changeme"
server_url: "https://foreman.example.com"
name: "Clients"
organization: "Default Organization"
lifecycle_environment: "Library"
content_view: 'client content view'
host_collections:
- rhel7-servers
- rhel7-production
content_overrides:
- label: rhel-7-server-optional-rpms
override: enabled
auto_attach: false
release_version: 7Server
service_level: Standard
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Final state of the affected entities grouped by their type. Returned: success |
|
List of activation keys. Returned: success |