theforeman.foreman.activation_key – Manage Activation Keys
Note
This plugin is part of the theforeman.foreman collection (version 2.2.0).
You might already have this collection installed if you are using the ansible
package.
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
.
To use it in a playbook, specify: theforeman.foreman.activation_key
.
New in version 1.0.0: of theforeman.foreman
Parameters
Parameter |
Comments |
---|---|
Set Auto-Attach on or off Choices:
|
|
List of content overrides that include label and override state (‘enabled’, ‘disabled’ or ‘default’) |
|
Label of the content override |
|
Override value 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. |
|
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:
|
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
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
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 |
Authors
Andrew Kofink (@akofink)