This role manages custom credential for Ansible Tower, ensuring that other components of the Ansible Tower configuration (e.g.: inventories) have access to what is needed.
A running Ansible Tower with admin permission level access.
Check the top level README for additional/common variables.
The variables used must be defined in the Ansible Inventory using the ansible_tower.credentials
list as explained below.
Variable | Description | Required | Defaults |
---|---|---|---|
ansible_tower.credentials.name | Name to be used for the credential | yes | |
ansible_tower.credentials.description | Description for the credential | no | nothing('') |
ansible_tower.credentials.organization | Name of the existing org to tie these credentials with | yes | |
ansible_tower.credentials.type | Type of credentials ('machine', 'aws', etc) | yes | |
ansible_tower.credentials.inputs | Additional input parameters | no |
Note: Credential configuration will only happen if the ansible_tower.credentials
portion of the dictionary is defined. Likewise, the installation expects this section to be "complete" if specified as it otherwise may error out.
Note: Credential input will only happen if the ansible_tower.credentials.inputs
portion of the dictionary is defined and complete as per Tower Credential Types documentation.
Note: User-defined credentials that are not declared in your inventory will be deleted by default after this role is run. Tower-managed credentials can be identified by a 'managed_by_tower
field returned by the Tower API and cannot be deleted by the user.
---
ansible_tower:
credentials:
- name: "Cred1"
description: "My Credential 1"
organization: "Default"
credential_type: "Machine"
- name: "Cred2"
description: "My Credential 2"
organization: "Default"
credential_type: "Machine"
- name: "Cred3"
description: "My Credential 3"
organization: "Default"
credential_type: "Ansible Tower"
inputs:
host: "localhost"
username: "my_user"
password: 'my_password'
verify_ssl: true
---
- hosts: tower
roles:
- role: manage-credentials
Apache License 2.0
Red Hat Community of Practice & staff of the Red Hat Open Innovation Labs.