mirror of
https://github.com/de-it-krachten/ansible-role-awx_credentials
synced 2026-05-14 03:31:46 +00:00
No description
- Jinja 96.1%
- Python 2.2%
- Shell 1.7%
# [1.9.0](https://github.com/de-it-krachten/ansible-role-awx_credentials/compare/v1.8.0...v1.9.0) (2026-03-15) ### Features * Added support for Fedora 43 ([ |
||
|---|---|---|
| .github/workflows | ||
| defaults | ||
| files | ||
| meta | ||
| molecule/default | ||
| tasks | ||
| templates | ||
| .ansible-lint | ||
| .cicd | ||
| .cicd.overwrite | ||
| .collections | ||
| .gitignore | ||
| .releaserc.yml | ||
| .roles | ||
| .yamllint | ||
| CHANGELOG.md | ||
| README.md | ||
ansible-role-awx_credentials
import/export credentials from AWX/Tower (including the sensitive data)
Dependencies
Roles
- deitkrachten.awx_cli
Collections
- awx.awx
- community.docker
- community.general
Platforms
Supported platforms
- Red Hat Enterprise Linux 81
- Red Hat Enterprise Linux 91
- Red Hat Enterprise Linux 101
- RockyLinux 81
- RockyLinux 91
- RockyLinux 101
- OracleLinux 81
- OracleLinux 91
- OracleLinux 101
- AlmaLinux 81
- AlmaLinux 91
- AlmaLinux 101
- Debian 11 (Bullseye)1
- Debian 12 (Bookworm)1
- Debian 13 (Trixie)1
- Ubuntu 20.04 LTS1
- Ubuntu 22.04 LTS1
- Ubuntu 24.04 LTS1
- Fedora 421
- Fedora 431
Note: 1 : no automated testing is performed on these platforms
Role Variables
defaults/main.yml
# AWX/Tower identifier
# awx_credentials_identifier: awx-1
# Path to export files to
# awx_credentials_dest_root: /tmp
# vault password to use for encrypting output
# awx_credentials_vault_pass: "very-secret-and-strong-password"
# vault id to use for encrypting output
# awx_credentials_vault_id: default
# version of awxkit to use
awx_credentials_awxkit: 15.0.1
# Set-up temporary Docker image
awx_credentials_docker: true
# Should crendetial be updated
# true will always update encrypted values.
# false will only updated encrypted values if a change is absolutely known to be needed.
awx_credentials_update_secrets: false
# dict with AWX/Tower credentials (API & DB)
awx_credentials:
api:
url: https://127.0.0.1
user: admin
password: "Admin123!"
validate_certs: false
db:
host: '127.0.0.1'
port: '5432'
name: awx
user: awx
password: awx
secret: secret
# list of decrypted credentials
awx_credentials_list: []
# awxcli/awxkit command
awx_credentials_cmd: awx
Example Playbook
molecule/default/converge.yml
- hosts: all
vars_files:
- vars.yml
roles:
- deitkrachten.awx_cli
tasks:
- name: Pause play until a URL is reachable from this host
uri:
url: '{{ awx_credentials[''api''][''url''] }}'
validate_certs: '{{ awx_credentials[''api''][''validate_certs''] }}'
follow_redirects: 'yes'
method: GET
register: _result
until: _result.status == 200
retries: 30
delay: 10
- name: Create all organizations
awx.awx.organization:
controller_host: '{{ awx_credentials[''api''][''url''] }}'
controller_username: '{{ awx_credentials[''api''][''user''] }}'
controller_password: '{{ awx_credentials[''api''][''password''] }}'
validate_certs: '{{ awx_credentials[''api''][''validate_certs''] }}'
name: '{{ item.name }}'
loop: '{{ awx_resources.organizations }}'
loop_control:
label: '{{ item.name }}'
- name: Create all credentials
awx.awx.credential:
controller_host: '{{ awx_credentials[''api''][''url''] }}'
controller_username: '{{ awx_credentials[''api''][''user''] }}'
controller_password: '{{ awx_credentials[''api''][''password''] }}'
validate_certs: '{{ awx_credentials[''api''][''validate_certs''] }}'
name: '{{ item.name }}'
organization: '{{ item.organization }}'
credential_type: '{{ item.credential_type }}'
inputs: '{{ item.inputs }}'
loop: '{{ awx_resources.credentials }}'
loop_control:
label: '{{ item.name }}'
tags: molecule-idempotence-notest
- name: Include role 'awx_credentials'
include_role:
name: awx_credentials
vars:
awx_credentials_mode: export