Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-m-sullivan committed Oct 22, 2024
2 parents 884b18b + 7d6daa6 commit 9da67ba
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 16 deletions.
3 changes: 3 additions & 0 deletions .github/files/galaxy.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ build_ignore:
- tests/*
license:
- GPL-3.0-or-later
dependencies:
"ansible.eda": ">=2.2.0"
"ansible.hub": ">=1.0.0"
tags:
- controller
- collection
Expand Down
34 changes: 21 additions & 13 deletions CONVERSION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

## Background

This is documentation on how to use convert from the older infra collections to the aap_configuration collection.
This is documentation on how to use convert from the older infra collections to the aap_configuration collection.

Previously there were multiple collections
infra.controller_configuration
infra.ah_configuration
infra.eda_configuration

These have been combined along with new roles to configure the gateway aspect of AAP.
These have been combined along with new roles to configure the gateway aspect of AAP.

It is recomended to use the old collections when interacting with the Ansible Automation Platforms with versions 2.4 or prior. While some aspects of the collection may work, it can have unintended changes or behaviors.
The collections have been revamped to use a single set of connection variables and to standardize variables throughout the collections.
The collections have been revamped to use a single set of connection variables and to standardize variables throughout the collections.

This guide will go through some of the standard variables what they were before and what to change them to.

Expand All @@ -21,20 +21,23 @@ This guide will go through some of the standard variables what they were before
This collection requires other collections to be used. These collections mainly house the roles to wrap around the official certified collections. While these validated collections are not certified or have a level of support, volunteers spend their free time to maintain them, and to try and address any issues that arise quickly.

These collections are

- [ansible.eda](https://console.redhat.com/ansible/automation-hub/repo/published/ansible/eda/) or [upstream](https://galaxy.ansible.com/ui/repo/published/ansible/eda/)
- [ansible.hub](https://console.redhat.com/ansible/automation-hub/repo/published/ansible/hub/) or [upstream](https://galaxy.ansible.com/ui/repo/published/ansible/hub/)
- [ansible.controller](https://console.redhat.com/ansible/automation-hub/repo/published/ansible/controller/) or [awx.awx](https://galaxy.ansible.com/ui/repo/published/awx/awx/)
- [ansible.platform(Gateway collection)](https://console.redhat.com/ansible/automation-hub/repo/published/ansible/platform/)

These collections are required for this collection to work, While ansible.controller and ansible.gateway are only available from https://console.redhat.com/.
These collections are required for this collection to work, While ansible.controller and ansible.gateway are only available from [https://console.redhat.com/](https://console.redhat.com/).

## Connection and Global Variables
These are the variables that are used to connecto the platfrom and are the same accross all Roles. Various environment variables can be used as specfied by their module collections, but it is recomended to use ansible vars as they can be homogonized to be single variables.

### Connection and Global Variables
These are the connection variables, These are used to connect to the platform.
These are the variables that are used to connecto the platfrom and are the same accross all Roles. Various environment variables can be used as specfied by their module collections, but it is recomended to use ansible vars as they can be homogonized to be single variables.

### Connection Variables

These are the connection variables, These are used to connect to the platform.

|Variable Name|Default Value|Required|Description|Previous Variables|
|Variable Name|Default Value|Required|Description|
|:---|:---:|:---:|:---|:---|
|`aap_hostname`|""|yes|URL to the Ansible Automation Platform Server.|127.0.0.1|
|`aap_validate_certs`|`True`|no|Whether or not to validate the Ansible Automation Platform Server's SSL certificate.||
Expand All @@ -43,9 +46,11 @@ These are the connection variables, These are used to connect to the platform.
|`aap_token`|""|no|Controller Admin User's token on the Ansible Automation Platform Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified.||
|`aap_request_timeout`|`10`|no|Specify the timeout in seconds Ansible should use in requests to the Ansible Automation Platform host.||

### Global Variables

Other Variables that will apply to all roles when used globally. Each of these has a per role that can override the default value if you wish to selectivly use them. This is useful for things like retries and delay on projects, or secure logging for a role.

|Variable Name|Default Value|Required|Description|Example|
|Variable Name|Default Value|Required|Description|
|:---|:---:|:---:|:---|:---|
|`aap_configuration_enforce_defaults`|`False`|no|Whether or not to enforce default option values. This is not universal and it is a best effort to enforce the default values of fields.|
|`aap_configuration_secure_logging`|`False`|no|Whether or not to include the sensitive Registry role tasks in the log. Set this value to `True` if you will be providing your sensitive values from elsewhere.|
Expand All @@ -54,14 +59,15 @@ Other Variables that will apply to all roles when used globally. Each of these h
|`aap_configuration_loop_delay`|1000|no|This variable sets the loop_delay for each role globally.|
|`aap_configuration_async_dir`|`null`|no|Sets the directory to write the results file for async tasks. The default value is set to `null` which uses the Ansible Default of `/root/.ansible_async/`.|


## Role variables

The order these variables and roles get applied by the dispatch role are
Gateway -> Hub -> Controller -> EDA

Below listed are the top level variables for each object in the order they are run by the dispatch role. Also included are the previous values if applicable

gateway_configuration vars:

- gateway_authenticators
- gateway_authenticator_maps
- gateway_settings
Expand All @@ -77,6 +83,7 @@ gateway_configuration vars:
- aap_teams

ah_configuration vars:

- aap_teams <- ah_groups
- aap_user_accounts <- ah_users
- ah_namespaces
Expand All @@ -88,16 +95,17 @@ ah_configuration vars:
- ah_collection_repositories

controller_configuration vars:

- controller_settings
- aap_organizations < -
- aap_organizations < - controller_organizations
- controller_instances
- controller_instance_groups
- controller_labels
- controller_credential_types
- controller_credentials
- controller_credential_input_sources
- controller_execution_environments
- aap_applications < -
- aap_applications < - controller_applications
- controller_notifications
- controller_projects
- controller_inventories
Expand All @@ -112,9 +120,9 @@ controller_configuration vars:
- controller_workflow_launch_jobs

eda_configuration vars:

- eda_credentials
- eda_controller_tokens
- eda_projects
- eda_decision_environments
- eda_rulebook_activations

4 changes: 2 additions & 2 deletions galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ build_ignore:
license:
- GPL-3.0-or-later
dependencies:
- ansible.eda
- ansible.hub
"ansible.eda": ">=2.2.0"
"ansible.hub": ">=1.0.0"
tags:
- controller
- collection
Expand Down
2 changes: 1 addition & 1 deletion tests/configure_controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
fail_msg: "No errors found, validate test example"
success_msg: "Errors found, proceeding"
vars:
job_templates_errors: __job_templates_errors_set_stats.ansible_stats.data.job_templates_errors
job_templates_errors: "{{ __job_templates_errors_set_stats.ansible_stats.data.job_templates_errors }}"

- name: Add Controller Settings Individually
ansible.builtin.include_role:
Expand Down

0 comments on commit 9da67ba

Please sign in to comment.