https://github.com/informaticsmatters/ansible-role-awx-composer
A Role to Compose (configure) an AWX server
https://github.com/informaticsmatters/ansible-role-awx-composer
Last synced: about 1 month ago
JSON representation
A Role to Compose (configure) an AWX server
- Host: GitHub
- URL: https://github.com/informaticsmatters/ansible-role-awx-composer
- Owner: InformaticsMatters
- License: apache-2.0
- Created: 2020-04-07T16:40:41.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T23:29:31.000Z (over 3 years ago)
- Last Synced: 2025-10-10T22:07:02.758Z (8 months ago)
- Language: HTML
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Ansible Role - informaticsmatters.awx_composer
==============================================



[](https://www.codefactor.io/repository/github/informaticsmatters/ansible-role-awx-composer)
A Role to Compose (configure) an AWX server from a `tower` variable map that
you provide.
Requirements
------------
To use this role from your control machine, which runs tasks
on you control machine to interact with an AWX server using the tower-cli
and localhost, you will need: -
- `ansible` (ideally v2.9.6 or later)
- `jmespath` (ideally v0.10.0 or later)
- `ansible-tower-cli` (ideally v3.3.9 or later)
- The `awx.awx` Ansible Galaxy collection (v11.2.0 or later)
And a `tower` variable map that defines your desired AWX configuration.
Additionally, at the moment, you **MUST** provide AWS credentials (typically
allowing AWS S3 bucket access to plays that operate with S3) and Kubernetes
credentials. You will need to set the following environment variables prior
to running Ansible: -
- `AWS_ACCESS_KEY_ID`
- `AWS_SECRET_ACCESS_KEY`
- `K8S_AUTH_HOST` (i.e. `https://1.2.3.4:6443`)
- `K8S_AUTH_API_KEY` (i.e. `kubeconfig-user-xvgfv.a-abcde:0000000000000`)
- `K8S_AUTH_VERIFY_SSL` (i.e. `no`)
...and in response the following custom credentials will be created on
the AWX server: -
- `aws (SELF)`
- `k8s (SELF)`
> If you do not want the `aws (SELF)` credential do not define
`AWS_ACCESS_KEY_ID`. If you do not want the `k8s (SELF)` credential
do not define `K8S_AUTH_HOST`.
Role Variables
--------------
The role is controlled the `tower` variable, a map of material to be loaded: -
tower:
host: (e.g. 'https://awx.example.com')
admin_username:
admin_password:
organisation:
teams: []
labels: []
inventories: []
notifications: []
users: []
credentials: []
projects: []
job_templates: []
Where **Inventory** is: -
name:
hosts: []
...and **Host** is: -
name:
groups: []
...and **Notification** is: -
name:
kind:
...and **User** is: -
first_name:
last_name:
username:
password:
email:
superuser:
teams: []
...and **Credential** is: -
name:
kind:
...and **Project** is: -
name:
description:
scm_type:
scm_url:
scm_branch:
teams: []
And **JobTemplate** is: -
name:
project:
playbook:
ask_extra_vars:
extra_vars:
credentials: []
inventory: []
teams: []
labels: []
Dependencies
------------
You will need: -
- `ansible`
- `jmespath`
- `ansible-tower-cli`
- The `awx.awx` Ansible Galaxy collection
Example Playbook
----------------
You don't need a playbook, you just need a set of parameters - a configuration
(i.e. a `tower` map in a YAML file). If your configuration is defined in
`config.yaml` then you can configure your AWX server with the following
command: -
$ pip install -r requirements.txt
$ ansible-galaxy collection install -r requirements.yaml
$ ansible localhost \
-m include_role -a name=informaticsmatters.awx_composer \
-e @config.yaml
License
-------
Apache 2.0 License
Author Information
------------------
alanbchristie