.. Document meta :orphan: .. |antsibull-internal-nbsp| unicode:: 0xA0 :trim: .. role:: ansible-attribute-support-label .. role:: ansible-attribute-support-property .. role:: ansible-attribute-support-full .. role:: ansible-attribute-support-partial .. role:: ansible-attribute-support-none .. role:: ansible-attribute-support-na .. role:: ansible-option-type .. role:: ansible-option-elements .. role:: ansible-option-required .. role:: ansible-option-versionadded .. role:: ansible-option-aliases .. role:: ansible-option-choices .. role:: ansible-option-choices-entry .. role:: ansible-option-default .. role:: ansible-option-default-bold .. role:: ansible-option-configuration .. role:: ansible-option-returned-bold .. role:: ansible-option-sample-bold .. Anchors .. _ansible_collections.theforeman.foreman.activation_key_module: .. Anchors: short name for ansible.builtin .. Anchors: aliases .. Title theforeman.foreman.activation_key module -- Manage Activation Keys ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: This module is part of the `theforeman.foreman collection `_ (version 3.4.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 :code:`ansible-galaxy collection list`. To install it, use: :code:`ansible-galaxy collection install theforeman.foreman`. To use it in a playbook, specify: :code:`theforeman.foreman.activation_key`. .. version_added .. versionadded:: 1.0.0 of theforeman.foreman .. contents:: :local: :depth: 1 .. Deprecated Synopsis -------- .. Description - Create and manage activation keys .. Aliases .. Requirements Requirements ------------ The below requirements are needed on the host that executes this module. - requests .. Options Parameters ---------- .. rst-class:: ansible-option-table .. list-table:: :width: 100% :widths: auto :header-rows: 1 * - Parameter - Comments * - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-auto_attach: .. rst-class:: ansible-option-title **auto_attach** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`boolean` .. raw:: html
- .. raw:: html
Set Auto-Attach on or off .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`no` - :ansible-option-choices-entry:`yes` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-content_overrides: .. rst-class:: ansible-option-title **content_overrides** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary` .. raw:: html
- .. raw:: html
List of content overrides that include label and override state Label refers to repository \ :literal:`content\_label`\ , e.g. rhel-7-server-rpms Override state ('enabled', 'disabled', or 'default') sets initial state of repository for newly registered hosts .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-content_overrides/label: .. rst-class:: ansible-option-title **label** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` / :ansible-option-required:`required` .. raw:: html
- .. raw:: html
Repository \ :literal:`content\_label`\ to override when registering hosts with the activation key .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-content_overrides/override: .. rst-class:: ansible-option-title **override** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` / :ansible-option-required:`required` .. raw:: html
- .. raw:: html
Override value to use for the repository when registering hosts with the activation key .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`enabled` - :ansible-option-choices-entry:`disabled` - :ansible-option-choices-entry:`default` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-content_view: .. rst-class:: ansible-option-title **content_view** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Name of the content view .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-description: .. rst-class:: ansible-option-title **description** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Description of the activation key .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-host_collections: .. rst-class:: ansible-option-title **host_collections** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
List of host collections to add to activation key .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-lifecycle_environment: .. rst-class:: ansible-option-title **lifecycle_environment** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Name of the lifecycle environment .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-max_hosts: .. rst-class:: ansible-option-title **max_hosts** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`integer` .. raw:: html
- .. raw:: html
Maximum number of registered content hosts. Required if \ :emphasis:`unlimited\_hosts=false`\ .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-name: .. rst-class:: ansible-option-title **name** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` / :ansible-option-required:`required` .. raw:: html
- .. raw:: html
Name of the activation key .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-new_name: .. rst-class:: ansible-option-title **new_name** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Name of the new activation key when state == copied .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-organization: .. rst-class:: ansible-option-title **organization** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` / :ansible-option-required:`required` .. raw:: html
- .. raw:: html
Organization that the entity is in .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-password: .. rst-class:: ansible-option-title **password** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` / :ansible-option-required:`required` .. raw:: html
- .. raw:: html
Password of the user accessing the Foreman server. If the value is not specified in the task, the value of environment variable \ :literal:`FOREMAN\_PASSWORD`\ will be used instead. .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-purpose_addons: .. rst-class:: ansible-option-title **purpose_addons** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
Sets the system purpose add-ons .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-purpose_role: .. rst-class:: ansible-option-title **purpose_role** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Sets the system purpose role .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-purpose_usage: .. rst-class:: ansible-option-title **purpose_usage** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Sets the system purpose usage .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-release_version: .. rst-class:: ansible-option-title **release_version** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Set the content release version .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-server_url: .. rst-class:: ansible-option-title **server_url** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` / :ansible-option-required:`required` .. raw:: html
- .. raw:: html
URL of the Foreman server. If the value is not specified in the task, the value of environment variable \ :literal:`FOREMAN\_SERVER\_URL`\ will be used instead. .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-service_level: .. rst-class:: ansible-option-title **service_level** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Set the service level .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`Self-Support` - :ansible-option-choices-entry:`Standard` - :ansible-option-choices-entry:`Premium` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-state: .. rst-class:: ansible-option-title **state** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
State of the Activation Key If \ :literal:`copied`\ the key will be copied to a new one with \ :emphasis:`new\_name`\ as the name and all other fields left untouched \ :literal:`present\_with\_defaults`\ will ensure the entity exists, but won't update existing ones .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-default-bold:`present` :ansible-option-default:`← (default)` - :ansible-option-choices-entry:`present\_with\_defaults` - :ansible-option-choices-entry:`absent` - :ansible-option-choices-entry:`copied` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-subscriptions: .. rst-class:: ansible-option-title **subscriptions** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary` .. raw:: html
- .. raw:: html
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. .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-subscriptions/name: .. rst-class:: ansible-option-title **name** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Name of the Subscription to be added. Mutually exclusive with \ :emphasis:`pool\_id`\ and \ :emphasis:`upstream\_pool\_id`\ . .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-subscriptions/pool_id: .. rst-class:: ansible-option-title **pool_id** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Pool ID of the Subscription to be added. Mutually exclusive with \ :emphasis:`name`\ and \ :emphasis:`upstream\_pool\_id`\ . Also named \ :literal:`Candlepin Id`\ in the CSV export of the subscriptions, it is as well the \ :literal:`UUID`\ as output by \ :literal:`hammer subscription list`\ . .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-subscriptions/upstream_pool_id: .. rst-class:: ansible-option-title **upstream_pool_id** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Upstream Pool ID of the Subscription to be added. Mutually exclusive with \ :emphasis:`name`\ and \ :emphasis:`pool\_id`\ . Also named \ :literal:`Master Pools`\ in the Red Hat Portal. .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-unlimited_hosts: .. rst-class:: ansible-option-title **unlimited_hosts** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`boolean` .. raw:: html
- .. raw:: html
Can the activation key have unlimited hosts .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`no` - :ansible-option-choices-entry:`yes` .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-username: .. rst-class:: ansible-option-title **username** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`string` / :ansible-option-required:`required` .. raw:: html
- .. raw:: html
Username accessing the Foreman server. If the value is not specified in the task, the value of environment variable \ :literal:`FOREMAN\_USERNAME`\ will be used instead. .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__parameter-validate_certs: .. rst-class:: ansible-option-title **validate_certs** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`boolean` .. raw:: html
- .. raw:: html
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 \ :literal:`FOREMAN\_VALIDATE\_CERTS`\ will be used instead. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`no` - :ansible-option-default-bold:`yes` :ansible-option-default:`← (default)` .. raw:: html
.. Attributes .. Notes .. Seealso .. Examples Examples -------- .. code-block:: yaml+jinja - 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 .. Facts .. Return values Return Values ------------- Common return values are documented :ref:`here `, the following are the fields unique to this module: .. rst-class:: ansible-option-table .. list-table:: :width: 100% :widths: auto :header-rows: 1 * - Key - Description * - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__return-entity: .. rst-class:: ansible-option-title **entity** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`dictionary` .. raw:: html
- .. raw:: html
Final state of the affected entities grouped by their type. .. rst-class:: ansible-option-line :ansible-option-returned-bold:`Returned:` success .. raw:: html
* - .. raw:: html
.. _ansible_collections.theforeman.foreman.activation_key_module__return-entity/activation_keys: .. rst-class:: ansible-option-title **activation_keys** .. raw:: html .. rst-class:: ansible-option-type-line :ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary` .. raw:: html
- .. raw:: html
List of activation keys. .. rst-class:: ansible-option-line :ansible-option-returned-bold:`Returned:` success .. raw:: html
.. Status (Presently only deprecated) .. Authors Authors ~~~~~~~ - Andrew Kofink (@akofink) .. Extra links Collection links ~~~~~~~~~~~~~~~~ .. raw:: html .. Parsing errors