diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 79298975b..475ec1a00 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -29,7 +29,7 @@ If you feel like getting your hands dirty, feel free to make the change yourself 1. Fork the repo on Github, and then clone it locally. 2. Create a branch named appropriately for the change you are going to make. 3. Make your code change. -4. If you are creating a new role, please add a test for it in our [testing playbook.](https://github.com/redhat-cop/controller_configuration/blob/devel/tests/configure_controller.yml) by adding a new role entry and adding the appropriate yaml file with test data in the controller_configs directory. +4. If you are creating a new role, please add a test for it in our [testing playbook.](https://github.com/redhat-cop/aap_configuration/blob/devel/tests/configure_controller.yml) by adding a new role entry and adding the appropriate yaml file with test data in the controller_configs directory. 5. Add a changelog fragment in `changelogs/fragments` as per 6. Push your code change up to your forked repo. 7. Open a Pull Request to merge your changes to this repo. The comment box will be filled in automatically via a template. diff --git a/.github/workflows/ci_standalone_versioned.yml b/.github/workflows/ci_standalone_versioned.yml index 8dd729d05..7597b9ff4 100644 --- a/.github/workflows/ci_standalone_versioned.yml +++ b/.github/workflows/ci_standalone_versioned.yml @@ -80,7 +80,7 @@ jobs: collection_namespace: infra collection_name: controller_configuration collection_version: 2.0.0 - collection_repo: https://github.com/redhat-cop/controller_configuration/ + collection_repo: https://github.com/redhat-cop/aap_configuration/ - name: "Install Galaxy dependencies" run: ansible-galaxy collection install -r .github/collections/requirements.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 4eea5e848..d2bd83dc8 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -25,6 +25,6 @@ jobs: collection_namespace: infra collection_name: controller_configuration collection_version: 2.10.0 - collection_repo: https://github.com/redhat-cop/controller_configuration/ + collection_repo: https://github.com/redhat-cop/aap_configuration/ collection_dependencies: awx.awx ... diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 85006ce7d..a0a07da92 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,7 +39,7 @@ jobs: galaxy_publish_2: false ah_publish_2: true collection_version: ${{ github.ref_name }} - collection_repo: https://github.com/redhat-cop/controller_configuration/ + collection_repo: https://github.com/redhat-cop/aap_configuration/ quay_username: redhat_cop collection_dependencies: awx.awx matrix_message: This Ansible collection allows for easy interaction with an AWX or Ansible Controller server via Ansible roles using the AWX/Controller collection modules. diff --git a/.github/workflows/release_manual.yml b/.github/workflows/release_manual.yml index 6d532fa93..a581e2b47 100644 --- a/.github/workflows/release_manual.yml +++ b/.github/workflows/release_manual.yml @@ -27,7 +27,7 @@ jobs: galaxy_publish_2: false ah_publish_2: true collection_version: ${{ github.event.inputs.tagged_version }} - collection_repo: https://github.com/redhat-cop/controller_configuration/ + collection_repo: https://github.com/redhat-cop/aap_configuration/ quay_username: redhat_cop collection_dependencies: awx.awx matrix_message: This Ansible collection allows for easy interaction with an AWX or Ansible Controller server via Ansible roles using the AWX/Controller collection modules. diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 05690cafa..8e7ee5403 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -284,7 +284,7 @@ Minor Changes Bugfixes -------- -- Enable the ability to define simple_workflow_nodes on workflow_job_templates without the need to set the `state` on a workflow_job_template (https://github.com/redhat-cop/controller_configuration/issues/297). +- Enable the ability to define simple_workflow_nodes on workflow_job_templates without the need to set the `state` on a workflow_job_template (https://github.com/redhat-cop/aap_configuration/issues/297). v2.2.4 ====== diff --git a/EXPORT_README.md b/EXPORT_README.md index b63fa3aa1..79f145202 100644 --- a/EXPORT_README.md +++ b/EXPORT_README.md @@ -6,7 +6,7 @@ This is documentation on how to use a the Automation Controller export commands This command allows exporting all available endpoints for Automation Controller for use in importing, templates, backups and many other uses. -**NOTE:** If you use the awx export option it will NOT use the correct high level variable list naming that is expected by the rest of these roles you will need to correctly name them before being able to use the roles to import the data into your new Controller. See [#332](https://github.com/redhat-cop/controller_configuration/issues/332) for more details. +**NOTE:** If you use the awx export option it will NOT use the correct high level variable list naming that is expected by the rest of these roles you will need to correctly name them before being able to use the roles to import the data into your new Controller. See [#332](https://github.com/redhat-cop/aap_configuration/issues/332) for more details. ## Installation diff --git a/README.md b/README.md index 07d486626..4310c1c32 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -# Red Hat Communities of Practice Controller Configuration Collection +# Red Hat Communities of Practice AAP Configuration Collection -![pre-commit tests](https://github.com/redhat-cop/controller_configuration/actions/workflows/pre-commit.yml/badge.svg) -![Release](https://github.com/redhat-cop/controller_configuration/actions/workflows/release.yml/badge.svg) -Google Calendar invite +![pre-commit tests](https://github.com/redhat-cop/aap_configuration/actions/workflows/pre-commit.yml/badge.svg) +![Release](https://github.com/redhat-cop/aap_configuration/actions/workflows/release.yml/badge.svg) +Google Calendar invite -This Ansible collection allows for easy interaction with an AWX or Ansible Controller server via Ansible roles using the AWX/Controller collection modules. +This Ansible collection allows for easy interaction with AAP via Ansible roles using the modules from the certified collections. ## Getting Help -We are on the Ansible Forums and Matrix, if you want to discuss something, ask for help, or participate in the community, please use the #infra-config-as-code tag on the fourm, or post to the chat in Matrix. +We are on the Ansible Forums and Matrix, if you want to discuss something, ask for help, or participate in the community, please use the #infra-config-as-code tag on the form, or post to the chat in Matrix. [Ansible Forums](https://forum.ansible.com/tag/infra-config-as-code) @@ -17,34 +17,36 @@ We are on the Ansible Forums and Matrix, if you want to discuss something, ask f ## Requirements -The awx.awx or ansible.controller collections MUST be installed in order for this collection to work. It is recommended they be invoked in the playbook in the following way. +The supported collections that contains the modules are required for this collection to work, you can copy this requirements.yml file example. ```yaml --- -- name: Playbook to configure ansible controller post installation - hosts: localhost - connection: local - vars: - controller_validate_certs: true - collections: - - awx.awx +collections: + - name: ansible.platform + - name: ansible.hub + - name: ansible.controller + - name: ansible.eda + - name: infra.aap_configuration +... ``` ## Links to Ansible Automation Platform Collections -| Collection Name | Purpose | -|:--------------------------------------------------------------------------------------------:|:----------------------------------------:| -| [awx.awx/Ansible.controller repo](https://github.com/ansible/awx/tree/devel/awx_collection) | Automation controller modules | -| [Ansible Hub Configuration](https://github.com/ansible/automation_hub_collection) | Automation hub configuration | +| Collection Name | Purpose | +|:-----------------------------------------------------------------------------------:|:-----------------------------:| +| ansible.platform repo (no public repo for this collection) | gateway/platform modules | +| [ansible.hub repo](https://github.com/ansible-collections/ansible_hub) | Automation hub modules | +| [ansible.controller repo](https://github.com/ansible/awx/tree/devel/awx_collection) | Automation controller modules | +| [ansible.eda repo](https://github.com/ansible/event-driven-ansible) | Event Driven Ansible modules | ## Links to other Validated Configuration Collections for Ansible Automation Platform -| Collection Name | Purpose | -|:------------------------------------------------------------------------------------------:|:----------------------------------------:| -| [Controller Configuration](https://github.com/redhat-cop/controller_configuration) | Automation controller configuration | -| [EE Utilities](https://github.com/redhat-cop/ee_utilities) | Execution Environment creation utilities | -| [AAP installation Utilities](https://github.com/redhat-cop/aap_utilities) | Ansible Automation Platform Utilities | -| [AAP Configuration Template](https://github.com/redhat-cop/aap_configuration_template) | Configuration Template for this suite | +| Collection Name | Purpose | +|:------------------------------------------------------------------------------------------:|:-------------------------------------------------:| +| [AAP Configuration Extended](https://github.com/redhat-cop/aap_configuration_extended) | Where other useful roles that don't fit here live | +| [EE Utilities](https://github.com/redhat-cop/ee_utilities) | Execution Environment creation utilities | +| [AAP installation Utilities](https://github.com/redhat-cop/aap_utilities) | Ansible Automation Platform Utilities | +| [AAP Configuration Template](https://github.com/redhat-cop/aap_configuration_template) | Configuration Template for this suite | ## Included content @@ -52,10 +54,10 @@ Click the `Content` button to see the list of content included in this collectio ## Installing this collection -You can install the infra.controller_configuration.collection with the Ansible Galaxy CLI: +You can install the infra.aap_configuration.collection with the Ansible Galaxy CLI: ```console -ansible-galaxy collection install infra.controller_configuration +ansible-galaxy collection install infra.aap_configuration ``` You can also include it in a `requirements.yml` file and install it with `ansible-galaxy collection install -r requirements.yml`, using the format: @@ -63,7 +65,7 @@ You can also include it in a `requirements.yml` file and install it with `ansibl ```yaml --- collections: - - name: infra.controller_configuration + - name: infra.aap_configuration # If you need a specific version of the collection, you can specify like this: # version: ... ``` @@ -79,7 +81,7 @@ The awx.awx or ansible.controller collection must be invoked in the playbook in The following command will invoke the collection playbook. This is considered a starting point for the collection. ```console -ansible-playbook infra.controller_configuration.configure_controller.yml +ansible-playbook infra.aap_configuration.configure_controller.yml ``` Otherwise it will look for the modules only in your base installation. If there are errors complaining about "couldn't resolve module/action" this is the most likely cause. @@ -179,13 +181,13 @@ Adding the ability to use direct output from the awx export command in the roles ## Contributing to this collection -We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the [Controller Configuration collection repository](https://github.com/redhat-cop/controller_configuration). -More information about contributing can be found in our [Contribution Guidelines.](https://github.com/redhat-cop/controller_configuration/blob/devel/.github/CONTRIBUTING.md) +We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the [Controller Configuration collection repository](https://github.com/redhat-cop/aap_configuration). +More information about contributing can be found in our [Contribution Guidelines.](https://github.com/redhat-cop/aap_configuration/blob/devel/.github/CONTRIBUTING.md) -We have a community meeting every 4 weeks. Find the agenda in the [issues](https://github.com/redhat-cop/controller_configuration/issues) and the calendar invitation below: +We have a community meeting every 4 weeks. Find the agenda in the [issues](https://github.com/redhat-cop/aap_configuration/issues) and the calendar invitation below: -Google Calendar invite +Google Calendar invite ## Code of Conduct diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 81c176f7a..f76b20c86 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -402,7 +402,7 @@ releases: changes: bugfixes: - Enable the ability to define simple_workflow_nodes on workflow_job_templates - without the need to set the `state` on a workflow_job_template (https://github.com/redhat-cop/controller_configuration/issues/297). + without the need to set the `state` on a workflow_job_template (https://github.com/redhat-cop/aap_configuration/issues/297). minor_changes: - Add max_forks, max_concurrent_jobs as options to instance_groups role - Add no_log everywhere controller_api_plugin is used to avoid to expose sensitive diff --git a/docs/aap_config_as_code_public_meeting.ics b/docs/aap_config_as_code_public_meeting.ics index c6cc1f01d..8f7aab192 100644 --- a/docs/aap_config_as_code_public_meeting.ics +++ b/docs/aap_config_as_code_public_meeting.ics @@ -14,7 +14,7 @@ URL:https://meet.google.com/npj-fyzv-oyo X-GOOGLE-CONFERENCE:https://meet.google.com/npj-fyzv-oyo DESCRIPTION: https://forum.ansible.com/t/aap-config-as-code-office-hours-first-thursday-of-every-month/398\n\n - https://github.com/redhat-cop/controller_configuration/issues?q=is%3Aissue+is%3Aopen+label%3Aoffice_hours\n\n + https://github.com/redhat-cop/aap_configuration/issues?q=is%3Aissue+is%3Aopen+label%3Aoffice_hours\n\n -::~:~::~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~ :~:~:~:~:~:~:~:~:~:~:~:~::~:~::-\nJoin with Google Meet: https://meet.go ogle.com/npj-fyzv-oyo\nOr dial: (US) +1 470-722-0265 PIN: 621302239#\n\n diff --git a/galaxy.yml b/galaxy.yml index 026fe51d1..608a360a3 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,7 +1,7 @@ --- namespace: infra -name: controller_configuration -version: 2.9.0-devel +name: aap_configuration +version: 3.0.0 description: A collection of roles to manage Ansible Controller readme: README.md authors: @@ -11,14 +11,12 @@ authors: - Tom Page @Tompage1994 - Sean Sullivan @sean-m-sullivan - David Danielsson @djdanielsson -repository: https://github.com/redhat-cop/controller_configuration/ -issues: https://github.com/redhat-cop/controller_configuration//issues +repository: https://github.com/redhat-cop/aap_configuration/ +issues: https://github.com/redhat-cop/aap_configuration/issues build_ignore: - galaxy.yml.j2 - release.yml - .github - - .ansiblelint.yml - - .yamllint.yml - '*.tar.gz' license: - GPL-3.0-or-later diff --git a/history.sh b/history.sh deleted file mode 100755 index 292ce2e70..000000000 --- a/history.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Ensure git-filter-repo is installed -if ! command -v git-filter-repo &> /dev/null -then - echo "git-filter-repo could not be found, please install it first." - exit -fi - -# Get a list of all files that were deleted at some point in history -deleted_files=$(git log --diff-filter=D --summary | grep delete | awk '{print $NF}') - -# Loop through each deleted file -for file in $deleted_files; do - # Check if the file still exists in the current working directory - if [ ! -f "$file" ]; then - echo "Removing history of $file as it no longer exists..." - # Remove history of the file using git filter-repo - git filter-repo --path "$file" --invert-paths --force - else - echo "$file still exists, skipping history removal." - fi -done - -# Prompt the user to force-push the changes -echo "History rewrite is complete." -echo "To update the remote repository, run the following commands:" -echo "git push origin --force --all" -echo "git push origin --force --tags" \ No newline at end of file diff --git a/roles/controller_ad_hoc_command/README.md b/roles/controller_ad_hoc_command/README.md index 98b0aa818..bdd0bf125 100644 --- a/roles/controller_ad_hoc_command/README.md +++ b/roles/controller_ad_hoc_command/README.md @@ -100,7 +100,7 @@ controller_ad_hoc_commands: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_ad_hoc_command_cancel/README.md b/roles/controller_ad_hoc_command_cancel/README.md index 970ad9f7e..69c2766f6 100644 --- a/roles/controller_ad_hoc_command_cancel/README.md +++ b/roles/controller_ad_hoc_command_cancel/README.md @@ -91,7 +91,7 @@ controller_ad_hoc_commands_cancel: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_applications/README.md b/roles/controller_applications/README.md index 0148ce19a..7316ab725 100644 --- a/roles/controller_applications/README.md +++ b/roles/controller_applications/README.md @@ -142,7 +142,7 @@ controller_applications: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_bulk_host_create/README.md b/roles/controller_bulk_host_create/README.md index 2425f622f..9bae686c1 100644 --- a/roles/controller_bulk_host_create/README.md +++ b/roles/controller_bulk_host_create/README.md @@ -137,7 +137,7 @@ controller_bulk_hosts: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_bulk_job_launch/README.md b/roles/controller_bulk_job_launch/README.md index b781e442c..f11ed0ff6 100644 --- a/roles/controller_bulk_job_launch/README.md +++ b/roles/controller_bulk_job_launch/README.md @@ -135,7 +135,7 @@ This also speeds up the overall role. ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_credential_input_sources/README.md b/roles/controller_credential_input_sources/README.md index faf6318a5..96ad61940 100644 --- a/roles/controller_credential_input_sources/README.md +++ b/roles/controller_credential_input_sources/README.md @@ -168,7 +168,7 @@ controller_credential_input_sources: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_credential_types/README.md b/roles/controller_credential_types/README.md index ddc80b713..932c589da 100644 --- a/roles/controller_credential_types/README.md +++ b/roles/controller_credential_types/README.md @@ -243,7 +243,7 @@ controller_credential_types: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_credentials/README.md b/roles/controller_credentials/README.md index d315b86dc..22c136f74 100644 --- a/roles/controller_credentials/README.md +++ b/roles/controller_credentials/README.md @@ -169,7 +169,7 @@ controller_credentials: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_execution_environments/README.md b/roles/controller_execution_environments/README.md index 83e4c334c..dacdb3f87 100644 --- a/roles/controller_execution_environments/README.md +++ b/roles/controller_execution_environments/README.md @@ -132,7 +132,7 @@ controller_execution_environments: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_groups/README.md b/roles/controller_host_groups/README.md similarity index 99% rename from roles/controller_groups/README.md rename to roles/controller_host_groups/README.md index eef81a9b5..dd7cd2eb7 100644 --- a/roles/controller_groups/README.md +++ b/roles/controller_host_groups/README.md @@ -171,7 +171,7 @@ controller_groups: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_groups/defaults/main.yml b/roles/controller_host_groups/defaults/main.yml similarity index 100% rename from roles/controller_groups/defaults/main.yml rename to roles/controller_host_groups/defaults/main.yml diff --git a/roles/controller_groups/meta/argument_specs.yml b/roles/controller_host_groups/meta/argument_specs.yml similarity index 100% rename from roles/controller_groups/meta/argument_specs.yml rename to roles/controller_host_groups/meta/argument_specs.yml diff --git a/roles/controller_groups/meta/main.yml b/roles/controller_host_groups/meta/main.yml similarity index 100% rename from roles/controller_groups/meta/main.yml rename to roles/controller_host_groups/meta/main.yml diff --git a/roles/controller_groups/tasks/main.yml b/roles/controller_host_groups/tasks/main.yml similarity index 100% rename from roles/controller_groups/tasks/main.yml rename to roles/controller_host_groups/tasks/main.yml diff --git a/roles/controller_groups/tests/configs/group.yml b/roles/controller_host_groups/tests/configs/group.yml similarity index 100% rename from roles/controller_groups/tests/configs/group.yml rename to roles/controller_host_groups/tests/configs/group.yml diff --git a/roles/controller_groups/tests/test.yml b/roles/controller_host_groups/tests/test.yml similarity index 100% rename from roles/controller_groups/tests/test.yml rename to roles/controller_host_groups/tests/test.yml diff --git a/roles/controller_hosts/README.md b/roles/controller_hosts/README.md index 8a287afb9..cc7792eb7 100644 --- a/roles/controller_hosts/README.md +++ b/roles/controller_hosts/README.md @@ -159,7 +159,7 @@ controller_hosts: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_instance_groups/README.md b/roles/controller_instance_groups/README.md index 1b0170c49..54373a3fa 100644 --- a/roles/controller_instance_groups/README.md +++ b/roles/controller_instance_groups/README.md @@ -124,7 +124,7 @@ controller_instance_groups: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_instances/README.md b/roles/controller_instances/README.md index fae19f474..f988cca7f 100644 --- a/roles/controller_instances/README.md +++ b/roles/controller_instances/README.md @@ -123,7 +123,7 @@ controller_instances: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_inventories/README.md b/roles/controller_inventories/README.md index cce3680c3..ce83cf62f 100644 --- a/roles/controller_inventories/README.md +++ b/roles/controller_inventories/README.md @@ -174,7 +174,7 @@ controller_inventories: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_inventory_source_update/README.md b/roles/controller_inventory_source_update/README.md index 8345b223d..aafb5df37 100644 --- a/roles/controller_inventory_source_update/README.md +++ b/roles/controller_inventory_source_update/README.md @@ -114,7 +114,7 @@ controller_inventory_sources: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_inventory_sources/README.md b/roles/controller_inventory_sources/README.md index 75b0060b3..9ef1f049b 100644 --- a/roles/controller_inventory_sources/README.md +++ b/roles/controller_inventory_sources/README.md @@ -187,7 +187,7 @@ controller_inventory_sources: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_job_launch/README.md b/roles/controller_job_launch/README.md index 0140ffb88..0d6b2199c 100644 --- a/roles/controller_job_launch/README.md +++ b/roles/controller_job_launch/README.md @@ -102,7 +102,7 @@ controller_launch_jobs: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_job_templates/README.md b/roles/controller_job_templates/README.md index 70893eb64..17db7ee50 100644 --- a/roles/controller_job_templates/README.md +++ b/roles/controller_job_templates/README.md @@ -126,7 +126,7 @@ This also speeds up the overall role. |`webhook_service`|""|no|str|Service that webhook requests will be accepted from (github, gitlab)| |`webhook_credential`|""|no|str|Personal Access Token for posting back the status to the service API| |`scm_branch`|""|no|str|Branch to use in job run. Project default used if blank. Only allowed if project allow_override field is set to true.| -|`labels`|""|no|list|The labels applied to this job template. NOTE: Labels must be created with the [labels](https://github.com/redhat-cop/controller_configuration/tree/devel/roles/labels) role first, an error will occur if the label supplied to this role does not exist.| +|`labels`|""|no|list|The labels applied to this job template. NOTE: Labels must be created with the [labels](https://github.com/redhat-cop/aap_configuration/tree/devel/roles/labels) role first, an error will occur if the label supplied to this role does not exist.| |`custom_virtualenv`|""|no|str|Local absolute file path containing a custom Python virtualenv to use.| |`notification_templates_started`|""|no|list|The notifications on started to use for this organization in a list.| |`notification_templates_success`|""|no|list|The notifications on success to use for this organization in a list.| @@ -300,7 +300,7 @@ controller_templates: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_jobs_cancel/README.md b/roles/controller_jobs_cancel/README.md index de420973b..94de87751 100644 --- a/roles/controller_jobs_cancel/README.md +++ b/roles/controller_jobs_cancel/README.md @@ -82,7 +82,7 @@ controller_cancel_jobs: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_labels/README.md b/roles/controller_labels/README.md index ceaeb8cbe..5301bfd35 100644 --- a/roles/controller_labels/README.md +++ b/roles/controller_labels/README.md @@ -120,7 +120,7 @@ controller_labels: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_license/README.md b/roles/controller_license/README.md index d32ad9678..ea1b56bea 100644 --- a/roles/controller_license/README.md +++ b/roles/controller_license/README.md @@ -145,7 +145,7 @@ controller_license: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_notification_templates/README.md b/roles/controller_notification_templates/README.md index 7106a0946..a6b79deb0 100644 --- a/roles/controller_notification_templates/README.md +++ b/roles/controller_notification_templates/README.md @@ -196,7 +196,7 @@ controller_notifications: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_organizations/README.md b/roles/controller_organizations/README.md index bb59c7146..1b2ea7090 100644 --- a/roles/controller_organizations/README.md +++ b/roles/controller_organizations/README.md @@ -189,7 +189,7 @@ controller_organizations: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_project_update/README.md b/roles/controller_project_update/README.md index 879312707..73d60c83d 100644 --- a/roles/controller_project_update/README.md +++ b/roles/controller_project_update/README.md @@ -123,7 +123,7 @@ controller_projects: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_projects/README.md b/roles/controller_projects/README.md index 8dcfa1c10..8a166e551 100644 --- a/roles/controller_projects/README.md +++ b/roles/controller_projects/README.md @@ -173,7 +173,7 @@ controller_projects: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_roles/README.md b/roles/controller_roles/README.md index 429617252..204d1cfc3 100644 --- a/roles/controller_roles/README.md +++ b/roles/controller_roles/README.md @@ -190,7 +190,7 @@ controller_roles: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_schedules/README.md b/roles/controller_schedules/README.md index 33ede4f19..7e17af87e 100644 --- a/roles/controller_schedules/README.md +++ b/roles/controller_schedules/README.md @@ -165,7 +165,7 @@ controller_schedules: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_settings/README.md b/roles/controller_settings/README.md index 63b004a34..cf38dde26 100644 --- a/roles/controller_settings/README.md +++ b/roles/controller_settings/README.md @@ -147,7 +147,7 @@ controller_settings: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_teams/README.md b/roles/controller_teams/README.md index 33eceb8e7..182383edb 100644 --- a/roles/controller_teams/README.md +++ b/roles/controller_teams/README.md @@ -105,7 +105,7 @@ This also speeds up the overall role. ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_users/README.md b/roles/controller_users/README.md index 5e4d354b0..f94492d11 100644 --- a/roles/controller_users/README.md +++ b/roles/controller_users/README.md @@ -141,7 +141,7 @@ controller_user_accounts: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_workflow_job_templates/README.md b/roles/controller_workflow_job_templates/README.md index 0922e9405..5e375b807 100644 --- a/roles/controller_workflow_job_templates/README.md +++ b/roles/controller_workflow_job_templates/README.md @@ -89,7 +89,7 @@ This also speeds up the overall role. |`allow_simultaneous`|""|no|bool|Allow simultaneous runs of the workflow job template.| |`inventory`|""|no|str|Inventory applied as a prompt, assuming job template prompts for inventory| |`limit`|""|no|str|Limit applied as a prompt, assuming job template prompts for limit| -|`labels`|""|no|str|The labels applied to this job template. NOTE: Labels must be created with the [labels](https://github.com/redhat-cop/controller_configuration/tree/devel/roles/labels) role first, an error will occur if the label supplied to this role does not exist.| +|`labels`|""|no|str|The labels applied to this job template. NOTE: Labels must be created with the [labels](https://github.com/redhat-cop/aap_configuration/tree/devel/roles/labels) role first, an error will occur if the label supplied to this role does not exist.| |`ask_labels_on_launch`|""|no|bool|Prompt user for labels on launch.| |`job_tags`|""|no|str|Comma separated list of the tags to use for the workflow job template.| |`skip_tags`|""|no|str|Comma separated list of the tags to skip for the workflow job template.| @@ -121,7 +121,7 @@ This also speeds up the overall role. |`forks`|Job Template default|no|str|Forks applied as a prompt. Job Template default used if not set. Only allowed if `ask_forks_on_launch` set to true on Job Template| |`instance_groups`|Job Template default|no|str| List of Instance Groups applied as a prompt. Job Template default used if not set. Only allowed if `ask_instance_groups_on_launch` set to true on Job Template| |`job_slice_count`|Job Template default|no|str|Job Slice Count to use in the job run. Job Template default used if not set. Only allowed if `ask_job_slice_count_on_launch` set to true on Job Template| -|`labels`|Job Template default|no|list|List of labels to use in the job run. Job Template default used if not set. Only allowed if `ask_labels_on_launch` set to true on Job Template. NOTE: Labels must be created with the [labels](https://github.com/redhat-cop/controller_configuration/tree/devel/roles/labels) role first, an error will occur if the label supplied to this role does not exist.| +|`labels`|Job Template default|no|list|List of labels to use in the job run. Job Template default used if not set. Only allowed if `ask_labels_on_launch` set to true on Job Template. NOTE: Labels must be created with the [labels](https://github.com/redhat-cop/aap_configuration/tree/devel/roles/labels) role first, an error will occur if the label supplied to this role does not exist.| |`timeout`|Job Template default|no|str|Timeout to use in the job run. Job Template default used if not set. Only allowed if `ask_timeout_on_launch` set to true on Job Template| |`approval_node`|""|no|str|A dictionary of Name, description, and timeout values for the approval node. This parameter is mutually exclusive with unified_job_template.| |`organization`|""|no|str|The organization of the workflow job template the node exists in. Used for looking up the workflow, not a direct model field.| @@ -426,7 +426,7 @@ controller_workflows: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/controller_workflow_launch/README.md b/roles/controller_workflow_launch/README.md index 2c8a79122..0b88f16d4 100644 --- a/roles/controller_workflow_launch/README.md +++ b/roles/controller_workflow_launch/README.md @@ -90,7 +90,7 @@ controller_workflow_launch_jobs: ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/roles/dispatch/README.md b/roles/dispatch/README.md new file mode 100644 index 000000000..b02607150 --- /dev/null +++ b/roles/dispatch/README.md @@ -0,0 +1,41 @@ +# infra.platform_configuration.dispatch + +## Description + +An Ansible Role to run all roles in the infra.platform_configuration collection. + +## Variables + +Each role has its own variables, for information on those please see each role which this role will call. This role has one key variable `gateway_dispatch_roles` and its default value is shown below: + +```yaml +gateway_dispatch_roles: + - {role: settings, var: settings_list, tags: settings} + - {role: users, var: users_list, tags: users} + - {role: authenticators, var: authenticators_list, tags: authenticators} + - {role: authenticator_maps, var: authenticator_maps_list, tags: authenticator_maps} + - {role: http_ports, var: http_ports_list, tags: http_ports} + - {role: organizations, var: organizations_list, tags: organizations} + - {role: teams, var: teams_list, tags: teams} + - {role: service_clusters, var: service_clusters_list, tags: service_clusters} + - {role: service_keys, var: service_keys_list, tags: service_keys} + - {role: service_nodes, var: service_nodes_list, tags: service_nodes} + - {role: services, var: services_list, tags: services} + - {role: routes, var: routes_list, tags: routes} + - {role: role_user_assignments, var: role_user_assignments_list, tags: role_user_assignments} +``` + +Note that each item has three elements: + +- `role` which is the name of the role within infra.platform_configuration +- `var` which is the variable which is used in that role. We use this to prevent the role being called if the variable is not set +- `tags` the tags which are applied to the role so it is possible to apply tags to a playbook using the dispatcher with these tags. + +It is possible to redefine this variable with a subset of roles or with different tags. In general we suggest keeping the same structure and perhaps just using a subset. + +For more information about variables, see [top-level README](../../README.md). +For more information about roles, see each roles' README (also linked in the top-level README) + +## License + +[GPLv3](https://github.com/ansible/aap-gateway/gateway_configuration_collection/COPYING) diff --git a/roles/dispatch/defaults/main.yml b/roles/dispatch/defaults/main.yml new file mode 100644 index 000000000..9f4b324ac --- /dev/null +++ b/roles/dispatch/defaults/main.yml @@ -0,0 +1,173 @@ +--- +gateway_configuration_dispatcher_roles: + - role: gateway_authenticators + var: authenticators_list + tags: authenticators + - role: gateway_authenticator_maps + var: authenticator_maps_list + tags: authenticator_maps + - role: gateway_settings + var: settings_list + tags: settings + - role: gateway_http_ports + var: http_ports_list + tags: http_ports + - role: gateway_organizations + var: controller_organizations + tags: organizations + - role: gateway_service_clusters + var: service_clusters_list + tags: service_clusters + - role: gateway_service_keys + var: service_keys_list + tags: service_keys + - role: gateway_service_nodes + var: service_nodes_list + tags: service_nodes + - role: gateway_services + var: services_list + tags: services + - role: gateway_role_user_assignments + var: role_user_assignments_list + tags: role_user_assignments + - role: gateway_routes + var: routes_list + tags: routes + - role: gateway_teams + var: teams_list + tags: teams +ah_configuration_dispatcher_roles: + - role: hub_namespace + var: ah_namespaces + tags: namespaces + - role: hub_collection + var: ah_collections + tags: collections + - role: hub_ee_registry + var: ah_ee_registries + tags: registries + - role: hub_ee_repository + var: ah_ee_repositories + tags: repos + - role: hub_ee_repository_sync + var: ah_ee_repository_sync + tags: reposync + - role: hub_ee_image + var: ah_ee_images + tags: images + - role: hub_ee_registry_index + var: ah_ee_registries + tags: indices + - role: hub_ee_registry_sync + var: ah_ee_registries + tags: regsync + - role: hub_collection_remote + var: ah_collection_remotes + tags: collectionremote + - role: hub_collection_repository + var: ah_collection_repositories + tags: collectionsrep + - role: hub_collection_repository_sync + var: ah_collection_repositories + tags: collectionsrepsync +controller_configuration_dispatcher_roles: + - role: controller_settings + var: controller_settings + tags: settings + - role: controller_organizations + var: controller_organizations + tags: organizations + assign_galaxy_credentials_to_org: false + assign_default_ee_to_org: false + assign_notification_templates_to_org: false + - role: controller_instances + var: controller_instances + tags: instances + - role: controller_instance_groups + var: controller_instance_groups + tags: instance_groups + - role: controller_labels + var: controller_labels + tags: labels + - role: controller_credential_types + var: controller_credential_types + tags: credential_types + - role: controller_credentials + var: controller_credentials + tags: credentials + - role: controller_credential_input_sources + var: controller_credential_input_sources + tags: credential_input_sources + - role: controller_execution_environments + var: controller_execution_environments + tags: execution_environments + - role: controller_notification_templates + var: controller_notifications + tags: notification_templates + - role: controller_organizations + var: controller_organizations + tags: organizations + assign_galaxy_credentials_to_org: true + assign_default_ee_to_org: true + assign_notification_templates_to_org: true + - role: controller_projects + var: controller_projects + tags: projects + - role: controller_inventories + var: controller_inventories + tags: inventories + - role: controller_inventory_sources + var: controller_inventory_sources + tags: inventory_sources + - role: controller_inventory_source_update + var: controller_inventory_sources + tags: inventory_sources + - role: controller_hosts + var: controller_hosts + tags: hosts + - role: controller_bulk_host_create + var: controller_bulk_hosts + tags: bulk_hosts + - role: controller_job_templates + var: controller_templates + tags: job_templates + - role: controller_workflow_job_templates + var: controller_workflows + tags: workflow_job_templates + - role: controller_schedules + var: controller_schedules + tags: schedules + - role: controller_job_launch + var: controller_launch_jobs + tags: job_launch + - role: controller_workflow_launch + var: controller_workflow_launch_jobs + tags: workflow_launch +eda_configuration_dispatcher_roles: + - role: eda_credentials + var: eda_credentials + tags: credential + - role: eda_controller_tokens + var: eda_controller_tokens + tags: controller_token + - role: eda_projects + var: eda_projects + tags: project + # - role: eda_project_sync + # var: eda_projects + # tags: project_sync + - role: eda_decision_environments + var: eda_decision_environments + tags: decision_environment + - role: eda_rulebook_activations + var: eda_rulebook_activations + tags: rulebook_activation + +platform_configuration_dispatcher_roles: > + {{ gateway_configuration_dispatcher_roles + + ah_configuration_dispatcher_roles + + controller_configuration_dispatcher_roles + + eda_configuration_dispatcher_roles + }} + +... diff --git a/roles/dispatch/meta/argument_specs.yml b/roles/dispatch/meta/argument_specs.yml new file mode 100644 index 000000000..4f908e779 --- /dev/null +++ b/roles/dispatch/meta/argument_specs.yml @@ -0,0 +1,238 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to call other roles to create objects on Ansible Automation Platform. + options: + gateway_configuration_dispatcher_roles: + default: + - role: gateway_authenticator + var: authenticators_list + tags: authenticators + - role: gateway_authenticator_map + var: authenticator_maps_list + tags: authenticator_maps + - role: gateway_settings + var: settings_list + tags: settings + - role: gateway_http_ports + var: http_ports_list + tags: http_ports + - role: gateway_organizations + var: organizations_list + tags: organizations + - role: gateway_service_clusters + var: service_clusters_list + tags: service_clusters + - role: gateway_service_keys + var: service_keys_list + tags: service_keys + - role: gateway_service_nodes + var: service_nodes_list + tags: service_nodes + - role: gateway_services + var: services_list + tags: services + - role: gateway_role_user_assignments + var: role_user_assignments_list + tags: role_user_assignments + - role: gateway_routes + var: routes_list + tags: routes + - role: gateway_teams + var: teams_list + tags: teams + controller_configuration_dispatcher_roles: + default: + - role: controller_settings + var: controller_settings + tags: settings + - role: controller_instances + var: controller_instances + tags: instances + - role: controller_instance_groups + var: controller_instance_groups + tags: instance_groups + - role: controller_labels + var: controller_labels + tags: labels + - role: controller_credential_types + var: controller_credential_types + tags: credential_types + - role: controller_credentials + var: controller_credentials + tags: credentials + - role: controller_credential_input_sources + var: controller_credential_input_sources + tags: credential_input_sources + - role: controller_execution_environments + var: controller_execution_environments + tags: execution_environments + - role: controller_notification_templates + var: controller_notifications + tags: notification_templates + - role: controller_projects + var: controller_projects + tags: projects + - role: controller_inventories + var: controller_inventories + tags: inventories + - role: controller_inventory_sources + var: controller_inventory_sources + tags: inventory_sources + - role: controller_inventory_source_update + var: controller_inventory_sources + tags: inventory_sources + - role: controller_applications + var: controller_applications + tags: applications + - role: controller_hosts + var: controller_hosts + tags: hosts + - role: controller_bulk_host_create + var: controller_bulk_hosts + tags: bulk_hosts + - role: controller_groups + var: controller_groups + tags: inventories + - role: controller_job_templates + var: controller_templates + tags: job_templates + - role: controller_workflow_job_templates + var: controller_workflows + tags: workflow_job_templates + - role: controller_schedules + var: controller_schedules + tags: schedules + - role: controller_roles + var: controller_roles + tags: roles + - role: controller_job_launch + var: controller_launch_jobs + tags: job_launch + - role: controller_workflow_launch + var: controller_workflow_launch_jobs + tags: workflow_launch + ah_configuration_dispatcher_roles: + default: + - role: pah_group + var: ah_groups + tags: groups + - role: pah_user + var: ah_users + tags: users + - role: pah_namespace + var: ah_namespaces + tags: namespaces + - role: pah_collection + var: ah_collections + tags: collections + - role: pah_ee_registry + var: ah_ee_registries + tags: registries + - role: pah_ee_repository + var: ah_ee_repositories + tags: repos + - role: pah_ee_repository_sync + var: ah_ee_repository_sync + tags: reposync + - role: pah_ee_image + var: ah_ee_images + tags: images + - role: pah_ee_registry_index + var: ah_ee_registries + tags: indices + - role: pah_ee_registry_sync + var: ah_ee_registries + tags: regsync + - role: pah_collection_remote + var: ah_collection_remotes + tags: collectionremote + - role: pah_collection_repository + var: ah_collection_repositories + tags: collectionsrep + - role: pah_collection_repository_sync + var: ah_collection_repositories + tags: collectionsrepsync + - role: pah_group_roles + var: ah_group_roles + tags: group_roles + eda_configuration_dispatcher_roles: + default: + - role: eda_user + var: eda_users + tags: user + - role: eda_credential + var: eda_credentials + tags: credential + - role: eda_controller_token + var: eda_controller_tokens + tags: controller_token + - role: eda_project + var: eda_projects + tags: project + - role: eda_project_sync + var: eda_projects + tags: project_sync + - role: eda_decision_environment + var: eda_decision_environments + tags: decision_environment + - role: eda_rulebook_activation + var: eda_rulebook_activations + tags: rulebook_activation + + # Async variables + gateway_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + gateway_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + gateway_configuration_secure_logging: + default: false + required: false + type: bool + description: This variable enables secure logging across all roles as a default. + + # Generic across all roles + gateway_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + gateway_hostname: + default: None + required: false + description: URL to the automation platform gateway. + type: str + gateway_validate_certs: + default: true + required: false + description: Whether or not to validate the automation platform gateway's SSL certificate. + type: str + gateway_username: + default: None + required: false + description: user on the automation platform gateway. Either username / password or oauthtoken need to be specified. + type: str + gateway_password: + default: None + required: false + description: > + Gateway user's password on the automation platform gateway. + This should be stored in an Ansible Vault at vars/gateway-secrets.yml or elsewhere and called from a parent playbook. + Either username / password or oauthtoken need to be specified. + type: str + gateway_oauthtoken: + default: None + required: false + description: > + Gateway user's token on the automation platform gateway. + 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. + type: str +... diff --git a/roles/dispatch/meta/main.yml b/roles/dispatch/meta/main.yml new file mode 100644 index 000000000..c67c11450 --- /dev/null +++ b/roles/dispatch/meta/main.yml @@ -0,0 +1,49 @@ +--- +galaxy_info: + role_name: "dispatch" + author: Tom Pag, Alan Wong, and Sean Sullivan + description: "An Ansible Role which launches all of the roles within the platform_configuration Collection." + company: "Red Hat" + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + license: GPL-3.0-or-later + + min_ansible_version: 2.16.0 + + # Optionally specify the branch Galaxy will use when accessing the GitHub + # repo for this role. During role install, if no tags are available, + # Galaxy will use this branch. During import Galaxy will access files on + # this branch. If Travis integration is configured, only notifications for this + # branch will be accepted. Otherwise, in all cases, the repo's default branch + # (usually master) will be used. + # github_branch: + + # + # platforms is a list of platforms, and each platform has a name and a list of versions. + # + platforms: + - name: "EL" + versions: + - "all" + + galaxy_tags: + - "controller" + - "ah" + - "aap" + - "eda" + - "gateway" + - "awx" + - "configuration" + - "dispatch" + +collections: + - ansible.platform + - ansible.controller + - ansible.hub + - ansible.eda + - awx.awx + +dependencies: [] +... diff --git a/roles/dispatch/tasks/main.yml b/roles/dispatch/tasks/main.yml new file mode 100644 index 000000000..9088f7e04 --- /dev/null +++ b/roles/dispatch/tasks/main.yml @@ -0,0 +1,21 @@ +--- +- name: "Run the following infra.platform_configuration roles: {{ platform_configuration_dispatcher_roles | map(attribute='role') | join(', ') }}" + ansible.builtin.include_role: + name: "{{ __role.role }}" + apply: + tags: "{{ __role.tags }}" + when: vars[__role.var] is defined + tags: always + loop: "{{ platform_configuration_dispatcher_roles }}" + loop_control: + loop_var: __role + vars: + assign_galaxy_credentials_to_org: "{{ __role.assign_galaxy_credentials_to_org | default(false) }}" + assign_default_ee_to_org: "{{ __role.assign_default_ee_to_org | default(false) }}" + assign_notification_templates_to_org: "{{ __role.assign_notification_templates_to_org | default(false) }}" + +- name: "Fail the playbook if there were errors (check mode only)" + ansible.builtin.fail: + msg: "The execution has failed because of errors (probably due to missing dependencies caused by check mode)." + when: ansible_check_mode and error_flag is defined and error_flag +... diff --git a/roles/eda_credential/tests/vars/credentials.yml b/roles/dispatch/tests/configs/credentials.yml similarity index 100% rename from roles/eda_credential/tests/vars/credentials.yml rename to roles/dispatch/tests/configs/credentials.yml diff --git a/roles/dispatch/tests/configs/images.yml b/roles/dispatch/tests/configs/images.yml new file mode 100644 index 000000000..151a031b5 --- /dev/null +++ b/roles/dispatch/tests/configs/images.yml @@ -0,0 +1,10 @@ +--- +ah_ee_images: + - name: ansible-automation-platform-22-early-access/ee-supported-rhel8:2.0.0-15 + state: present + append: false + tags: + - v2 + - "2.0" + - prod1 +... diff --git a/roles/dispatch/tests/configs/inventories.yml b/roles/dispatch/tests/configs/inventories.yml new file mode 100644 index 000000000..bca330803 --- /dev/null +++ b/roles/dispatch/tests/configs/inventories.yml @@ -0,0 +1,11 @@ +--- +controller_inventories: + - name: test1 + description: test inventory + organization: Default + - name: test2 + organization: Default + kind: smart + host_filter: "name__icontains=test" + variables: '{"key1":"val1", "key2":"val2"}' +... diff --git a/roles/dispatch/tests/configs/projects.yml b/roles/dispatch/tests/configs/projects.yml new file mode 100644 index 000000000..183a1c44f --- /dev/null +++ b/roles/dispatch/tests/configs/projects.yml @@ -0,0 +1,24 @@ +--- +controller_projects: + - name: Test Project + scm_type: git + scm_url: https://github.com/ansible/tower-example.git + scm_branch: master + scm_clean: true + description: Test Project 1 + organization: Satellite + update: true + wait: true + - name: Test Project 2 + scm_type: git + scm_url: https://github.com/ansible/tower-example.git + description: Test Project 2 + organization: Satellite + wait: true + - name: Test Inventory source project + scm_type: git + scm_url: https://github.com/ansible/ansible-examples.git + description: ansible-examples + organization: Satellite + wait: true +... diff --git a/roles/dispatch/tests/configs/registries.yml b/roles/dispatch/tests/configs/registries.yml new file mode 100644 index 000000000..1ca54dd40 --- /dev/null +++ b/roles/dispatch/tests/configs/registries.yml @@ -0,0 +1,7 @@ +--- +ah_ee_registries: + - name: registry.redhat + url: registry.redhat.io + username: myuser + password: mypassword +... diff --git a/roles/dispatch/tests/configs/repositories.yml b/roles/dispatch/tests/configs/repositories.yml new file mode 100644 index 000000000..3372ad716 --- /dev/null +++ b/roles/dispatch/tests/configs/repositories.yml @@ -0,0 +1,6 @@ +--- +ah_ee_repositories: + - name: abc123 + description: string + readme: "# My EE repository" +... diff --git a/roles/dispatch/tests/test.yml b/roles/dispatch/tests/test.yml new file mode 100644 index 000000000..a67723b48 --- /dev/null +++ b/roles/dispatch/tests/test.yml @@ -0,0 +1,25 @@ +--- +- name: Run dispatch job to Controller + hosts: localhost + connection: local + gather_facts: false + vars: + controller_validate_certs: false + controller_hostname: controller.example.com + controller_username: admin + controller_password: changeme + + collections: + - awx.awx + + pre_tasks: + - name: Include vars from controller_configs directory + ansible.builtin.include_vars: + dir: ./configs + extensions: ["yml"] + tags: always + + roles: + - ../../dispatch + +... diff --git a/roles/controller_token/README.md b/roles/eda_controller_tokens/README.md similarity index 100% rename from roles/controller_token/README.md rename to roles/eda_controller_tokens/README.md diff --git a/roles/controller_token/defaults/main.yml b/roles/eda_controller_tokens/defaults/main.yml similarity index 100% rename from roles/controller_token/defaults/main.yml rename to roles/eda_controller_tokens/defaults/main.yml diff --git a/roles/controller_token/meta/argument_specs.yml b/roles/eda_controller_tokens/meta/argument_specs.yml similarity index 100% rename from roles/controller_token/meta/argument_specs.yml rename to roles/eda_controller_tokens/meta/argument_specs.yml diff --git a/roles/controller_token/meta/main.yml b/roles/eda_controller_tokens/meta/main.yml similarity index 100% rename from roles/controller_token/meta/main.yml rename to roles/eda_controller_tokens/meta/main.yml diff --git a/roles/controller_token/tasks/main.yml b/roles/eda_controller_tokens/tasks/main.yml similarity index 100% rename from roles/controller_token/tasks/main.yml rename to roles/eda_controller_tokens/tasks/main.yml diff --git a/roles/controller_token/tests/test.yml b/roles/eda_controller_tokens/tests/test.yml similarity index 100% rename from roles/controller_token/tests/test.yml rename to roles/eda_controller_tokens/tests/test.yml diff --git a/roles/controller_token/tests/vars/user_tokens.yml b/roles/eda_controller_tokens/tests/vars/user_tokens.yml similarity index 100% rename from roles/controller_token/tests/vars/user_tokens.yml rename to roles/eda_controller_tokens/tests/vars/user_tokens.yml diff --git a/roles/eda_credential/README.md b/roles/eda_credentials/README.md similarity index 100% rename from roles/eda_credential/README.md rename to roles/eda_credentials/README.md diff --git a/roles/eda_credential/defaults/main.yml b/roles/eda_credentials/defaults/main.yml similarity index 100% rename from roles/eda_credential/defaults/main.yml rename to roles/eda_credentials/defaults/main.yml diff --git a/roles/eda_credential/meta/argument_specs.yml b/roles/eda_credentials/meta/argument_specs.yml similarity index 100% rename from roles/eda_credential/meta/argument_specs.yml rename to roles/eda_credentials/meta/argument_specs.yml diff --git a/roles/eda_credential/meta/main.yml b/roles/eda_credentials/meta/main.yml similarity index 100% rename from roles/eda_credential/meta/main.yml rename to roles/eda_credentials/meta/main.yml diff --git a/roles/eda_credential/tasks/main.yml b/roles/eda_credentials/tasks/main.yml similarity index 100% rename from roles/eda_credential/tasks/main.yml rename to roles/eda_credentials/tasks/main.yml diff --git a/roles/eda_credential/tests/test.yml b/roles/eda_credentials/tests/test.yml similarity index 100% rename from roles/eda_credential/tests/test.yml rename to roles/eda_credentials/tests/test.yml diff --git a/roles/eda_credentials/tests/vars/credentials.yml b/roles/eda_credentials/tests/vars/credentials.yml new file mode 100644 index 000000000..f8e23e353 --- /dev/null +++ b/roles/eda_credentials/tests/vars/credentials.yml @@ -0,0 +1,13 @@ +--- +eda_credentials: + - name: my_github_user + description: my GitHub Credential + credential_type: 'GitHub Personal Access Token' + username: githubuser + secret: my_github_token + - name: my_gitlab_user + description: my GitLab Credential + credential_type: 'GitLab Personal Access Token' + username: gitlabuser + secret: my_gitlab_token +... diff --git a/roles/eda_decision_environment/README.md b/roles/eda_decision_environments/README.md similarity index 100% rename from roles/eda_decision_environment/README.md rename to roles/eda_decision_environments/README.md diff --git a/roles/eda_decision_environment/defaults/main.yml b/roles/eda_decision_environments/defaults/main.yml similarity index 100% rename from roles/eda_decision_environment/defaults/main.yml rename to roles/eda_decision_environments/defaults/main.yml diff --git a/roles/eda_decision_environment/meta/argument_specs.yml b/roles/eda_decision_environments/meta/argument_specs.yml similarity index 100% rename from roles/eda_decision_environment/meta/argument_specs.yml rename to roles/eda_decision_environments/meta/argument_specs.yml diff --git a/roles/eda_decision_environment/meta/main.yml b/roles/eda_decision_environments/meta/main.yml similarity index 100% rename from roles/eda_decision_environment/meta/main.yml rename to roles/eda_decision_environments/meta/main.yml diff --git a/roles/eda_decision_environment/tasks/main.yml b/roles/eda_decision_environments/tasks/main.yml similarity index 100% rename from roles/eda_decision_environment/tasks/main.yml rename to roles/eda_decision_environments/tasks/main.yml diff --git a/roles/eda_decision_environment/tests/test.yml b/roles/eda_decision_environments/tests/test.yml similarity index 100% rename from roles/eda_decision_environment/tests/test.yml rename to roles/eda_decision_environments/tests/test.yml diff --git a/roles/eda_decision_environment/tests/vars/decision_environments.yml b/roles/eda_decision_environments/tests/vars/decision_environments.yml similarity index 100% rename from roles/eda_decision_environment/tests/vars/decision_environments.yml rename to roles/eda_decision_environments/tests/vars/decision_environments.yml diff --git a/roles/eda_project/README.md b/roles/eda_projects/README.md similarity index 100% rename from roles/eda_project/README.md rename to roles/eda_projects/README.md diff --git a/roles/eda_project/defaults/main.yml b/roles/eda_projects/defaults/main.yml similarity index 100% rename from roles/eda_project/defaults/main.yml rename to roles/eda_projects/defaults/main.yml diff --git a/roles/eda_project/meta/argument_specs.yml b/roles/eda_projects/meta/argument_specs.yml similarity index 100% rename from roles/eda_project/meta/argument_specs.yml rename to roles/eda_projects/meta/argument_specs.yml diff --git a/roles/eda_project/meta/main.yml b/roles/eda_projects/meta/main.yml similarity index 100% rename from roles/eda_project/meta/main.yml rename to roles/eda_projects/meta/main.yml diff --git a/roles/eda_project/tasks/main.yml b/roles/eda_projects/tasks/main.yml similarity index 100% rename from roles/eda_project/tasks/main.yml rename to roles/eda_projects/tasks/main.yml diff --git a/roles/eda_project/tests/test.yml b/roles/eda_projects/tests/test.yml similarity index 100% rename from roles/eda_project/tests/test.yml rename to roles/eda_projects/tests/test.yml diff --git a/roles/eda_project/tests/vars/projects.yml b/roles/eda_projects/tests/vars/projects.yml similarity index 100% rename from roles/eda_project/tests/vars/projects.yml rename to roles/eda_projects/tests/vars/projects.yml diff --git a/roles/eda_rulebook_activation/README.md b/roles/eda_rulebook_activations/README.md similarity index 100% rename from roles/eda_rulebook_activation/README.md rename to roles/eda_rulebook_activations/README.md diff --git a/roles/eda_rulebook_activation/defaults/main.yml b/roles/eda_rulebook_activations/defaults/main.yml similarity index 100% rename from roles/eda_rulebook_activation/defaults/main.yml rename to roles/eda_rulebook_activations/defaults/main.yml diff --git a/roles/eda_rulebook_activation/meta/argument_specs.yml b/roles/eda_rulebook_activations/meta/argument_specs.yml similarity index 100% rename from roles/eda_rulebook_activation/meta/argument_specs.yml rename to roles/eda_rulebook_activations/meta/argument_specs.yml diff --git a/roles/eda_rulebook_activation/meta/main.yml b/roles/eda_rulebook_activations/meta/main.yml similarity index 100% rename from roles/eda_rulebook_activation/meta/main.yml rename to roles/eda_rulebook_activations/meta/main.yml diff --git a/roles/eda_rulebook_activation/tasks/main.yml b/roles/eda_rulebook_activations/tasks/main.yml similarity index 100% rename from roles/eda_rulebook_activation/tasks/main.yml rename to roles/eda_rulebook_activations/tasks/main.yml diff --git a/roles/eda_rulebook_activation/tests/test.yml b/roles/eda_rulebook_activations/tests/test.yml similarity index 100% rename from roles/eda_rulebook_activation/tests/test.yml rename to roles/eda_rulebook_activations/tests/test.yml diff --git a/roles/eda_rulebook_activation/tests/vars/rulebook_activations.yml b/roles/eda_rulebook_activations/tests/vars/rulebook_activations.yml similarity index 100% rename from roles/eda_rulebook_activation/tests/vars/rulebook_activations.yml rename to roles/eda_rulebook_activations/tests/vars/rulebook_activations.yml diff --git a/roles/eda_user/README.md b/roles/eda_users/README.md similarity index 100% rename from roles/eda_user/README.md rename to roles/eda_users/README.md diff --git a/roles/eda_user/defaults/main.yml b/roles/eda_users/defaults/main.yml similarity index 100% rename from roles/eda_user/defaults/main.yml rename to roles/eda_users/defaults/main.yml diff --git a/roles/eda_user/meta/argument_specs.yml b/roles/eda_users/meta/argument_specs.yml similarity index 100% rename from roles/eda_user/meta/argument_specs.yml rename to roles/eda_users/meta/argument_specs.yml diff --git a/roles/eda_user/meta/main.yml b/roles/eda_users/meta/main.yml similarity index 100% rename from roles/eda_user/meta/main.yml rename to roles/eda_users/meta/main.yml diff --git a/roles/eda_user/tasks/main.yml b/roles/eda_users/tasks/main.yml similarity index 100% rename from roles/eda_user/tasks/main.yml rename to roles/eda_users/tasks/main.yml diff --git a/roles/eda_user/tests/test.yml b/roles/eda_users/tests/test.yml similarity index 100% rename from roles/eda_user/tests/test.yml rename to roles/eda_users/tests/test.yml diff --git a/roles/eda_user/tests/vars/users.yml b/roles/eda_users/tests/vars/users.yml similarity index 100% rename from roles/eda_user/tests/vars/users.yml rename to roles/eda_users/tests/vars/users.yml diff --git a/roles/gateway_applications/meta/argument_specs.yml b/roles/gateway_applications/meta/argument_specs.yml index 15241aa3c..b3a4351b7 100644 --- a/roles/gateway_applications/meta/argument_specs.yml +++ b/roles/gateway_applications/meta/argument_specs.yml @@ -78,8 +78,8 @@ argument_specs: default: 1 required: false description: This variable sets delay between retries across all roles as a default. - platform_configuration_async_dir: - default: null null + gateway_configuration_async_dir: + default: null required: false description: > Sets the directory to write the results file for async tasks. diff --git a/roles/gateway_applications/tasks/main.yml b/roles/gateway_applications/tasks/main.yml index 82d85aebf..cb10a181b 100644 --- a/roles/gateway_applications/tasks/main.yml +++ b/roles/gateway_applications/tasks/main.yml @@ -32,7 +32,7 @@ register: __gateway_applications_job_async changed_when: not __gateway_applications_job_async.changed vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" - name: Applications | Wait for finish the configuration ansible.builtin.async_status: @@ -47,5 +47,5 @@ when: __gateway_applications_job_async_results_item.ansible_job_id is defined no_log: "{{ applications_secure_logging }}" vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" ... diff --git a/roles/gateway_authenticator_maps/meta/argument_specs.yml b/roles/gateway_authenticator_maps/meta/argument_specs.yml index 29c47e596..a839146b8 100644 --- a/roles/gateway_authenticator_maps/meta/argument_specs.yml +++ b/roles/gateway_authenticator_maps/meta/argument_specs.yml @@ -79,7 +79,7 @@ argument_specs: default: 1 required: false description: This variable sets delay between retries across all roles as a default. - platform_configuration_async_dir: + gateway_configuration_async_dir: default: null required: false description: > diff --git a/roles/gateway_authenticator_maps/tasks/main.yml b/roles/gateway_authenticator_maps/tasks/main.yml index 3933d9c2f..cf118a609 100644 --- a/roles/gateway_authenticator_maps/tasks/main.yml +++ b/roles/gateway_authenticator_maps/tasks/main.yml @@ -30,7 +30,7 @@ register: __gateway_authenticator_maps_job_async changed_when: not __gateway_authenticator_maps_job_async.changed vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" - name: Authenticator Map | Wait for finish the configuration ansible.builtin.async_status: @@ -45,5 +45,5 @@ when: __gateway_authenticator_maps_job_async_results_item.ansible_job_id is defined no_log: "{{ authenticator_maps_secure_logging }}" vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" ... diff --git a/roles/gateway_authenticators/meta/argument_specs.yml b/roles/gateway_authenticators/meta/argument_specs.yml index 79a90acc8..d38dd6eb3 100644 --- a/roles/gateway_authenticators/meta/argument_specs.yml +++ b/roles/gateway_authenticators/meta/argument_specs.yml @@ -66,7 +66,7 @@ argument_specs: default: 1 required: false description: This variable sets delay between retries across all roles as a default. - platform_configuration_async_dir: + gateway_configuration_async_dir: default: null required: false description: > diff --git a/roles/gateway_authenticators/tasks/main.yml b/roles/gateway_authenticators/tasks/main.yml index a58da092e..27eb9b1b6 100644 --- a/roles/gateway_authenticators/tasks/main.yml +++ b/roles/gateway_authenticators/tasks/main.yml @@ -28,7 +28,7 @@ register: __gateway_authenticators_job_async changed_when: not __gateway_authenticators_job_async.changed vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" - name: Authenticators | Wait for finish the configuration ansible.builtin.async_status: @@ -43,5 +43,5 @@ when: __gateway_authenticators_job_async_results_item.ansible_job_id is defined no_log: "{{ authenticators_secure_logging }}" vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" ... diff --git a/roles/gateway_http_ports/meta/argument_specs.yml b/roles/gateway_http_ports/meta/argument_specs.yml index 1e09a1bf6..34638fc41 100644 --- a/roles/gateway_http_ports/meta/argument_specs.yml +++ b/roles/gateway_http_ports/meta/argument_specs.yml @@ -52,7 +52,7 @@ argument_specs: default: 1 required: false description: This variable sets delay between retries across all roles as a default. - platform_configuration_async_dir: + gateway_configuration_async_dir: default: null required: false description: > diff --git a/roles/gateway_http_ports/tasks/main.yml b/roles/gateway_http_ports/tasks/main.yml index e4b90bcbd..0c878df56 100644 --- a/roles/gateway_http_ports/tasks/main.yml +++ b/roles/gateway_http_ports/tasks/main.yml @@ -24,7 +24,7 @@ register: __gateway_http_ports_job_async changed_when: not __gateway_http_ports_job_async.changed vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" - name: Http Ports | Wait for finish the configuration ansible.builtin.async_status: @@ -39,5 +39,5 @@ when: __gateway_http_ports_job_async_results_item.ansible_job_id is defined no_log: "{{ http_ports_secure_logging }}" vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" ... diff --git a/roles/gateway_organizations/meta/argument_specs.yml b/roles/gateway_organizations/meta/argument_specs.yml index a18629f9c..99479f38d 100644 --- a/roles/gateway_organizations/meta/argument_specs.yml +++ b/roles/gateway_organizations/meta/argument_specs.yml @@ -42,7 +42,7 @@ argument_specs: default: 1 required: false description: This variable sets delay between retries across all roles as a default. - platform_configuration_async_dir: + gateway_configuration_async_dir: default: null required: false description: > diff --git a/roles/gateway_organizations/tasks/main.yml b/roles/gateway_organizations/tasks/main.yml index 7f2b27324..aeb66f96e 100644 --- a/roles/gateway_organizations/tasks/main.yml +++ b/roles/gateway_organizations/tasks/main.yml @@ -13,7 +13,7 @@ gateway_token: "{{ gateway_oauthtoken | default(omit, true) }}" gateway_request_timeout: "{{ gateway_request_timeout | default(omit, 10) }}" gateway_validate_certs: "{{ gateway_validate_certs | default(omit) }}" - loop: "{{ organizations if organizations is defined else organizations_list }}" + loop: "{{ organizations if organizations is defined else controller_organizations }}" loop_control: loop_var: __gateway_organizations_item no_log: "{{ organizations_secure_logging }}" @@ -22,7 +22,7 @@ register: __gateway_organizations_job_async changed_when: not __gateway_organizations_job_async.changed vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" - name: Organizations | Wait for finish the configuration ansible.builtin.async_status: @@ -37,5 +37,5 @@ when: __gateway_organizations_job_async_results_item.ansible_job_id is defined no_log: "{{ organizations_secure_logging }}" vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" ... diff --git a/roles/gateway_role_user_assignments/meta/argument_specs.yml b/roles/gateway_role_user_assignments/meta/argument_specs.yml index a97df8138..540dccc03 100644 --- a/roles/gateway_role_user_assignments/meta/argument_specs.yml +++ b/roles/gateway_role_user_assignments/meta/argument_specs.yml @@ -57,7 +57,7 @@ argument_specs: default: 1 required: false description: This variable sets delay between retries across all roles as a default. - platform_configuration_async_dir: + gateway_configuration_async_dir: default: null required: false description: > diff --git a/roles/gateway_role_user_assignments/tasks/main.yml b/roles/gateway_role_user_assignments/tasks/main.yml index 89a6afe39..6dcfb697e 100644 --- a/roles/gateway_role_user_assignments/tasks/main.yml +++ b/roles/gateway_role_user_assignments/tasks/main.yml @@ -24,7 +24,7 @@ register: __gateway_role_user_assignments_job_async changed_when: not __gateway_role_user_assignments_job_async.changed vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" - name: Role User Assignments | Wait for finish the configuration ansible.builtin.async_status: @@ -39,5 +39,5 @@ when: __gateway_role_user_assignments_job_async_results_item.ansible_job_id is defined no_log: "{{ role_user_assignments_secure_logging }}" vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" ... diff --git a/roles/gateway_routes/meta/argument_specs.yml b/roles/gateway_routes/meta/argument_specs.yml index c5223eadd..755871feb 100644 --- a/roles/gateway_routes/meta/argument_specs.yml +++ b/roles/gateway_routes/meta/argument_specs.yml @@ -79,7 +79,7 @@ argument_specs: default: 1 required: false description: This variable sets delay between retries across all roles as a default. - platform_configuration_async_dir: + gateway_configuration_async_dir: default: null required: false description: > diff --git a/roles/gateway_routes/tasks/main.yml b/roles/gateway_routes/tasks/main.yml index 62a31c70b..054ba42c0 100644 --- a/roles/gateway_routes/tasks/main.yml +++ b/roles/gateway_routes/tasks/main.yml @@ -30,7 +30,7 @@ register: __gateway_routes_job_async changed_when: not __gateway_routes_job_async.changed vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" - name: Routes | Wait for finish the configuration ansible.builtin.async_status: @@ -45,5 +45,5 @@ when: __gateway_routes_job_async_results_item.ansible_job_id is defined no_log: "{{ routes_secure_logging }}" vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" ... diff --git a/roles/gateway_service_clusters/meta/argument_specs.yml b/roles/gateway_service_clusters/meta/argument_specs.yml index 27b71a50a..1220f2c45 100644 --- a/roles/gateway_service_clusters/meta/argument_specs.yml +++ b/roles/gateway_service_clusters/meta/argument_specs.yml @@ -74,7 +74,7 @@ argument_specs: default: 1 required: false description: This variable sets delay between retries across all roles as a default. - platform_configuration_async_dir: + gateway_configuration_async_dir: default: null required: false description: > diff --git a/roles/gateway_service_clusters/tasks/main.yml b/roles/gateway_service_clusters/tasks/main.yml index 40f1e07dc..a83f9970d 100644 --- a/roles/gateway_service_clusters/tasks/main.yml +++ b/roles/gateway_service_clusters/tasks/main.yml @@ -32,7 +32,7 @@ register: __gateway_service_clusters_job_async changed_when: not __gateway_service_clusters_job_async.changed vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" - name: Service Clusters | Wait for finish the configuration ansible.builtin.async_status: @@ -47,5 +47,5 @@ when: __gateway_service_clusters_job_async_results_item.ansible_job_id is defined no_log: "{{ service_clusters_secure_logging }}" vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" ... diff --git a/roles/gateway_service_keys/meta/argument_specs.yml b/roles/gateway_service_keys/meta/argument_specs.yml index c4dc163d8..057b27a71 100644 --- a/roles/gateway_service_keys/meta/argument_specs.yml +++ b/roles/gateway_service_keys/meta/argument_specs.yml @@ -62,7 +62,7 @@ argument_specs: default: 1 required: false description: This variable sets delay between retries across all roles as a default. - platform_configuration_async_dir: + gateway_configuration_async_dir: default: null required: false description: > diff --git a/roles/gateway_service_keys/tasks/main.yml b/roles/gateway_service_keys/tasks/main.yml index 0207f30c6..4c2abbaca 100644 --- a/roles/gateway_service_keys/tasks/main.yml +++ b/roles/gateway_service_keys/tasks/main.yml @@ -27,7 +27,7 @@ register: __gateway_service_keys_job_async changed_when: not __gateway_service_keys_job_async.changed vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" - name: Service Keys | Wait for finish the configuration ansible.builtin.async_status: @@ -42,5 +42,5 @@ when: __gateway_service_keys_job_async_results_item.ansible_job_id is defined no_log: "{{ service_keys_secure_logging }}" vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" ... diff --git a/roles/gateway_service_nodes/meta/argument_specs.yml b/roles/gateway_service_nodes/meta/argument_specs.yml index 655b643b4..9455153b7 100644 --- a/roles/gateway_service_nodes/meta/argument_specs.yml +++ b/roles/gateway_service_nodes/meta/argument_specs.yml @@ -50,7 +50,7 @@ argument_specs: default: 1 required: false description: This variable sets delay between retries across all roles as a default. - platform_configuration_async_dir: + gateway_configuration_async_dir: default: null required: false description: > diff --git a/roles/gateway_service_nodes/tasks/main.yml b/roles/gateway_service_nodes/tasks/main.yml index 57d0393c9..319d2c523 100644 --- a/roles/gateway_service_nodes/tasks/main.yml +++ b/roles/gateway_service_nodes/tasks/main.yml @@ -24,7 +24,7 @@ register: __gateway_service_nodes_job_async changed_when: not __gateway_service_nodes_job_async.changed vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" - name: Service Nodes | Wait for finish the configuration ansible.builtin.async_status: @@ -39,5 +39,5 @@ when: __gateway_service_nodes_job_async_results_item.ansible_job_id is defined no_log: "{{ service_nodes_secure_logging }}" vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" ... diff --git a/roles/gateway_services/meta/argument_specs.yml b/roles/gateway_services/meta/argument_specs.yml index 57ecdd605..ced7b49e6 100644 --- a/roles/gateway_services/meta/argument_specs.yml +++ b/roles/gateway_services/meta/argument_specs.yml @@ -82,7 +82,7 @@ argument_specs: default: 1 required: false description: This variable sets delay between retries across all roles as a default. - platform_configuration_async_dir: + gateway_configuration_async_dir: default: null required: false description: > diff --git a/roles/gateway_services/tasks/main.yml b/roles/gateway_services/tasks/main.yml index f8e2fccee..2966e7b0c 100644 --- a/roles/gateway_services/tasks/main.yml +++ b/roles/gateway_services/tasks/main.yml @@ -31,7 +31,7 @@ register: __gateway_services_job_async changed_when: not __gateway_services_job_async.changed vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" - name: Services | Wait for finish the configuration ansible.builtin.async_status: @@ -46,5 +46,5 @@ when: __gateway_services_job_async_results_item.ansible_job_id is defined no_log: "{{ services_secure_logging }}" vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" ... diff --git a/roles/gateway_platform_settings/README.md b/roles/gateway_settings/README.md similarity index 100% rename from roles/gateway_platform_settings/README.md rename to roles/gateway_settings/README.md diff --git a/roles/gateway_platform_settings/defaults/main.yml b/roles/gateway_settings/defaults/main.yml similarity index 100% rename from roles/gateway_platform_settings/defaults/main.yml rename to roles/gateway_settings/defaults/main.yml diff --git a/roles/gateway_platform_settings/meta/argument_specs.yml b/roles/gateway_settings/meta/argument_specs.yml similarity index 98% rename from roles/gateway_platform_settings/meta/argument_specs.yml rename to roles/gateway_settings/meta/argument_specs.yml index 34a57e446..0bd10a9f4 100644 --- a/roles/gateway_platform_settings/meta/argument_specs.yml +++ b/roles/gateway_settings/meta/argument_specs.yml @@ -26,7 +26,7 @@ argument_specs: default: 1 required: false description: This variable sets delay between retries across all roles as a default. - platform_configuration_async_dir: + gateway_configuration_async_dir: default: null required: false description: > diff --git a/roles/gateway_platform_settings/meta/main.yml b/roles/gateway_settings/meta/main.yml similarity index 100% rename from roles/gateway_platform_settings/meta/main.yml rename to roles/gateway_settings/meta/main.yml diff --git a/roles/gateway_platform_settings/tasks/main.yml b/roles/gateway_settings/tasks/main.yml similarity index 100% rename from roles/gateway_platform_settings/tasks/main.yml rename to roles/gateway_settings/tasks/main.yml diff --git a/roles/gateway_teams/meta/argument_specs.yml b/roles/gateway_teams/meta/argument_specs.yml index b9d9c9360..5b3207683 100644 --- a/roles/gateway_teams/meta/argument_specs.yml +++ b/roles/gateway_teams/meta/argument_specs.yml @@ -49,7 +49,7 @@ argument_specs: default: 1 required: false description: This variable sets delay between retries across all roles as a default. - platform_configuration_async_dir: + gateway_configuration_async_dir: default: null required: false description: > diff --git a/roles/gateway_teams/tasks/main.yml b/roles/gateway_teams/tasks/main.yml index 164630ece..ad6553bec 100644 --- a/roles/gateway_teams/tasks/main.yml +++ b/roles/gateway_teams/tasks/main.yml @@ -24,7 +24,7 @@ register: __gateway_teams_job_async changed_when: not __gateway_teams_job_async.changed vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" - name: Teams | Wait for finish the configuration ansible.builtin.async_status: @@ -39,5 +39,5 @@ when: __gateway_teams_job_async_results_item.ansible_job_id is defined no_log: "{{ teams_secure_logging }}" vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" ... diff --git a/roles/gateway_users/meta/argument_specs.yml b/roles/gateway_users/meta/argument_specs.yml index a70bebeca..eb42cddfd 100644 --- a/roles/gateway_users/meta/argument_specs.yml +++ b/roles/gateway_users/meta/argument_specs.yml @@ -82,7 +82,7 @@ argument_specs: default: 1 required: false description: This variable sets delay between retries across all roles as a default. - platform_configuration_async_dir: + gateway_configuration_async_dir: default: null required: false description: > diff --git a/roles/gateway_users/tasks/main.yml b/roles/gateway_users/tasks/main.yml index 2bdfcde39..649650ca5 100644 --- a/roles/gateway_users/tasks/main.yml +++ b/roles/gateway_users/tasks/main.yml @@ -30,7 +30,7 @@ register: __gateway_user_accounts_job_async changed_when: not __gateway_user_accounts_job_async.changed vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" - name: Users | Wait for finish the configuration ansible.builtin.async_status: @@ -45,5 +45,5 @@ when: __gateway_user_accounts_job_async_results_item.ansible_job_id is defined no_log: "{{ users_secure_logging }}" vars: - ansible_async_dir: "{{ platform_configuration_async_dir | default(omit) }}" + ansible_async_dir: "{{ gateway_configuration_async_dir | default(omit) }}" ... diff --git a/roles/global_vars/README.md b/roles/global_vars/README.md new file mode 100644 index 000000000..876fb4e9c --- /dev/null +++ b/roles/global_vars/README.md @@ -0,0 +1,45 @@ +# controller_configuration.global_vars + +## Description + +An ansible role to define global variables that will be available to all of the +roles in the collection, if they are configured as follows: + +```console +# tail -4 meta/main.yml + +dependencies: +# List your role dependencies here, one per line. Be sure to remove the '[]' above, +# if you add dependencies to this list. + - global_vars +``` + +## Provided Variables + +This is currently providing the following variables: + +| Variable Name | Default Value | Required | Description | +|:---|:---:|:---:|:---| +| `operation_translate` | [See the default value below](#operation_translate-default-value) | Yes | Provides translation from object states to human interpretation | + +### operation_translate Default value + +```yaml +--- +operation_translate: + present: + verb: "Create/Update" + action: "creation" + absent: + verb: "Remove" + action: "deletion" +... +``` + +## License + +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) + +## Author + +[Ivan Aragonés](https://github.com/ivarmu) diff --git a/roles/global_vars/defaults/main.yml b/roles/global_vars/defaults/main.yml new file mode 100644 index 000000000..35e450d5f --- /dev/null +++ b/roles/global_vars/defaults/main.yml @@ -0,0 +1,13 @@ +--- +# defaults file for global_vars +operation_translate: + present: + verb: "Create/Update" + action: "creation" + absent: + verb: "Remove" + action: "deletion" + exists: + verb: "Already Exists" + action: "exists" +... diff --git a/roles/global_vars/meta/main.yml b/roles/global_vars/meta/main.yml new file mode 100644 index 000000000..e133cc4ef --- /dev/null +++ b/roles/global_vars/meta/main.yml @@ -0,0 +1,54 @@ +--- +galaxy_info: + author: "Ivan Aragonés" + description: "Global variables to be consumed by any other role in the collection" + company: "Red Hat" + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: GPL-3.0-or-later + + min_ansible_version: 2.15.0 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] +# List your role dependencies here, one per line. Be sure to remove the '[]' above, +# if you add dependencies to this list. +... diff --git a/roles/global_vars/vars/main.yml b/roles/global_vars/vars/main.yml new file mode 100644 index 000000000..3e4311bb5 --- /dev/null +++ b/roles/global_vars/vars/main.yml @@ -0,0 +1,3 @@ +--- +# vars file for global_vars +... diff --git a/roles/hub_collection/tasks/main.yml b/roles/hub_collection/tasks/main.yml index 670900df6..838547d20 100644 --- a/roles/hub_collection/tasks/main.yml +++ b/roles/hub_collection/tasks/main.yml @@ -1,7 +1,7 @@ # Update or destroy Automation Hub Collection --- - name: Get token - ah_token: + ansible.hub.ah_token: ah_host: "{{ ah_host | default(ah_hostname) | default(omit) }}" ah_username: "{{ ah_username | default(omit) }}" ah_password: "{{ ah_password | default(omit) }}" @@ -14,7 +14,7 @@ - ah_collections | length > 1 - name: Update or destroy Automation Hub Collection - ah_collection: + ansible.hub.ah_collection: namespace: "{{ __collection.namespace }}" name: "{{ __collection.name }}" version: "{{ __collection.version | default(omit) }}" diff --git a/roles/hub_collection_remote/tasks/main.yml b/roles/hub_collection_remote/tasks/main.yml index c17d7a01c..bac66d1e5 100644 --- a/roles/hub_collection_remote/tasks/main.yml +++ b/roles/hub_collection_remote/tasks/main.yml @@ -1,7 +1,7 @@ --- # Create AH repository - name: Add Automation Hub Collection Remote repository - collection_remote: + ansible.hub.collection_remote: name: "{{ __collection_remote_item.name }}" url: "{{ __collection_remote_item.url }}" auth_url: "{{ __collection_remote_item.auth_url | default(omit) }}" diff --git a/roles/hub_collection_repository/tasks/main.yml b/roles/hub_collection_repository/tasks/main.yml index a571b7edc..0a7164151 100644 --- a/roles/hub_collection_repository/tasks/main.yml +++ b/roles/hub_collection_repository/tasks/main.yml @@ -1,7 +1,7 @@ --- # Create AH repository - name: Add Automation Hub Collection Remote repository - collection_repository: + ansible.hub.collection_repository: name: "{{ __collection_repository_item.name }}" description: "{{ __collection_repository_item.description | default(omit) }}" retain_repo_versions: "{{ __collection_repository_item.retain_repo_versions | default(omit) }}" diff --git a/roles/hub_collection_repository_sync/tasks/main.yml b/roles/hub_collection_repository_sync/tasks/main.yml index a13cb22e3..d1c3efa62 100644 --- a/roles/hub_collection_repository_sync/tasks/main.yml +++ b/roles/hub_collection_repository_sync/tasks/main.yml @@ -1,7 +1,7 @@ --- # Sync AH repository - name: Sync Automation Hub Collection Remote repository - collection_repository_sync: + ansible.hub.collection_repository_sync: name: "{{ __collection_repository_sync_item.name }}" wait: "{{ __collection_repository_sync_item.wait | default(omit) }}" interval: "{{ __collection_repository_sync_item.interval | default(1) }}" diff --git a/roles/hub_ee_image/tasks/main.yml b/roles/hub_ee_image/tasks/main.yml index 4038607fa..c07ade827 100644 --- a/roles/hub_ee_image/tasks/main.yml +++ b/roles/hub_ee_image/tasks/main.yml @@ -2,7 +2,7 @@ # Create AH EE Image - name: Add Automation Hub EE Image - ah_ee_image: + ansible.hub.ah_ee_image: name: "{{ __ee_image_item.name }}" # new_name: "{{ __ee_image_item.new_name | default(omit) }}" <-- Needs adding once new_name option added to module append: "{{ __ee_image_item.append | default(omit) }}" diff --git a/roles/hub_ee_namespace/tasks/main.yml b/roles/hub_ee_namespace/tasks/main.yml index b88945da0..bd9fb6f2e 100644 --- a/roles/hub_ee_namespace/tasks/main.yml +++ b/roles/hub_ee_namespace/tasks/main.yml @@ -2,7 +2,7 @@ # Create AH EE Namespace - name: Add Automation Hub Execution Environment Namespace - ah_ee_namespace: + ansible.hub.ah_ee_namespace: name: "{{ __ee_namespace_item.name }}" # new_name: "{{ __ee_namespace_item.new_name | default(omit) }}" <-- Needs adding once new_name option added to module append: "{{ __ee_namespace_item.append | default(omit) }}" diff --git a/roles/hub_ee_registry/tasks/main.yml b/roles/hub_ee_registry/tasks/main.yml index e32e3d934..fad19d411 100644 --- a/roles/hub_ee_registry/tasks/main.yml +++ b/roles/hub_ee_registry/tasks/main.yml @@ -2,7 +2,7 @@ # Create AH EE registry - name: Add Automation Hub EE Registry - ah_ee_registry: + ansible.hub.ah_ee_registry: name: "{{ __ee_registry_item.name }}" url: "{{ __ee_registry_item.url }}" username: "{{ __ee_registry_item.username | default(omit) }}" diff --git a/roles/hub_ee_registry_index/tasks/main.yml b/roles/hub_ee_registry_index/tasks/main.yml index 4c688b1b8..c67a33ab7 100644 --- a/roles/hub_ee_registry_index/tasks/main.yml +++ b/roles/hub_ee_registry_index/tasks/main.yml @@ -2,7 +2,7 @@ # Create AH EE registry - name: Index Automation Hub EE Registry - ah_ee_registry_index: + ansible.hub.ah_ee_registry_index: name: "{{ __ee_registry_item.name }}" wait: "{{ __ee_registry_item.wait | default(omit) }}" interval: "{{ __ee_registry_item.interval | default(ah_configuration_ee_registry_index_async_delay) }}" diff --git a/roles/hub_ee_registry_sync/tasks/main.yml b/roles/hub_ee_registry_sync/tasks/main.yml index fb36f6958..01179325a 100644 --- a/roles/hub_ee_registry_sync/tasks/main.yml +++ b/roles/hub_ee_registry_sync/tasks/main.yml @@ -2,7 +2,7 @@ # Create AH EE registry - name: Sync Automation Hub EE Registry - ah_ee_registry_sync: + ansible.hub.ah_ee_registry_sync: name: "{{ __ee_registry_item.name }}" wait: "{{ __ee_registry_item.wait | default(omit) }}" interval: "{{ __ee_registry_item.interval | default(ah_configuration_ee_registry_sync_async_delay) }}" diff --git a/roles/hub_ee_repository/tasks/main.yml b/roles/hub_ee_repository/tasks/main.yml index fd852d839..733577a4f 100644 --- a/roles/hub_ee_repository/tasks/main.yml +++ b/roles/hub_ee_repository/tasks/main.yml @@ -2,7 +2,7 @@ # Create AH EE repository - name: Add Automation Hub EE repository - ah_ee_repository: + ansible.hub.ah_ee_repository: name: "{{ __ee_repository_item.name }}" description: "{{ __ee_repository_item.description | default(omit) }}" readme: "{{ __ee_repository_item.readme | default(omit) }}" diff --git a/roles/hub_ee_repository_sync/tasks/main.yml b/roles/hub_ee_repository_sync/tasks/main.yml index 78bc6000a..c4e1363ba 100644 --- a/roles/hub_ee_repository_sync/tasks/main.yml +++ b/roles/hub_ee_repository_sync/tasks/main.yml @@ -2,7 +2,7 @@ # Create AH EE repository - name: Sync Automation Hub EE Repository - ah_ee_repository_sync: + ansible.hub.ah_ee_repository_sync: name: "{{ __ee_repository_item.name }}" wait: "{{ __ee_repository_item.wait | default(omit) }}" interval: "{{ __ee_repository_item.interval | default(ah_configuration_ee_repository_sync_async_delay) }}" diff --git a/roles/hub_namespace/tasks/main.yml b/roles/hub_namespace/tasks/main.yml index 12d56afd7..5300dd488 100644 --- a/roles/hub_namespace/tasks/main.yml +++ b/roles/hub_namespace/tasks/main.yml @@ -1,7 +1,7 @@ --- # Create AH Namespace - name: Get token - ah_token: + ansible.hub.ah_token: ah_host: "{{ ah_host | default(ah_hostname) | default(omit) }}" ah_username: "{{ ah_username | default(omit) }}" ah_password: "{{ ah_password | default(omit) }}" @@ -14,7 +14,7 @@ - ah_namespaces | length > 1 - name: Add Automation Hub Namespace - ah_namespace: + ansible.hub.ah_namespace: name: "{{ __namespace_item.name }}" new_name: "{{ __namespace_item.new_name | default('') }}" description: "{{ __namespace_item.description | default('') }}" diff --git a/roles/hub_publish/tasks/main.yml b/roles/hub_publish/tasks/main.yml index 7f459c618..d8315ce31 100644 --- a/roles/hub_publish/tasks/main.yml +++ b/roles/hub_publish/tasks/main.yml @@ -29,7 +29,7 @@ - __ah_collection_item.collection_local_path is defined - name: Build Collections - ah_build: + ansible.hub.ah_build: path: "{{ ah_configuration_working_dir }}/{{ __ah_collection_item.collection_name }}" output_path: "{{ ah_configuration_working_dir }}/{{ __ah_collection_item.collection_name }}" force: true @@ -69,7 +69,7 @@ when: ah_collection_list is not defined - name: Get token - ah_token: + ansible.hub.ah_token: ah_host: "{{ ah_host | default(ah_hostname) | default(omit) }}" ah_username: "{{ ah_username | default(omit) }}" ah_password: "{{ ah_password | default(omit) }}" @@ -82,7 +82,7 @@ - ah_collection_list | length > 1 - name: Publish Collections - ah_collection: + ansible.hub.ah_collection: namespace: "{{ (__ah_collection_file | basename).split('-')[0] }}" name: "{{ (__ah_collection_file | basename).split('-')[1] }}" version: "{{ (__ah_collection_file | basename).split('-')[2:] | join('-') | splitext | first | splitext | first }}" @@ -123,7 +123,7 @@ ansible_async_dir: '{{ ah_configuration_async_dir }}' - name: Approve Collections - ah_approval: + ansible.hub.ah_approval: namespace: "{{ (__ah_collection_file | basename).split('-')[0] }}" name: "{{ (__ah_collection_file | basename).split('-')[1] }}" version: "{{ (__ah_collection_file | basename).split('-')[2:] | join('-') | splitext | first | splitext | first }}" diff --git a/roles/meta_dependency_check/README.md b/roles/meta_dependency_check/README.md new file mode 100644 index 000000000..01d0b5ade --- /dev/null +++ b/roles/meta_dependency_check/README.md @@ -0,0 +1,11 @@ +# infra.controller_configuration.meta_dependency_check + +This role is designed to be run before any roles in this collection to check that the underlying awx.awx or ansible.controller collection is installed. This is a dependency of together roles and does not need to be explicitly called. + +## License + +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) + +## Author + +[Tom Page](https://github.com/Tompage1994) diff --git a/roles/meta_dependency_check/defaults/main.yml b/roles/meta_dependency_check/defaults/main.yml new file mode 100644 index 000000000..5660c9b6c --- /dev/null +++ b/roles/meta_dependency_check/defaults/main.yml @@ -0,0 +1,3 @@ +--- +controller_dependency_check: true +... diff --git a/roles/meta_dependency_check/meta/main.yml b/roles/meta_dependency_check/meta/main.yml new file mode 100644 index 000000000..65fac2bf7 --- /dev/null +++ b/roles/meta_dependency_check/meta/main.yml @@ -0,0 +1,55 @@ +--- +galaxy_info: + role_name: meta_dependency_check + author: Tom page + description: "An Ansible Role to check collection dependencies." + company: "Red Hat" + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: GPL-3.0-or-later + + min_ansible_version: 2.15.0 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] +# List your role dependencies here, one per line. Be sure to remove the '[]' above, +# if you add dependencies to this list. +... diff --git a/roles/meta_dependency_check/tasks/main.yml b/roles/meta_dependency_check/tasks/main.yml new file mode 100644 index 000000000..eec538e80 --- /dev/null +++ b/roles/meta_dependency_check/tasks/main.yml @@ -0,0 +1,33 @@ +--- +# tasks file for meta_dependency_check + +- name: Print dependency check status + ansible.builtin.debug: + msg: "{{ controller_dependency_check | bool | ternary(__depdency_check_active_msg, __depdency_check_inactive_msg) }}" + vars: + __depdency_check_active_msg: 'Dependency check is active. Required collections presence will be verified.' + __depdency_check_inactive_msg: 'Dependency check is deactivated. Required collections presence will not be verified. This might cause failure in the next tasks.' + +- name: Dependency check block + when: controller_dependency_check | bool + block: + - name: Check awx.awx is installed + ansible.builtin.command: ansible-galaxy collection verify awx.awx + failed_when: false + changed_when: false + register: upstream_dep + + - name: Check ansible.controller is installed + ansible.builtin.command: ansible-galaxy collection verify ansible.controller + failed_when: false + changed_when: false + register: downstream_dep + + - name: Ensure one is installed + ansible.builtin.fail: + msg: One of awx.awx or ansible.controller must be installed + when: + - "'ERROR!' in upstream_dep.stderr" + - "'ERROR!' in downstream_dep.stderr" + +... diff --git a/roles/meta_dependency_check/tests/inventory b/roles/meta_dependency_check/tests/inventory new file mode 100644 index 000000000..2fbb50c4a --- /dev/null +++ b/roles/meta_dependency_check/tests/inventory @@ -0,0 +1 @@ +localhost diff --git a/roles/meta_dependency_check/tests/test.yml b/roles/meta_dependency_check/tests/test.yml new file mode 100644 index 000000000..2def94a86 --- /dev/null +++ b/roles/meta_dependency_check/tests/test.yml @@ -0,0 +1,7 @@ +--- +- name: Test dependency check + hosts: localhost + roles: + - meta_dependency_check + +... diff --git a/tests/playbooks/README.md b/tests/playbooks/README.md index e478bbe8e..4e85123a1 100644 --- a/tests/playbooks/README.md +++ b/tests/playbooks/README.md @@ -126,13 +126,13 @@ This procedure has been tested with **gitlab** git server You have make the following configurations in order to configure CD integration: -1. Configure a Project and a job template with [webhook](https://docs.ansible.com/automation-controller/latest/html/userguide/webhooks.html#id2) property enabled in the Controller pointing to the playbook in charge of CD, you can find an example [here](https://github.com/redhat-cop/controller_configuration/blob/devel/tests/playbooks/cd_gitlab_webhook_trigger.yml). +1. Configure a Project and a job template with [webhook](https://docs.ansible.com/automation-controller/latest/html/userguide/webhooks.html#id2) property enabled in the Controller pointing to the playbook in charge of CD, you can find an example [here](https://github.com/redhat-cop/aap_configuration/blob/devel/tests/playbooks/cd_gitlab_webhook_trigger.yml). 2. Configure [project webhook](https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html) on the project where defined configurations are hosted. ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/tests/templated_role_example/README.md b/tests/templated_role_example/README.md index 153baaaf0..ff836d18a 100644 --- a/tests/templated_role_example/README.md +++ b/tests/templated_role_example/README.md @@ -109,6 +109,6 @@ This also speeds up the overall role. ## License -[GPL-3.0](https://github.com/redhat-cop/controller_configuration#licensing) +[GPL-3.0](https://github.com/redhat-cop/aap_configuration#licensing) ## Author diff --git a/tests/templates/vars/controller_credential_types.yml b/tests/templates/vars/controller_credential_types.yml index a8a146a42..a697c4b16 100644 --- a/tests/templates/vars/controller_credential_types.yml +++ b/tests/templates/vars/controller_credential_types.yml @@ -1,4 +1,4 @@ -# Refer to https://github.com/redhat-cop/controller_configuration/tree/devel/roles/credential_types +# Refer to https://github.com/redhat-cop/aap_configuration/tree/devel/roles/credential_types # for documentation and additional parameter information --- diff --git a/tests/templates/vars/controller_credentials.yml b/tests/templates/vars/controller_credentials.yml index 878580955..5762ea201 100644 --- a/tests/templates/vars/controller_credentials.yml +++ b/tests/templates/vars/controller_credentials.yml @@ -1,4 +1,4 @@ -# Refer to https://github.com/redhat-cop/controller_configuration/tree/devel/roles/credentials +# Refer to https://github.com/redhat-cop/aap_configuration/tree/devel/roles/credentials # for documentation and additional parameter information --- diff --git a/tests/templates/vars/controller_execution_environments.yml b/tests/templates/vars/controller_execution_environments.yml index 606cebf4c..5ae8b1e13 100644 --- a/tests/templates/vars/controller_execution_environments.yml +++ b/tests/templates/vars/controller_execution_environments.yml @@ -1,4 +1,4 @@ -# Refer to https://github.com/redhat-cop/controller_configuration/tree/devel/roles/execution_environments +# Refer to https://github.com/redhat-cop/aap_configuration/tree/devel/roles/execution_environments # for documentation and additional parameter information --- diff --git a/tests/templates/vars/controller_groups.yml b/tests/templates/vars/controller_groups.yml index c2d20f57f..54ee144f4 100644 --- a/tests/templates/vars/controller_groups.yml +++ b/tests/templates/vars/controller_groups.yml @@ -1,4 +1,4 @@ -# Refer to https://github.com/redhat-cop/controller_configuration/tree/devel/roles/groups +# Refer to https://github.com/redhat-cop/aap_configuration/tree/devel/roles/groups # for documentation and additional parameter information --- diff --git a/tests/templates/vars/controller_hosts.yml b/tests/templates/vars/controller_hosts.yml index 36fe008d1..c394c902b 100644 --- a/tests/templates/vars/controller_hosts.yml +++ b/tests/templates/vars/controller_hosts.yml @@ -1,4 +1,4 @@ -# Refer to https://github.com/redhat-cop/controller_configuration/tree/devel/roles/hosts +# Refer to https://github.com/redhat-cop/aap_configuration/tree/devel/roles/hosts # for documentation and additional parameter information --- diff --git a/tests/templates/vars/controller_instance_groups.yml b/tests/templates/vars/controller_instance_groups.yml index 7376c2003..76c5a816f 100644 --- a/tests/templates/vars/controller_instance_groups.yml +++ b/tests/templates/vars/controller_instance_groups.yml @@ -1,4 +1,4 @@ -# Refer to https://github.com/redhat-cop/controller_configuration/tree/devel/roles/instance_groups +# Refer to https://github.com/redhat-cop/aap_configuration/tree/devel/roles/instance_groups # for documentation and additional parameter information --- diff --git a/tests/templates/vars/controller_inventories.yml b/tests/templates/vars/controller_inventories.yml index 555fa95d5..6443d2da0 100644 --- a/tests/templates/vars/controller_inventories.yml +++ b/tests/templates/vars/controller_inventories.yml @@ -1,4 +1,4 @@ -# Refer to https://github.com/redhat-cop/controller_configuration/tree/devel/roles/inventories +# Refer to https://github.com/redhat-cop/aap_configuration/tree/devel/roles/inventories # for documentation and additional parameter information --- diff --git a/tests/templates/vars/controller_inventory_sources.yml b/tests/templates/vars/controller_inventory_sources.yml index c083003f0..28b60e264 100644 --- a/tests/templates/vars/controller_inventory_sources.yml +++ b/tests/templates/vars/controller_inventory_sources.yml @@ -1,4 +1,4 @@ -# Refer to https://github.com/redhat-cop/controller_configuration/tree/devel/roles/inventory_sources +# Refer to https://github.com/redhat-cop/aap_configuration/tree/devel/roles/inventory_sources # for documentation and additional parameter information --- diff --git a/tests/templates/vars/controller_job_templates.yml b/tests/templates/vars/controller_job_templates.yml index 2bb4a7944..b82b64105 100644 --- a/tests/templates/vars/controller_job_templates.yml +++ b/tests/templates/vars/controller_job_templates.yml @@ -1,4 +1,4 @@ -# Refer to https://github.com/redhat-cop/controller_configuration/tree/devel/roles/job_templates +# Refer to https://github.com/redhat-cop/aap_configuration/tree/devel/roles/job_templates # for documentation and additional parameter information --- diff --git a/tests/templates/vars/controller_labels.yml b/tests/templates/vars/controller_labels.yml index 1fc24ccda..20907ccab 100644 --- a/tests/templates/vars/controller_labels.yml +++ b/tests/templates/vars/controller_labels.yml @@ -1,4 +1,4 @@ -# Refer to https://github.com/redhat-cop/controller_configuration/tree/devel/roles/labels +# Refer to https://github.com/redhat-cop/aap_configuration/tree/devel/roles/labels # for documentation and additional parameter information --- diff --git a/tests/templates/vars/controller_ldap_configuration.json b/tests/templates/vars/controller_ldap_configuration.json index 45209d806..67d35b109 100644 --- a/tests/templates/vars/controller_ldap_configuration.json +++ b/tests/templates/vars/controller_ldap_configuration.json @@ -1,4 +1,4 @@ -// Refer to https://github.com/redhat-cop/controller_configuration/tree/devel/roles/settings +// Refer to https://github.com/redhat-cop/aap_configuration/tree/devel/roles/settings // if you need help customizing these settings. { diff --git a/tests/templates/vars/controller_notification_templates.yml b/tests/templates/vars/controller_notification_templates.yml index 7ec83f72d..92f0fcc92 100644 --- a/tests/templates/vars/controller_notification_templates.yml +++ b/tests/templates/vars/controller_notification_templates.yml @@ -1,4 +1,4 @@ -# Refer to https://github.com/redhat-cop/controller_configuration/tree/devel/roles/notification_templates +# Refer to https://github.com/redhat-cop/aap_configuration/tree/devel/roles/notification_templates # for documentation and additional parameter information --- diff --git a/tests/templates/vars/controller_organizations.yml b/tests/templates/vars/controller_organizations.yml index 555321c44..12178b030 100644 --- a/tests/templates/vars/controller_organizations.yml +++ b/tests/templates/vars/controller_organizations.yml @@ -1,4 +1,4 @@ -# Refer to https://github.com/redhat-cop/controller_configuration/tree/devel/roles/organizations +# Refer to https://github.com/redhat-cop/aap_configuration/tree/devel/roles/organizations # for documentation and additional parameter information --- diff --git a/tests/templates/vars/controller_organizations_with_hub.yml b/tests/templates/vars/controller_organizations_with_hub.yml index 5a4946e2e..e8290f0b5 100644 --- a/tests/templates/vars/controller_organizations_with_hub.yml +++ b/tests/templates/vars/controller_organizations_with_hub.yml @@ -1,4 +1,4 @@ -# Refer to https://github.com/redhat-cop/controller_configuration/tree/devel/roles/organizations +# Refer to https://github.com/redhat-cop/aap_configuration/tree/devel/roles/organizations # for documentation and additional parameter information --- diff --git a/tests/templates/vars/controller_projects.yml b/tests/templates/vars/controller_projects.yml index dc5c33a4a..ecc199b1d 100644 --- a/tests/templates/vars/controller_projects.yml +++ b/tests/templates/vars/controller_projects.yml @@ -1,4 +1,4 @@ -# Refer to https://github.com/redhat-cop/controller_configuration/tree/devel/roles/projects +# Refer to https://github.com/redhat-cop/aap_configuration/tree/devel/roles/projects # for documentation and additional parameter information --- diff --git a/tests/templates/vars/controller_roles.yml b/tests/templates/vars/controller_roles.yml index c0831da0d..71e62a857 100644 --- a/tests/templates/vars/controller_roles.yml +++ b/tests/templates/vars/controller_roles.yml @@ -1,4 +1,4 @@ -# Refer to https://github.com/redhat-cop/controller_configuration/tree/devel/roles/roles +# Refer to https://github.com/redhat-cop/aap_configuration/tree/devel/roles/roles # for documentation and additional parameter information # READ DOCUMENTATION FOR THIS ROLE BEFORE DEFINING PERMISSIONS AS CODE TO diff --git a/tests/templates/vars/controller_schedules.yml b/tests/templates/vars/controller_schedules.yml index fdec061ce..bc9d8609e 100644 --- a/tests/templates/vars/controller_schedules.yml +++ b/tests/templates/vars/controller_schedules.yml @@ -1,4 +1,4 @@ -# Refer to https://github.com/redhat-cop/controller_configuration/tree/devel/roles/schedules +# Refer to https://github.com/redhat-cop/aap_configuration/tree/devel/roles/schedules # for documentation and additional parameter information --- diff --git a/tests/templates/vars/controller_teams.yml b/tests/templates/vars/controller_teams.yml index 8d7a75ac1..002c69bf4 100644 --- a/tests/templates/vars/controller_teams.yml +++ b/tests/templates/vars/controller_teams.yml @@ -1,4 +1,4 @@ -# Refer to https://github.com/redhat-cop/controller_configuration/tree/devel/roles/teams +# Refer to https://github.com/redhat-cop/aap_configuration/tree/devel/roles/teams # for documentation and additional parameter information --- diff --git a/tests/templates/vars/controller_users.yml b/tests/templates/vars/controller_users.yml index 7d0d77baf..e1ba47fcb 100644 --- a/tests/templates/vars/controller_users.yml +++ b/tests/templates/vars/controller_users.yml @@ -1,4 +1,4 @@ -# Refer to https://github.com/redhat-cop/controller_configuration/tree/devel/roles/users +# Refer to https://github.com/redhat-cop/aap_configuration/tree/devel/roles/users # for documentation and additional parameter information --- diff --git a/tests/templates/vars/controller_workflows.yml b/tests/templates/vars/controller_workflows.yml index 2f1b60e59..3e16a5625 100644 --- a/tests/templates/vars/controller_workflows.yml +++ b/tests/templates/vars/controller_workflows.yml @@ -1,4 +1,4 @@ -# Refer to https://github.com/redhat-cop/controller_configuration/tree/devel/roles/workflow_job_templates +# Refer to https://github.com/redhat-cop/aap_configuration/tree/devel/roles/workflow_job_templates # for documentation and additional parameter information ---