From bf84e353db687353de59f2eac6fdffb396b40e05 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Mon, 5 Dec 2022 15:26:31 +0000 Subject: [PATCH 01/94] Update pre-commit.yml --- .github/workflows/pre-commit.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 322513689..3aa9186f5 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -12,9 +12,9 @@ on: jobs: pre-commit: - uses: sean-m-sullivan/infra_git_ci_cd/.github/workflows/pre-commit.yml@main + uses: "sean-m-sullivan/infra_git_ci_cd/.github/workflows/pre-commit.yml@main" sanity: - uses: sean-m-sullivan/infra_git_ci_cd/.github/workflows/sanity.yml@main + uses: "sean-m-sullivan/infra_git_ci_cd/.github/workflows/sanity.yml@main" with: collection_namespace: redhat_cop collection_name: controller_configuration From 24e8e606d6b25e53d586a38937a32496b04d3110 Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Tue, 6 Dec 2022 01:53:20 -0800 Subject: [PATCH 02/94] update workflow tooling (#437) --- .github/workflows/pre-commit.yml | 4 ++-- .github/workflows/release.yml | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 3aa9186f5..ef753f9f4 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -12,9 +12,9 @@ on: jobs: pre-commit: - uses: "sean-m-sullivan/infra_git_ci_cd/.github/workflows/pre-commit.yml@main" + uses: "redhat-cop/ansible_collections_tooling/.github/workflows/pre-commit.yml@main" sanity: - uses: "sean-m-sullivan/infra_git_ci_cd/.github/workflows/sanity.yml@main" + uses: "redhat-cop/ansible_collections_tooling/.github/workflows/sanity.yml@main" with: collection_namespace: redhat_cop collection_name: controller_configuration diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f5f02dab6..1b8d353f5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,9 +10,9 @@ on: jobs: pre-commit: - uses: sean-m-sullivan/infra_git_ci_cd/.github/workflows/pre-commit.yml@main + uses: redhat-cop/ansible_collections_tooling/.github/workflows/pre-commit.yml@main sanity: - uses: sean-m-sullivan/infra_git_ci_cd/.github/workflows/sanity.yml@main + uses: redhat-cop/ansible_collections_tooling/.github/workflows/sanity.yml@main with: collection_namespace: redhat_cop collection_name: controller_configuration @@ -32,7 +32,7 @@ jobs: cop_release: needs: - prechecks - uses: sean-m-sullivan/infra_git_ci_cd/.github/workflows/release.yml@main + uses: redhat-cop/ansible_collections_tooling/.github/workflows/release.yml@main with: collection_namespace: redhat_cop collection_name: controller_configuration @@ -44,7 +44,7 @@ jobs: infra_release: needs: - cop_release - uses: sean-m-sullivan/infra_git_ci_cd/.github/workflows/release.yml@main + uses: redhat-cop/ansible_collections_tooling/.github/workflows/release.yml@main with: collection_namespace: infra collection_name: controller_configuration @@ -67,7 +67,7 @@ jobs: changelog: needs: - release_check - uses: sean-m-sullivan/infra_git_ci_cd/.github/workflows/create_changelog.yml@main + uses: redhat-cop/ansible_collections_tooling/.github/workflows/create_changelog.yml@main with: collection_namespace: infra collection_name: controller_configuration From 3816786e585f1db8d9d1233c30da6f9d83c18e28 Mon Sep 17 00:00:00 2001 From: sean-m-sullivan Date: Tue, 6 Dec 2022 21:42:46 -0500 Subject: [PATCH 03/94] add more workflows --- .github/workflows/pre-commit.yml | 22 ++------- .github/workflows/release.yml | 64 ++----------------------- .github/workflows/update_pre_commit.yml | 18 +++++++ 3 files changed, 27 insertions(+), 77 deletions(-) create mode 100644 .github/workflows/update_pre_commit.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index ef753f9f4..148e98ce1 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -11,25 +11,11 @@ on: - cron: "0 6 * * *" jobs: - pre-commit: - uses: "redhat-cop/ansible_collections_tooling/.github/workflows/pre-commit.yml@main" - sanity: - uses: "redhat-cop/ansible_collections_tooling/.github/workflows/sanity.yml@main" + pre-commit_and_sanity: + uses: "redhat-cop/ansible_collections_tooling/.github/workflows/pre_commit_and_sanity.yml@main" with: - collection_namespace: redhat_cop + collection_namespace: infra collection_name: controller_configuration - collection_version: 1.0.0 + collection_version: 2.0.0 collection_repo: https://github.com/redhat-cop/controller_configuration/ - all_green: - if: ${{ always() }} - needs: - - pre-commit - - sanity - runs-on: ubuntu-latest - steps: - - run: >- - python -c "assert set([ - '${{ needs.pre-commit.result }}', - '${{ needs.sanity.result }}', - ]) == {'success'}" ... diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1b8d353f5..436ea5121 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,70 +9,16 @@ on: - published jobs: - pre-commit: - uses: redhat-cop/ansible_collections_tooling/.github/workflows/pre-commit.yml@main - sanity: - uses: redhat-cop/ansible_collections_tooling/.github/workflows/sanity.yml@main - with: - collection_namespace: redhat_cop - collection_name: controller_configuration - collection_version: 1.0.0 - collection_repo: https://github.com/redhat-cop/controller_configuration/ - prechecks: - needs: - - pre-commit - - sanity - runs-on: ubuntu-latest - steps: - - run: >- - python -c "assert set([ - '${{ needs.pre-commit.result }}', - '${{ needs.sanity.result }}', - ]) == {'success'}" - cop_release: - needs: - - prechecks - uses: redhat-cop/ansible_collections_tooling/.github/workflows/release.yml@main - with: - collection_namespace: redhat_cop - collection_name: controller_configuration - collection_version: ${{ github.ref_name }} - collection_repo: https://github.com/redhat-cop/controller_configuration/ - secrets: - api_key: ${{ secrets.ANSIBLE_GALAXY_APIKEY }} - token: ${{ secrets.GITHUB_TOKEN }} - infra_release: - needs: - - cop_release - uses: redhat-cop/ansible_collections_tooling/.github/workflows/release.yml@main - with: - collection_namespace: infra - collection_name: controller_configuration - collection_version: ${{ github.ref_name }} - collection_repo: https://github.com/redhat-cop/controller_configuration/ - secrets: - api_key: ${{ secrets.GALAXY_INFRA_KEY }} - token: ${{ secrets.GITHUB_TOKEN }} - release_check: - needs: - - cop_release - - infra_release - runs-on: ubuntu-latest - steps: - - run: >- - python -c "assert set([ - '${{ needs.infra_release.result }}', - '${{ needs.cop_release.result }}', - ]) == {'success'}" - changelog: - needs: - - release_check - uses: redhat-cop/ansible_collections_tooling/.github/workflows/create_changelog.yml@main + release: + uses: "redhat-cop/ansible_collections_tooling/.github/workflows/release_pipeline.yml@main" with: collection_namespace: infra + collection_namespace_2: redhat_cop collection_name: controller_configuration collection_version: ${{ github.ref_name }} collection_repo: https://github.com/redhat-cop/controller_configuration/ secrets: + galaxy_api_key: ${{ secrets.ANSIBLE_GALAXY_APIKEY }} + infra_api_key: ${{ secrets.GALAXY_INFRA_KEY }} token: ${{ secrets.GITHUB_TOKEN }} ... diff --git a/.github/workflows/update_pre_commit.yml b/.github/workflows/update_pre_commit.yml new file mode 100644 index 000000000..edbd05279 --- /dev/null +++ b/.github/workflows/update_pre_commit.yml @@ -0,0 +1,18 @@ +--- +# This workflow action will run pre-commit, which will execute ansible and yaml linting +# See .pre-commit-config.yaml for what hooks are executed +name: Update pre-commit configuration + + +on: + schedule: + - cron: "0 5 * * *" + +jobs: + pre-commit: + uses: "redhat-cop/ansible_collections_tooling/.github/workflows/update_precommit.yml@main" + with: + github_actor: ${{ github.actor }} + secrets: + token: ${{ secrets.GITHUB_TOKEN }} +... From 1675997c043d9a501fed692429e40f78e57535d9 Mon Sep 17 00:00:00 2001 From: "tompage1994@hotmail.co.uk" Date: Mon, 12 Dec 2022 11:48:55 +0000 Subject: [PATCH 04/94] Add max_forks, max_concurrent_jobs as options to instance_groups role --- changelogs/fragments/instance_group.yml | 4 ++++ roles/instance_groups/README.md | 2 ++ roles/instance_groups/tasks/main.yml | 2 ++ 3 files changed, 8 insertions(+) create mode 100644 changelogs/fragments/instance_group.yml diff --git a/changelogs/fragments/instance_group.yml b/changelogs/fragments/instance_group.yml new file mode 100644 index 000000000..641412479 --- /dev/null +++ b/changelogs/fragments/instance_group.yml @@ -0,0 +1,4 @@ +--- +minor_changes: + - Add max_forks, max_concurrent_jobs as options to instance_groups role +... diff --git a/roles/instance_groups/README.md b/roles/instance_groups/README.md index 3e1699f13..93428a569 100644 --- a/roles/instance_groups/README.md +++ b/roles/instance_groups/README.md @@ -65,6 +65,8 @@ This also speeds up the overall role. |`policy_instance_percentage`|""|no|int|Minimum percentage of all instances that will be automatically assigned to this group when new instances come online.| |`policy_instance_minimum`|""|no|int|Static minimum number of Instances that will be automatically assign to this group when new instances come online.| |`policy_instance_list`|""|no|list|List of exact-match Instances that will be assigned to this group.| +|`max_concurrent_jobs`|0|no|int|Maximum number of concurrent jobs to run on this group. Zero means no limit.| +|`max_forks`|0|no|int|Max forks to execute on this group. Zero means no limit.| |`pod_spec_override`|""|no|str|A custom Kubernetes or OpenShift Pod specification.| |`instances`|""|no|list|The instances associated with this instance_group.| |`state`|`present`|no|str|Desired state of the resource.| diff --git a/roles/instance_groups/tasks/main.yml b/roles/instance_groups/tasks/main.yml index 25d564a8e..38bf14270 100644 --- a/roles/instance_groups/tasks/main.yml +++ b/roles/instance_groups/tasks/main.yml @@ -9,6 +9,8 @@ policy_instance_percentage: "{{ __controller_instance_group_item.policy_instance_percentage | default(omit, true) }}" policy_instance_minimum: "{{ __controller_instance_group_item.policy_instance_minimum | default(omit, true) }}" policy_instance_list: "{{ __controller_instance_group_item.policy_instance_list | default(omit, true) }}" + max_concurrent_jobs: "{{ __controller_instance_group_item.max_concurrent_jobs | default(omit, true) }}" + max_forks: "{{ __controller_instance_group_item.max_forks | default(omit, true) }}" pod_spec_override: "{{ __controller_instance_group_item.pod_spec_override | default(omit, true) }}" instances: "{{ __controller_instance_group_item.instances | default(omit, true) }}" state: "{{ __controller_instance_group_item.state | default(controller_state | default('present')) }}" From 900000d74dceeb78e02b08252fef7b5371106c1d Mon Sep 17 00:00:00 2001 From: adonisgarciac Date: Tue, 13 Dec 2022 10:03:19 +0100 Subject: [PATCH 05/94] improve template to export settings --- roles/filetree_create/templates/current_settings.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/filetree_create/templates/current_settings.j2 b/roles/filetree_create/templates/current_settings.j2 index 6dd4c2f2b..484e44838 100644 --- a/roles/filetree_create/templates/current_settings.j2 +++ b/roles/filetree_create/templates/current_settings.j2 @@ -1,4 +1,5 @@ --- controller_settings: - - settings: "{{ changed_settings[0] | replace('\'AUTH_LDAP_GROUP_TYPE_PARAMS\': {}', '\'AUTH_LDAP_GROUP_TYPE_PARAMS\': {\'name_attr\': \'cn\', \'member_attr\': \'member\'}') }}" + - settings: +{{ changed_settings[0] | replace('\'AUTH_LDAP_GROUP_TYPE_PARAMS\': {}', '\'AUTH_LDAP_GROUP_TYPE_PARAMS\': {\'name_attr\': \'cn\', \'member_attr\': \'member\'}') | replace("'", '"') | replace(': True', ': true') | replace(': False', ': false') | replace(': None', ': null') | from_json | to_nice_yaml | indent(width=6, first=True) }} ... From 93234a92542c3032757d547efc389f892d7e09ac Mon Sep 17 00:00:00 2001 From: adonisgarciac Date: Tue, 13 Dec 2022 10:16:06 +0100 Subject: [PATCH 06/94] add changelog --- changelogs/fragments/filetree_create.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changelogs/fragments/filetree_create.yml diff --git a/changelogs/fragments/filetree_create.yml b/changelogs/fragments/filetree_create.yml new file mode 100644 index 000000000..3d033e4fc --- /dev/null +++ b/changelogs/fragments/filetree_create.yml @@ -0,0 +1,4 @@ +--- +minor_changes: + - Improve template to export settings with filetree_create role. Settings will be in yaml format. +... From 108085bec4d2c77d314e3ff232948aaa94c6d2b4 Mon Sep 17 00:00:00 2001 From: adonisgarciac Date: Tue, 13 Dec 2022 10:23:16 +0100 Subject: [PATCH 07/94] linting --- changelogs/fragments/filetree_create.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/fragments/filetree_create.yml b/changelogs/fragments/filetree_create.yml index 3d033e4fc..c72bb4ab9 100644 --- a/changelogs/fragments/filetree_create.yml +++ b/changelogs/fragments/filetree_create.yml @@ -1,4 +1,4 @@ --- minor_changes: - - Improve template to export settings with filetree_create role. Settings will be in yaml format. + - Improve template to export settings with filetree_create role. Settings will be in yaml format. ... From 5009f35b10826a94240804ad3c0cec19ca9ee945 Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Wed, 14 Dec 2022 02:07:21 -0800 Subject: [PATCH 08/94] Update minikube build (#445) Update minikube build --- .ansible-lint | 1 + .github/workflows/testing_minikube.yml | 7 ++++--- .pre-commit-config.yaml | 4 ++-- meta/runtime.yml | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 5c40629f5..c84f3bd05 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -17,6 +17,7 @@ skip_list: # Skipping fqcn[action] because this collection supports using either the awx.awx or ansible.controller collection # so a FQCN cannot be used in module names - fqcn[action] + - meta-unsupported-ansible # This collection with the appropriate awx.awx or ansible.controller still works with older ansible. kinds: - playbooks: "**/examples/templates/*.{yml,yaml}" - playbooks: "**/examples/*.{yml,yaml}" diff --git a/.github/workflows/testing_minikube.yml b/.github/workflows/testing_minikube.yml index 45a556602..8a3b3611b 100644 --- a/.github/workflows/testing_minikube.yml +++ b/.github/workflows/testing_minikube.yml @@ -16,10 +16,11 @@ jobs: run: pip install -r .github/requirements.txt - name: Setup Minikube - uses: manusa/actions-setup-minikube@v2.4.2 + uses: manusa/actions-setup-minikube@v2.7.1 with: - minikube version: 'v1.21.0' - kubernetes version: 'v1.20.7' + minikube version: 'v1.26.1' + kubernetes version: 'v1.25.0' + github token: ${{ secrets.GITHUB_TOKEN }} start args: '--addons=ingress' - name: Wait / Sleep diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 88708d151..168dae684 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: # types: # - yaml - repo: 'https://github.com/ansible-community/ansible-lint.git' - rev: v6.9.1 + rev: v6.10.0a1 hooks: # see discussions here about what arguments are used, and behavior # https://github.com/ansible/ansible-lint/issues/649 @@ -34,7 +34,7 @@ repos: hooks: - id: markdownlint-cli2 - repo: https://github.com/ambv/black - rev: 22.10.0 + rev: 22.12.0 hooks: - id: black name: black diff --git a/meta/runtime.yml b/meta/runtime.yml index 33947e1f5..e4bff6aec 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,3 +1,3 @@ --- -requires_ansible: '>=2.9.6' +requires_ansible: '>=2.9.27' ... From 9883b5ea23ede960c2baeeecdfa94ea000916a2e Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 14 Dec 2022 11:39:46 +0000 Subject: [PATCH 09/94] bump actions-setup-minikube (#447) --- .github/workflows/testing_minikube.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing_minikube.yml b/.github/workflows/testing_minikube.yml index 8a3b3611b..220f5ce5a 100644 --- a/.github/workflows/testing_minikube.yml +++ b/.github/workflows/testing_minikube.yml @@ -16,7 +16,7 @@ jobs: run: pip install -r .github/requirements.txt - name: Setup Minikube - uses: manusa/actions-setup-minikube@v2.7.1 + uses: manusa/actions-setup-minikube@v2.7.2 with: minikube version: 'v1.26.1' kubernetes version: 'v1.25.0' From a0c92f9501a1018ed5dccb5346a3c44f967ef708 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 15 Dec 2022 04:13:29 -0500 Subject: [PATCH 10/94] Update pre-commit (#448) Co-authored-by: sean-m-sullivan --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 168dae684..8d1363e9c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: # types: # - yaml - repo: 'https://github.com/ansible-community/ansible-lint.git' - rev: v6.10.0a1 + rev: v6.10.0 hooks: # see discussions here about what arguments are used, and behavior # https://github.com/ansible/ansible-lint/issues/649 From ac21a1cbbf74265ea5708dcdd8d5e932ceff3ff7 Mon Sep 17 00:00:00 2001 From: adonisgarciac Date: Thu, 15 Dec 2022 10:51:56 +0100 Subject: [PATCH 11/94] fix bug variable name obj diff orgs --- roles/object_diff/tasks/organizations.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/roles/object_diff/tasks/organizations.yml b/roles/object_diff/tasks/organizations.yml index 7f0b0c004..163e33972 100644 --- a/roles/object_diff/tasks/organizations.yml +++ b/roles/object_diff/tasks/organizations.yml @@ -23,7 +23,7 @@ with_present=false, set_absent=true) }}" - - name: "Set list __list_orgs_empty when protect_not_empty_orgs" + - name: "Set list __list_empty_orgs when protect_not_empty_orgs" ansible.builtin.set_fact: __list_empty_orgs: "{{ __list_empty_orgs | default([]) + [__organizations_difference_list_empty_item.name] }}" loop: "{{ __organizations_difference }}" @@ -32,19 +32,19 @@ when: - protect_not_empty_orgs is defined - protect_not_empty_orgs - - query(controller_api_plugin, 'api/' + controller_api_version + '/organizations/' + (__org.name | urlencode) + '/users/', + - query(controller_api_plugin, 'api/' + controller_api_version + '/organizations/' + (__organizations_difference_list_empty_item.name | urlencode) + '/users/', host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) | length == 0 - - query(controller_api_plugin, 'api/' + controller_api_version + '/organizations/' + (__org.name | urlencode) + '/admins/', + - query(controller_api_plugin, 'api/' + controller_api_version + '/organizations/' + (__organizations_difference_list_empty_item.name | urlencode) + '/admins/', host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) | length == 0 - - query(controller_api_plugin, 'api/' + controller_api_version + '/organizations/' + (__org.name | urlencode) + '/inventories/', + - query(controller_api_plugin, 'api/' + controller_api_version + '/organizations/' + (__organizations_difference_list_empty_item.name | urlencode) + '/inventories/', host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) | length == 0 - - query(controller_api_plugin, 'api/' + controller_api_version + '/organizations/' + (__org.name | urlencode) + '/teams/', + - query(controller_api_plugin, 'api/' + controller_api_version + '/organizations/' + (__organizations_difference_list_empty_item.name | urlencode) + '/teams/', host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) | length == 0 - - query(controller_api_plugin, 'api/' + controller_api_version + '/organizations/' + (__org.name | urlencode) + '/projects/', + - query(controller_api_plugin, 'api/' + controller_api_version + '/organizations/' + (__organizations_difference_list_empty_item.name | urlencode) + '/projects/', host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) | length == 0 - - query(controller_api_plugin, 'api/' + controller_api_version + '/organizations/' + (__org.name | urlencode) + '/job_templates/', + - query(controller_api_plugin, 'api/' + controller_api_version + '/organizations/' + (__organizations_difference_list_empty_item.name | urlencode) + '/job_templates/', host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) | length == 0 - - query(controller_api_plugin, 'api/' + controller_api_version + '/organizations/' + (__org.name | urlencode) + '/workflow_job_templates/', + - query(controller_api_plugin, 'api/' + controller_api_version + '/organizations/' + (__organizations_difference_list_empty_item.name | urlencode) + '/workflow_job_templates/', host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) | length == 0 - name: "Set Organization differences" @@ -53,7 +53,7 @@ loop: "{{ __organizations_difference }}" loop_control: loop_var: __organizations_difference_item - when: __organizations_difference is defined and (protect_not_empty_orgs is not defined or not protect_not_empty_orgs or __organizations_difference_item.name in __list_empty_orgs) + when: __organizations_difference is defined and (protect_not_empty_orgs is not defined or not protect_not_empty_orgs or __organizations_difference_item.name in __list_empty_orgs | default([])) - name: "Set organization's list to be configured" ansible.builtin.set_fact: From 661ce5726dcdee3dfd6428c7de50b20f6afd2179 Mon Sep 17 00:00:00 2001 From: adonisgarciac Date: Thu, 15 Dec 2022 14:23:30 +0100 Subject: [PATCH 12/94] improve when in Set Organization differences --- roles/object_diff/tasks/organizations.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/object_diff/tasks/organizations.yml b/roles/object_diff/tasks/organizations.yml index 163e33972..f39664c0c 100644 --- a/roles/object_diff/tasks/organizations.yml +++ b/roles/object_diff/tasks/organizations.yml @@ -53,7 +53,9 @@ loop: "{{ __organizations_difference }}" loop_control: loop_var: __organizations_difference_item - when: __organizations_difference is defined and (protect_not_empty_orgs is not defined or not protect_not_empty_orgs or __organizations_difference_item.name in __list_empty_orgs | default([])) + when: + - __organizations_difference is defined + - protect_not_empty_orgs is not defined or not protect_not_empty_orgs or (__list_empty_orgs is defined and __organizations_difference_item.name in __list_empty_orgs) - name: "Set organization's list to be configured" ansible.builtin.set_fact: From 38d5f1a64a979a5e39ab50ac627db0c787c98787 Mon Sep 17 00:00:00 2001 From: adonisgarciac Date: Thu, 15 Dec 2022 14:32:09 +0100 Subject: [PATCH 13/94] linting --- roles/object_diff/tasks/organizations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/object_diff/tasks/organizations.yml b/roles/object_diff/tasks/organizations.yml index f39664c0c..3f793ea7d 100644 --- a/roles/object_diff/tasks/organizations.yml +++ b/roles/object_diff/tasks/organizations.yml @@ -54,7 +54,7 @@ loop_control: loop_var: __organizations_difference_item when: - - __organizations_difference is defined + - __organizations_difference is defined - protect_not_empty_orgs is not defined or not protect_not_empty_orgs or (__list_empty_orgs is defined and __organizations_difference_item.name in __list_empty_orgs) - name: "Set organization's list to be configured" From a4325c6c948cf40f6bfe44afd631bc0063fbbba8 Mon Sep 17 00:00:00 2001 From: jbreitwe-rh <55449231+tuxpreacher@users.noreply.github.com> Date: Tue, 20 Dec 2022 15:06:52 +0100 Subject: [PATCH 14/94] Fixed typos and improved some sentences. (#450) * Fixed typos and improved some sentences. * Added changelog file for typos. * Update typos.yml Co-authored-by: Tom Page --- README.md | 14 +++++++------- changelogs/fragments/typos.yml | 4 ++++ 2 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 changelogs/fragments/typos.yml diff --git a/README.md b/README.md index 62b1cab07..67c7efccb 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ This Ansible collection allows for easy interaction with an AWX or Ansible Controller server via Ansible roles using the AWX/Controller collection modules. -## REQUIREMENTS +## 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 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. ```yaml --- @@ -21,7 +21,7 @@ The AWX.AWX OR ANSIBLE.CONTROLLER collections MUST be installed in order for thi - awx.awx ``` -## Redhat Communities of Practice Configuration Collections Suite +## Red Hat Communities of Practice Configuration Collections Suite |Collection Name|Purpose| |:---:|:---:| @@ -37,7 +37,7 @@ Click the `Content` button to see the list of content included in this collectio ## Installing this collection -You can install the redhat_cop controller_configuration collection with the Ansible Galaxy CLI: +You can install the redhat_cop.controller_configuration collection with the Ansible Galaxy CLI: ```console ansible-galaxy collection install redhat_cop.controller_configuration @@ -59,7 +59,7 @@ If you were using a version of redhat_cop.tower_configuration, please refer to o ## Using this collection -The awx.awx or ansible.controller collection must be invoked in the playbook in order for ansible to pick up the correct modules to use. +The awx.awx or ansible.controller collection must be invoked in the playbook in order for Ansible to pick up the correct modules to use. The following command will invoke the playbook with the awx collection @@ -130,13 +130,13 @@ Controller token module would be invoked with this code: ### Automate the Automation -Every Ansible Controller instance has it's own particularities and needs. Every administrator team has it's own practices and costumes. This collection allows to addapt to every needs, from small to large scale, having the objects distributed across multiple environments and leveraging Automation Webhook that can be used to link a Git repository and Ansible automation natively. +Every Ansible Controller instance has it's own particularities and needs. Every administrator team has it's own practices and customs. This collection allows adaptation to every need, from small to large scale, having the objects distributed across multiple environments and leveraging Automation Webhook that can be used to link a Git repository and Ansible automation natively. A complete example of how to use all of the roles present in the collection is available at the following [README.md](roles/filetree_create/automatetheautomation.md), where all the phases to allow CI/CD for the Controller Configuration are provided. #### Scale at your needs -The input data can be organized in a very flexible way, letting the user to use from a single file to an entire file tree to store the controller objects definitions, which could be used as a logical segregation of different applications, as needed in real scenarios. +The input data can be organized in a very flexible way, letting the user use anything from a single file to an entire file tree to store the controller objects definitions, which could be used as a logical segregation of different applications, as needed in real scenarios. ### Controller Export diff --git a/changelogs/fragments/typos.yml b/changelogs/fragments/typos.yml new file mode 100644 index 000000000..4f5628189 --- /dev/null +++ b/changelogs/fragments/typos.yml @@ -0,0 +1,4 @@ +--- +minor_changes: + - Fixed typos in README.md. +... From c95553b7af18a9a9aa1d0d972cd88a0dff361d50 Mon Sep 17 00:00:00 2001 From: adonisgarciac Date: Wed, 21 Dec 2022 11:58:14 +0100 Subject: [PATCH 15/94] filetree_create: fix export objects to add extra variables --- roles/filetree_create/templates/current_groups.j2 | 6 +++++- roles/filetree_create/templates/current_hosts.j2 | 4 ++++ roles/filetree_create/templates/current_inventories.j2 | 4 ++-- .../templates/current_inventory_sources.j2 | 5 +++-- .../filetree_create/templates/current_job_templates.j2 | 10 +++------- .../templates/current_notification_templates.j2 | 6 ++---- .../templates/current_workflow_job_templates.j2 | 4 ++++ 7 files changed, 23 insertions(+), 16 deletions(-) diff --git a/roles/filetree_create/templates/current_groups.j2 b/roles/filetree_create/templates/current_groups.j2 index 8a73de839..de8858bb5 100644 --- a/roles/filetree_create/templates/current_groups.j2 +++ b/roles/filetree_create/templates/current_groups.j2 @@ -1,9 +1,13 @@ --- -configure_tower_groups: +controller_groups: {% for group in current_groups_asset_value %} - name: "{{ group.name }}" description: "{{ group.description }}" inventory: "{{ group.summary_fields.inventory.name }}" +{% if group.variables and group.variables != '---' and group.variables != '' %} + variables: + {{ group.variables | from_yaml | to_nice_yaml(indent=2) | indent(width=6, first=False) | replace("'{{", "!unsafe \'{{") }} +{%- endif %} hosts: {{ query(controller_api_plugin, group.related.hosts, host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, diff --git a/roles/filetree_create/templates/current_hosts.j2 b/roles/filetree_create/templates/current_hosts.j2 index 7708e10c1..3a3d4abef 100644 --- a/roles/filetree_create/templates/current_hosts.j2 +++ b/roles/filetree_create/templates/current_hosts.j2 @@ -4,5 +4,9 @@ controller_hosts: - name: "{{ host.name }}" description: "{{ host.description }}" inventory: "{{ host.summary_fields.inventory.name | default('ToDo: The host \'' + host.name + '\' must have an associated inventory') }}" +{% if host.variables and host.variables != '---' and host.variables != '' %} + variables: + {{ host.variables | from_yaml | to_nice_yaml(indent=2) | indent(width=6, first=False) | replace("'{{", "!unsafe \'{{") }} +{%- endif %} {% endfor %} ... diff --git a/roles/filetree_create/templates/current_inventories.j2 b/roles/filetree_create/templates/current_inventories.j2 index 1496a008a..fadc76324 100644 --- a/roles/filetree_create/templates/current_inventories.j2 +++ b/roles/filetree_create/templates/current_inventories.j2 @@ -9,8 +9,8 @@ controller_inventories: {% if current_inventories_asset_value.kind %} kind: "{{ current_inventories_asset_value.kind }}" {% endif %} -{% if current_inventories_asset_value.variables and current_inventories_asset_value.variables != '---' %} +{% if current_inventories_asset_value.variables and current_inventories_asset_value.variables != '---' and current_inventories_asset_value.variables != '' %} variables: - {{ current_inventories_asset_value.variables | from_yaml | to_nice_yaml(indent=2) | indent(width=6, first=False) }} + {{ current_inventories_asset_value.variables | from_yaml | to_nice_yaml(indent=2) | indent(width=6, first=False) | replace("'{{", "!unsafe \'{{") }} {%- endif %} ... diff --git a/roles/filetree_create/templates/current_inventory_sources.j2 b/roles/filetree_create/templates/current_inventory_sources.j2 index 6c0ca8aaf..f6d8f258b 100644 --- a/roles/filetree_create/templates/current_inventory_sources.j2 +++ b/roles/filetree_create/templates/current_inventory_sources.j2 @@ -3,6 +3,7 @@ controller_inventory_sources: {% for inventory_source in current_inventory_sources_asset_value %} - name: "{{ inventory_source.name }}" description: "{{ inventory_source.description }}" + organization: "{{ inventory_source.summary_fields.organization.name }}" source: "{{ inventory_source.source | default('ToDo: The source of the inventory_source was originally missing and must be specified',true) }}" {% if inventory_source.source_project %} source_project: "{{ inventory_source.summary_fields.source_project.name }}" @@ -10,7 +11,7 @@ controller_inventory_sources: {% if inventory_source.source_path %} source_path: "{{ inventory_source.source_path }}" {% endif %} -{% if inventory_source.source_vars and inventory_source.source_vars != '---' %} +{% if inventory_source.source_vars and inventory_source.source_vars != '---' and inventory_source.source_vars != '' %} source_vars: {{ inventory_source.source_vars | from_yaml | to_nice_yaml(indent=2) | indent(width=6, first=False) | replace("'{{", "!unsafe \'{{") }} {%- endif %} @@ -18,7 +19,7 @@ controller_inventory_sources: update_on_launch: "{{ inventory_source.update_on_launch }}" overwrite: "{{ inventory_source.overwrite }}" {% if inventory_source.credential %} - credential: "{{ inventory_source.credential }}" + credential: "{{ inventory_source.summary_fields.credential.name }}" {% endif %} {% set query_notification_error = query(controller_api_plugin, inventory_source.related.notification_templates_error, host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, diff --git a/roles/filetree_create/templates/current_job_templates.j2 b/roles/filetree_create/templates/current_job_templates.j2 index 08b75b608..9e172c71f 100644 --- a/roles/filetree_create/templates/current_job_templates.j2 +++ b/roles/filetree_create/templates/current_job_templates.j2 @@ -21,14 +21,10 @@ controller_templates: ask_tags_on_launch: "{{ current_job_templates_asset_value.ask_tags_on_launch }}" ask_verbosity_on_launch: "{{ current_job_templates_asset_value.ask_verbosity_on_launch }}" ask_variables_on_launch: "{{ current_job_templates_asset_value.ask_variables_on_launch }}" -{% if (current_job_templates_asset_value.extra_vars | length) > 3 %} +{% if current_job_templates_asset_value.extra_vars and current_job_templates_asset_value.extra_vars != '---' and current_job_templates_asset_value.extra_vars != '' %} extra_vars: -{% if (current_job_templates_asset_value.extra_vars[0] is match('{')) %} -{{ current_job_templates_asset_value.extra_vars | from_json | to_nice_yaml(indent=2) | indent(width=6, first=True) }} -{% else %} -{{ current_job_templates_asset_value.extra_vars | from_yaml | to_nice_yaml(indent=2) | indent(width=6, first=True) }} -{% endif %} -{%- endif -%} + {{ current_job_templates_asset_value.extra_vars | from_yaml | to_nice_yaml(indent=2) | indent(width=6, first=False) | replace("'{{", "!unsafe \'{{") }} +{%- endif %} {% if is_aap %} execution_environment: "{{ current_job_templates_asset_value.summary_fields.execution_environment.name | default(omit) }}" {% endif %} diff --git a/roles/filetree_create/templates/current_notification_templates.j2 b/roles/filetree_create/templates/current_notification_templates.j2 index f4649d5ea..66e21f1ee 100644 --- a/roles/filetree_create/templates/current_notification_templates.j2 +++ b/roles/filetree_create/templates/current_notification_templates.j2 @@ -1,8 +1,6 @@ --- -controller_notification_templates: -- name: "{{ current_notification_templates_asset_value.name }}" - notification_template: - name: "{{ current_notification_templates_asset_value.name }}" +controller_notifications: + - name: "{{ current_notification_templates_asset_value.name }}" organization: "{{ current_notification_templates_asset_value.summary_fields.organization.name }}" notification_type: "{{ current_notification_templates_asset_value.notification_type }}" notification_configuration: diff --git a/roles/filetree_create/templates/current_workflow_job_templates.j2 b/roles/filetree_create/templates/current_workflow_job_templates.j2 index c061adf6c..90fdb512f 100644 --- a/roles/filetree_create/templates/current_workflow_job_templates.j2 +++ b/roles/filetree_create/templates/current_workflow_job_templates.j2 @@ -41,6 +41,10 @@ controller_workflows: allow_simultaneous: "{{ current_workflow_job_templates_asset_value.allow_simultaneous }}" scm_branch: "{{ current_workflow_job_templates_asset_value.scm_branch }}" webhook_service: "{{ current_workflow_job_templates_asset_value.webhook_service }}" +{% if current_workflow_job_templates_asset_value.extra_vars and current_workflow_job_templates_asset_value.extra_vars != '---' and current_workflow_job_templates_asset_value.extra_vars != '' %} + extra_vars: + {{ current_workflow_job_templates_asset_value.extra_vars | from_yaml | to_nice_yaml(indent=2) | indent(width=6, first=False) | replace("'{{", "!unsafe \'{{") }} +{%- endif %} {% if query_labels | length > 0 %} labels: {% for label in query_labels %} From d6abeaa3e3c32ad0da8587505cea4ee21cf3e526 Mon Sep 17 00:00:00 2001 From: adonisgarciac Date: Wed, 21 Dec 2022 12:03:44 +0100 Subject: [PATCH 16/94] add changelog --- changelogs/fragments/filetree_create.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/changelogs/fragments/filetree_create.yml b/changelogs/fragments/filetree_create.yml index c72bb4ab9..7d7e359db 100644 --- a/changelogs/fragments/filetree_create.yml +++ b/changelogs/fragments/filetree_create.yml @@ -1,4 +1,5 @@ --- minor_changes: - Improve template to export settings with filetree_create role. Settings will be in yaml format. + - Add or fix some variables or extra_vars exported from objects like notifications, inventory, inventory_source, hosts, groups, jt or wjt. ... From 5dae1849063dddb8e0f9f6f52aa2c1e97eff8766 Mon Sep 17 00:00:00 2001 From: adonisgarciac Date: Thu, 22 Dec 2022 11:15:46 +0100 Subject: [PATCH 17/94] relocate team and user roles when export with filetree_create --- roles/filetree_create/tasks/team_roles.yml | 4 ++-- roles/filetree_create/tasks/user_roles.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/filetree_create/tasks/team_roles.yml b/roles/filetree_create/tasks/team_roles.yml index 76f0ab165..9f497d1f5 100644 --- a/roles/filetree_create/tasks/team_roles.yml +++ b/roles/filetree_create/tasks/team_roles.yml @@ -8,14 +8,14 @@ - name: "Create the output directory for team roles: {{ output_path }}" ansible.builtin.file: - path: "{{ output_path }}" + path: "{{ output_path }}/team_roles" state: directory mode: '0755' - name: "Add current roles to the output yaml file" ansible.builtin.template: src: "templates/current_team_roles.j2" - dest: "{{ output_path }}/current_roles_{{ teamname | regex_replace('/', '_') }}.yaml" + dest: "{{ output_path }}/team_roles/current_roles_{{ teamname | regex_replace('/', '_') }}.yaml" mode: '0644' vars: current_team_roles_asset_value: "{{ team_roles_lookvar }}" diff --git a/roles/filetree_create/tasks/user_roles.yml b/roles/filetree_create/tasks/user_roles.yml index fb36b088e..efdab949a 100644 --- a/roles/filetree_create/tasks/user_roles.yml +++ b/roles/filetree_create/tasks/user_roles.yml @@ -8,14 +8,14 @@ - name: "Create the output directory for user roles: {{ output_path }}" ansible.builtin.file: - path: "{{ output_path }}" + path: "{{ output_path }}/user_roles" state: directory mode: '0755' - name: "Add current roles to the output yaml file" ansible.builtin.template: src: "templates/current_user_roles.j2" - dest: "{{ output_path }}/current_roles_{{ username | regex_replace('/', '_') }}.yaml" + dest: "{{ output_path }}/user_roles/current_roles_{{ username | regex_replace('/', '_') }}.yaml" mode: '0644' vars: current_user_roles_asset_value: "{{ user_roles_lookvar }}" From 5a85205817f602e9f0a2f839fea575ddf8d372f9 Mon Sep 17 00:00:00 2001 From: sean-m-sullivan Date: Sat, 24 Dec 2022 13:12:22 -0500 Subject: [PATCH 18/94] update testing versions --- .github/workflow-config/kube/awx.yaml | 9 --------- .github/workflow-config/kube/kustomization.yaml | 15 --------------- .github/workflow-config/kustomization.yaml | 4 ++-- .github/workflows/testing_minikube.yml | 4 ++-- 4 files changed, 4 insertions(+), 28 deletions(-) delete mode 100644 .github/workflow-config/kube/awx.yaml delete mode 100644 .github/workflow-config/kube/kustomization.yaml diff --git a/.github/workflow-config/kube/awx.yaml b/.github/workflow-config/kube/awx.yaml deleted file mode 100644 index a179435f0..000000000 --- a/.github/workflow-config/kube/awx.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -apiVersion: awx.ansible.com/v1beta1 -kind: AWX -metadata: - name: awx -spec: - service_type: nodeport - nodeport_port: 30080 -... diff --git a/.github/workflow-config/kube/kustomization.yaml b/.github/workflow-config/kube/kustomization.yaml deleted file mode 100644 index c275a2f94..000000000 --- a/.github/workflow-config/kube/kustomization.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - # Find the latest tag here: https://github.com/ansible/awx-operator/releases - - github.com/ansible/awx-operator/config/default?ref=1.0.0 - - awx.yaml - -# Set the image tags to match the git version from above -images: - - name: quay.io/ansible/awx-operator - newTag: 1.0.0 - -# Specify a custom namespace in which to install AWX -namespace: default -... diff --git a/.github/workflow-config/kustomization.yaml b/.github/workflow-config/kustomization.yaml index 528b8026b..4b434901f 100644 --- a/.github/workflow-config/kustomization.yaml +++ b/.github/workflow-config/kustomization.yaml @@ -2,12 +2,12 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: # Find the latest tag here: https://github.com/ansible/awx-operator/releases - - github.com/ansible/awx-operator/config/default?ref=1.0.0 + - github.com/ansible/awx-operator/config/default?ref=1.1.3 # Set the image tags to match the git version from above images: - name: quay.io/ansible/awx-operator - newTag: 1.0.0 + newTag: 1.1.3 # Specify a custom namespace in which to install AWX namespace: default diff --git a/.github/workflows/testing_minikube.yml b/.github/workflows/testing_minikube.yml index 220f5ce5a..d39140322 100644 --- a/.github/workflows/testing_minikube.yml +++ b/.github/workflows/testing_minikube.yml @@ -18,8 +18,8 @@ jobs: - name: Setup Minikube uses: manusa/actions-setup-minikube@v2.7.2 with: - minikube version: 'v1.26.1' - kubernetes version: 'v1.25.0' + minikube version: 'v1.28.0' + kubernetes version: 'v1.25.4' github token: ${{ secrets.GITHUB_TOKEN }} start args: '--addons=ingress' From b9512af0a9cae405ff5335f38a5d7de872332bee Mon Sep 17 00:00:00 2001 From: sean-m-sullivan Date: Sat, 24 Dec 2022 13:19:07 -0500 Subject: [PATCH 19/94] update testing versions --- .github/tests/configs/credentials.yml | 2 +- .github/tests/configs/differential_items.yml | 2 +- .github/tests/configure_controller.yml | 1 + .github/workflow-config/kube/awx.yaml | 9 +++++++++ .github/workflow-config/kube/kustomization.yaml | 15 +++++++++++++++ .github/workflows/ci_testing.yaml | 8 ++++++++ .../{testing_minikube.yml => ci_workflow.yaml} | 7 ++++--- .github/workflows/release.yml | 4 ++++ 8 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 .github/workflow-config/kube/awx.yaml create mode 100644 .github/workflow-config/kube/kustomization.yaml create mode 100644 .github/workflows/ci_testing.yaml rename .github/workflows/{testing_minikube.yml => ci_workflow.yaml} (95%) diff --git a/.github/tests/configs/credentials.yml b/.github/tests/configs/credentials.yml index 2806e04f3..68f173466 100644 --- a/.github/tests/configs/credentials.yml +++ b/.github/tests/configs/credentials.yml @@ -31,7 +31,7 @@ controller_credentials: organization: Satellite - description: CyberArk Lookup Credential name: "cyberark" - credential_type: CyberArk AIM Central Credential Provider Lookup + credential_type: CyberArk Central Credential Provider Lookup inputs: url: "https://cyberark.example.com" app_id: "My-App-ID" diff --git a/.github/tests/configs/differential_items.yml b/.github/tests/configs/differential_items.yml index 1d0b2a1c4..bc4a637d6 100644 --- a/.github/tests/configs/differential_items.yml +++ b/.github/tests/configs/differential_items.yml @@ -71,7 +71,7 @@ differential_items: with_present: false differential_test_items: - name: "cyberark" - credential_type: "CyberArk AIM Central Credential Provider Lookup" + credential_type: CyberArk Central Credential Provider Lookup organization: Default expected_test_result: - name: gitlab diff --git a/.github/tests/configure_controller.yml b/.github/tests/configure_controller.yml index ad27c2b3c..d06709fa4 100644 --- a/.github/tests/configure_controller.yml +++ b/.github/tests/configure_controller.yml @@ -4,6 +4,7 @@ connection: local vars: controller_validate_certs: false + controller_configuration_secure_logging: false # Define following vars here, or in configs/controller_auth.yml # controller_hostname: controller.example.com # controller_username: admin diff --git a/.github/workflow-config/kube/awx.yaml b/.github/workflow-config/kube/awx.yaml new file mode 100644 index 000000000..a179435f0 --- /dev/null +++ b/.github/workflow-config/kube/awx.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: awx.ansible.com/v1beta1 +kind: AWX +metadata: + name: awx +spec: + service_type: nodeport + nodeport_port: 30080 +... diff --git a/.github/workflow-config/kube/kustomization.yaml b/.github/workflow-config/kube/kustomization.yaml new file mode 100644 index 000000000..a2db911d3 --- /dev/null +++ b/.github/workflow-config/kube/kustomization.yaml @@ -0,0 +1,15 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + # Find the latest tag here: https://github.com/ansible/awx-operator/releases + - github.com/ansible/awx-operator/config/default?ref=1.1.3 + - awx.yaml + +# Set the image tags to match the git version from above +images: + - name: quay.io/ansible/awx-operator + newTag: 1.1.3 + +# Specify a custom namespace in which to install AWX +namespace: default +... diff --git a/.github/workflows/ci_testing.yaml b/.github/workflows/ci_testing.yaml new file mode 100644 index 000000000..c8665f897 --- /dev/null +++ b/.github/workflows/ci_testing.yaml @@ -0,0 +1,8 @@ +--- +name: Run Test Playbooks on AWX workflow +on: [push, pull_request] + +jobs: + Integration-test: + uses: "./.github/workflows/ci_workflow.yaml" +... diff --git a/.github/workflows/testing_minikube.yml b/.github/workflows/ci_workflow.yaml similarity index 95% rename from .github/workflows/testing_minikube.yml rename to .github/workflows/ci_workflow.yaml index d39140322..eaed1a930 100644 --- a/.github/workflows/testing_minikube.yml +++ b/.github/workflows/ci_workflow.yaml @@ -1,11 +1,12 @@ --- -name: Run Test Playbooks Minikube +name: Run Test Playbooks on AWX -on: [push, pull_request] +on: + workflow_call jobs: Integration-test: - name: Deploy Tower to Minikube and run tests + name: Deploy AWX to Minikube and run tests runs-on: ubuntu-latest steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 436ea5121..00670d9bb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,11 @@ on: - published jobs: + integration-test: + uses: "./.github/workflows/ci_workflow.yaml" release: + needs: + - integration-test uses: "redhat-cop/ansible_collections_tooling/.github/workflows/release_pipeline.yml@main" with: collection_namespace: infra From d09a004f969bee8e62dbd70c4cfb1c16e1c37b6f Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Sun, 25 Dec 2022 20:06:43 -0500 Subject: [PATCH 20/94] Update Testing (#453) * update testing versions * update testing versions --- .github/tests/configs/credentials.yml | 2 +- .github/tests/configs/differential_items.yml | 2 +- .github/tests/configure_controller.yml | 1 + .github/workflow-config/kube/kustomization.yaml | 4 ++-- .github/workflow-config/kustomization.yaml | 4 ++-- .github/workflows/ci_testing.yaml | 8 ++++++++ .../{testing_minikube.yml => ci_workflow.yaml} | 11 ++++++----- .github/workflows/release.yml | 4 ++++ 8 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/ci_testing.yaml rename .github/workflows/{testing_minikube.yml => ci_workflow.yaml} (92%) diff --git a/.github/tests/configs/credentials.yml b/.github/tests/configs/credentials.yml index 2806e04f3..68f173466 100644 --- a/.github/tests/configs/credentials.yml +++ b/.github/tests/configs/credentials.yml @@ -31,7 +31,7 @@ controller_credentials: organization: Satellite - description: CyberArk Lookup Credential name: "cyberark" - credential_type: CyberArk AIM Central Credential Provider Lookup + credential_type: CyberArk Central Credential Provider Lookup inputs: url: "https://cyberark.example.com" app_id: "My-App-ID" diff --git a/.github/tests/configs/differential_items.yml b/.github/tests/configs/differential_items.yml index 1d0b2a1c4..bc4a637d6 100644 --- a/.github/tests/configs/differential_items.yml +++ b/.github/tests/configs/differential_items.yml @@ -71,7 +71,7 @@ differential_items: with_present: false differential_test_items: - name: "cyberark" - credential_type: "CyberArk AIM Central Credential Provider Lookup" + credential_type: CyberArk Central Credential Provider Lookup organization: Default expected_test_result: - name: gitlab diff --git a/.github/tests/configure_controller.yml b/.github/tests/configure_controller.yml index ad27c2b3c..d06709fa4 100644 --- a/.github/tests/configure_controller.yml +++ b/.github/tests/configure_controller.yml @@ -4,6 +4,7 @@ connection: local vars: controller_validate_certs: false + controller_configuration_secure_logging: false # Define following vars here, or in configs/controller_auth.yml # controller_hostname: controller.example.com # controller_username: admin diff --git a/.github/workflow-config/kube/kustomization.yaml b/.github/workflow-config/kube/kustomization.yaml index c275a2f94..a2db911d3 100644 --- a/.github/workflow-config/kube/kustomization.yaml +++ b/.github/workflow-config/kube/kustomization.yaml @@ -2,13 +2,13 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: # Find the latest tag here: https://github.com/ansible/awx-operator/releases - - github.com/ansible/awx-operator/config/default?ref=1.0.0 + - github.com/ansible/awx-operator/config/default?ref=1.1.3 - awx.yaml # Set the image tags to match the git version from above images: - name: quay.io/ansible/awx-operator - newTag: 1.0.0 + newTag: 1.1.3 # Specify a custom namespace in which to install AWX namespace: default diff --git a/.github/workflow-config/kustomization.yaml b/.github/workflow-config/kustomization.yaml index 528b8026b..4b434901f 100644 --- a/.github/workflow-config/kustomization.yaml +++ b/.github/workflow-config/kustomization.yaml @@ -2,12 +2,12 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: # Find the latest tag here: https://github.com/ansible/awx-operator/releases - - github.com/ansible/awx-operator/config/default?ref=1.0.0 + - github.com/ansible/awx-operator/config/default?ref=1.1.3 # Set the image tags to match the git version from above images: - name: quay.io/ansible/awx-operator - newTag: 1.0.0 + newTag: 1.1.3 # Specify a custom namespace in which to install AWX namespace: default diff --git a/.github/workflows/ci_testing.yaml b/.github/workflows/ci_testing.yaml new file mode 100644 index 000000000..c8665f897 --- /dev/null +++ b/.github/workflows/ci_testing.yaml @@ -0,0 +1,8 @@ +--- +name: Run Test Playbooks on AWX workflow +on: [push, pull_request] + +jobs: + Integration-test: + uses: "./.github/workflows/ci_workflow.yaml" +... diff --git a/.github/workflows/testing_minikube.yml b/.github/workflows/ci_workflow.yaml similarity index 92% rename from .github/workflows/testing_minikube.yml rename to .github/workflows/ci_workflow.yaml index 220f5ce5a..eaed1a930 100644 --- a/.github/workflows/testing_minikube.yml +++ b/.github/workflows/ci_workflow.yaml @@ -1,11 +1,12 @@ --- -name: Run Test Playbooks Minikube +name: Run Test Playbooks on AWX -on: [push, pull_request] +on: + workflow_call jobs: Integration-test: - name: Deploy Tower to Minikube and run tests + name: Deploy AWX to Minikube and run tests runs-on: ubuntu-latest steps: @@ -18,8 +19,8 @@ jobs: - name: Setup Minikube uses: manusa/actions-setup-minikube@v2.7.2 with: - minikube version: 'v1.26.1' - kubernetes version: 'v1.25.0' + minikube version: 'v1.28.0' + kubernetes version: 'v1.25.4' github token: ${{ secrets.GITHUB_TOKEN }} start args: '--addons=ingress' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 436ea5121..00670d9bb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,11 @@ on: - published jobs: + integration-test: + uses: "./.github/workflows/ci_workflow.yaml" release: + needs: + - integration-test uses: "redhat-cop/ansible_collections_tooling/.github/workflows/release_pipeline.yml@main" with: collection_namespace: infra From 16756c369093024e6b0746802b7a7d51b234861d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 1 Jan 2023 08:37:36 -0500 Subject: [PATCH 21/94] Update pre-commit (#456) Co-authored-by: sean-m-sullivan --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8d1363e9c..87c281abd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: # types: # - yaml - repo: 'https://github.com/ansible-community/ansible-lint.git' - rev: v6.10.0 + rev: v6.10.1 hooks: # see discussions here about what arguments are used, and behavior # https://github.com/ansible/ansible-lint/issues/649 @@ -30,7 +30,7 @@ repos: - "ansible-core>=2.13" - "yamllint>=1.26,<2.0" - repo: https://github.com/DavidAnson/markdownlint-cli2 - rev: v0.5.1 + rev: v0.6.0 hooks: - id: markdownlint-cli2 - repo: https://github.com/ambv/black From 513e37272b0b820efc8c2a762f64d3f4038a760d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 2 Jan 2023 18:54:26 -0500 Subject: [PATCH 22/94] Update pre-commit (#457) Co-authored-by: sean-m-sullivan --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 87c281abd..6c696a903 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: # types: # - yaml - repo: 'https://github.com/ansible-community/ansible-lint.git' - rev: v6.10.1 + rev: v6.10.2 hooks: # see discussions here about what arguments are used, and behavior # https://github.com/ansible/ansible-lint/issues/649 From 500d8e82df69adf4be1218cfae158303a33e9b89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Aragon=C3=A9s=20Muniesa?= <26822043+ivarmu@users.noreply.github.com> Date: Wed, 4 Jan 2023 16:34:58 +0100 Subject: [PATCH 23/94] added roles to object_diff (#454) --- .../fragments/object_diff_role_and_plugin.yml | 4 + plugins/lookup/controller_object_diff.py | 102 ++++++++++++++++-- roles/filetree_read/README.md | 48 +++++---- roles/object_diff/README.md | 8 +- roles/object_diff/defaults/main.yml | 1 + roles/object_diff/tasks/roles.yml | 38 ++++++- 6 files changed, 163 insertions(+), 38 deletions(-) create mode 100644 changelogs/fragments/object_diff_role_and_plugin.yml diff --git a/changelogs/fragments/object_diff_role_and_plugin.yml b/changelogs/fragments/object_diff_role_and_plugin.yml new file mode 100644 index 000000000..444e945a3 --- /dev/null +++ b/changelogs/fragments/object_diff_role_and_plugin.yml @@ -0,0 +1,4 @@ +--- +minor_changes: + - Add roles object to object_diff role and controller_object_diff lookup plugin +... diff --git a/plugins/lookup/controller_object_diff.py b/plugins/lookup/controller_object_diff.py index a65ec6c48..b9210c826 100644 --- a/plugins/lookup/controller_object_diff.py +++ b/plugins/lookup/controller_object_diff.py @@ -93,6 +93,7 @@ from ansible.errors import AnsibleError, AnsibleLookupError from ansible.module_utils._text import to_native from ansible.utils.display import Display +import copy class LookupModule(LookupBase): @@ -131,6 +132,8 @@ def run(self, terms, variables=None, **kwargs): elif api_list[0]["type"] == "group" or api_list[0]["type"] == "host": keys_to_keep = ["name", "inventory"] api_keys_to_keep = ["name", "summary_fields"] + elif api_list[0]["type"] == "role": + pass else: keys_to_keep = ["name", "organization"] api_keys_to_keep = ["name", "summary_fields"] @@ -143,19 +146,24 @@ def run(self, terms, variables=None, **kwargs): keys_to_keep.append("inventory") api_keys_to_keep.append("inventory") - for item in compare_list: - for key in keys_to_keep: - if key not in item.keys(): - self.handle_error(msg="Key: '{0}' missing from item in compare_list item: {1}".format(key, item)) + if api_list[0]["type"] != "role": + for item in compare_list: + for key in keys_to_keep: + if key not in item.keys(): + self.handle_error(msg="Key: '{0}' missing from item in compare_list item: {1}".format(key, item)) - for item in api_list: - for key in api_keys_to_keep: - if key not in item.keys(): - self.handle_error(msg="Key: '{0}' missing from item in api_list. Does this object come from the api? item: {1}".format(key, item)) + for item in api_list: + for key in api_keys_to_keep: + if key not in item.keys(): + self.handle_error(msg="Key: '{0}' missing from item in api_list. Does this object come from the api? item: {1}".format(key, item)) # Reduce list to name and organization - compare_list_reduced = [{key: item[key] for key in keys_to_keep} for item in compare_list] - api_list_reduced = [{key: item[key] for key in api_keys_to_keep} for item in api_list] + if api_list[0]["type"] != "role": + compare_list_reduced = [{key: item[key] for key in keys_to_keep} for item in compare_list] + api_list_reduced = [{key: item[key] for key in api_keys_to_keep} for item in api_list] + else: + compare_list_reduced = copy.deepcopy(compare_list) + api_list_reduced = copy.deepcopy(api_list) # Convert summary field name into org name Only if not type organization if api_list[0]["type"] == "group" or api_list[0]["type"] == "host": @@ -177,6 +185,64 @@ def run(self, terms, variables=None, **kwargs): item.update({"unified_job_template": item["summary_fields"]["unified_job_template"]["name"]}) item.update({"workflow_job_template": item["summary_fields"]["workflow_job_template"]["name"]}) item.pop("summary_fields") + elif api_list[0]["type"] == "role": + for item in api_list_reduced: + if item["resource_type"] == "organization": + item.update({"organizations": [item[item["resource_type"]]]}) + item.update({"role": item["name"].lower()}) + # Remove the extra fields + item.pop("users") + item.pop("teams") + item.pop("name") + item.pop("resource_type") + if "organization" in item: + item.pop("organization") + if "type" in item: + item.pop("type") + list_to_extend = [] + list_to_remove = [] + for item in compare_list_reduced: + target_teams_expanded = False + job_templates_expanded = False + workflows_expanded = False + if "target_teams" in item: + for team in item["target_teams"]: + new_item = copy.deepcopy(item) + new_item.update({"team": team}) + new_item.pop("target_teams") + if "job_templates" in new_item: + new_item.pop("job_templates") + if "workflows" in new_item: + new_item.pop("workflows") + list_to_extend.append(new_item) + target_teams_expanded = True + if "job_templates" in item: + for job_template in item["job_templates"]: + new_item = copy.deepcopy(item) + new_item.update({"job_template": job_template}) + new_item.pop("job_templates") + if "target_teams" in new_item: + new_item.pop("target_teams") + if "workflows" in new_item: + new_item.pop("workflows") + list_to_extend.append(new_item) + job_templates_expanded = True + if "workflows" in item: + for workflow in item["workflows"]: + new_item = copy.deepcopy(item) + new_item.update({"workflow_job_template": workflow}) + new_item.pop("workflows") + if "target_teams" in new_item: + new_item.pop("target_teams") + if "job_templates" in new_item: + new_item.pop("job_templates") + list_to_extend.append(new_item) + workflows_expanded = True + if target_teams_expanded or job_templates_expanded or workflows_expanded: + list_to_remove.append(item) + for item in list_to_remove: + compare_list_reduced.remove(item) + compare_list_reduced.extend(list_to_extend) elif api_list[0]["type"] != "organization" and api_list[0]["type"] != "user" and api_list[0]["type"] != "credential_type": for item in api_list_reduced: item.update({"organization": item["summary_fields"]["organization"]["name"]}) @@ -186,7 +252,13 @@ def run(self, terms, variables=None, **kwargs): self.display.warning("api_list_reduced: {0}".format(api_list_reduced)) # Find difference between lists - difference = [i for i in api_list_reduced if i not in compare_list_reduced] + if api_list[0]["type"] != "role": + difference = [i for i in api_list_reduced if i not in compare_list_reduced] + else: + difference = [] + for item in api_list_reduced: + if item not in compare_list_reduced: + difference.append(item) # Set if self.get_option("set_absent"): @@ -200,4 +272,12 @@ def run(self, terms, variables=None, **kwargs): # Return Compare list with difference attached difference = compare_list + if api_list[0]["type"] == "role": + difference_to_remove = [] + for item in difference: + if "no_resource_type" in item or len(item) <= 3: + difference_to_remove.append(item) + for item in difference_to_remove: + difference.remove(item) + return [difference] diff --git a/roles/filetree_read/README.md b/roles/filetree_read/README.md index 8175a01c9..e0bede6e5 100644 --- a/roles/filetree_read/README.md +++ b/roles/filetree_read/README.md @@ -139,14 +139,14 @@ orgs_vars/Organization1 │   │   ├── controller_projects_inventory_sourcea_prod.yml │   │   ├── controller_projects_inventory_sourceb_dev.yml │   │   └── controller_projects_inventory_sourceb_prod.yml - │   ├── controller_roles.d - │   │   ├── app-example - │   │   │   ├── controller_roles_cmdb_approvals.yml - │   │   │   ├── controller_roles_inventories.yml - │   │   │   ├── controller_roles_inventory_wf_update.yml - │   │   │   ├── controller_roles_teams.yml - │   │   │   └── controller_roles_users.yml - │   │   └── controller_roles.yml + │   ├── controller_roles.d (1) + │   │   ├── app-example (1) + │   │   │   ├── controller_roles_cmdb_approvals.yml (1) + │   │   │   ├── controller_roles_inventories.yml (1) + │   │   │   ├── controller_roles_inventory_wf_update.yml (1) + │   │   │   ├── controller_roles_teams.yml (1) + │   │   │   └── controller_roles_users.yml (1) + │   │   └── controller_roles.yml (1) │   ├── controller_schedules.d │   │   ├── app-casc │   │   │   └── controller_schedules_casc.yml @@ -207,13 +207,13 @@ orgs_vars/Organization1 │   │   │   ├── controller_inventory_sources_sourceb_dev.yml │   │   │   └── controller_inventory_sources_sourceb_prod.yml │   │   └── controller_inventory_sources.yml - │   └── controller_settings.d (1) - │   ├── app-examples (1) - │   │   ├── controller_settings_jobs.yml (1) - │   │   ├── controller_settings_ldap.yml (1) - │   │   ├── controller_settings_system.yml (1) - │   │   └── controller_settings_user_interface.yml (1) - │   └── controller_settings.yml (1) + │   └── controller_settings.d (2) + │   ├── app-examples (2) + │   │   ├── controller_settings_jobs.yml (2) + │   │   ├── controller_settings_ldap.yml (2) + │   │   ├── controller_settings_system.yml (2) + │   │   └── controller_settings_user_interface.yml (2) + │   └── controller_settings.yml (2) └── demo-prd ├── controller_credentials.d │   ├── app-examples @@ -255,16 +255,18 @@ orgs_vars/Organization1 │   │   ├── controller_inventory_sources_sourceb_dev.yml │   │   └── controller_inventory_sources_sourceb_prod.yml │   └── controller_inventory_sources.yml - └── controller_settings.d (1) - ├── app-examples (1) - │   ├── controller_settings_jobs.yml (1) - │   ├── controller_settings_ldap.yml (1) - │   ├── controller_settings_system.yml (1) - │   └── controller_settings_user_interface.yml (1) - └── controller_settings.yml (1) + └── controller_settings.d (2) + ├── app-examples (2) + │   ├── controller_settings_jobs.yml (2) + │   ├── controller_settings_ldap.yml (2) + │   ├── controller_settings_system.yml (2) + │   └── controller_settings_user_interface.yml (2) + └── controller_settings.yml (2) ``` -> **NOTE (1):** These directories and files must belong to SuperAdmin Organization ONLY, because must have admin super powers. +> **NOTE (1):** These directory and files may belong to SuperAdmin Organization ONLY. If any other organization defines it's own `roles`, they must duplicate the ones given by the SuperAdmin Organization or they will be dropped. +> +> **NOTE (2):** These directories and files must belong to SuperAdmin Organization ONLY, because must have admin super powers. ## Role Tags diff --git a/roles/object_diff/README.md b/roles/object_diff/README.md index 2128c2890..77b41f20c 100644 --- a/roles/object_diff/README.md +++ b/roles/object_diff/README.md @@ -16,7 +16,7 @@ The following Variables set the organization where should be applied the configu | :------------ | :-----------: | :------: | :---------- | | `controller_api_plugin` | `ansible.controller` | yes | Full path for the controller_api_plugin to be used.
Can have two possible values:
  - awx.awx.controller_api # For the community Collection version
  - ansible.controller.controller_api # For the Red Hat Certified Collection version| | `drop_user_external_accounts` | `False` | no | When is true, all users will be taken to compare with SCM configuration as code | -| `drop_teams` | `False` | no | When is true, all teams will be taken to compare with SCM configuration as code | + | `protect_not_empty_orgs` | `N/A` | no | When is true, orgs which are not empty, will not be removed | ## Role Tags @@ -31,6 +31,10 @@ $ ansible-playbook object_diff.yml --list-tags ``` +## IMPORTANT + +To correctly manage `roles`, they can only be defined by a super-admin organization, so all the roles in the Ansible Controller instance are managed by only one organization. + ## Example Playbook ```bash @@ -123,6 +127,8 @@ GPLv3+ - [Ivan Aragonés](https://github.com/ivarmu) +- [Adonis García](https://github.com/adonisgarciac) + ## Important things to take into account - Issues: diff --git a/roles/object_diff/defaults/main.yml b/roles/object_diff/defaults/main.yml index cbf82e767..861f7247c 100644 --- a/roles/object_diff/defaults/main.yml +++ b/roles/object_diff/defaults/main.yml @@ -3,6 +3,7 @@ # populate_controller_api_user_accounts_without_external_accounts drop_user_external_accounts: false +query_controller_api_max_objects: 10000 # Automation Controller Object Lists controller_settings: [] diff --git a/roles/object_diff/tasks/roles.yml b/roles/object_diff/tasks/roles.yml index a9a3204b3..c97f470cf 100644 --- a/roles/object_diff/tasks/roles.yml +++ b/roles/object_diff/tasks/roles.yml @@ -13,14 +13,46 @@ - name: "Get the API list of all roles" ansible.builtin.set_fact: - __controller_api_roles: "{{ query(controller_api_plugin, 'roles', - host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) + __controller_api_roles: "{{ (__controller_api_roles | default([])) + [{ + 'users': current_users, + 'teams': current_teams, + 'name': current_role.name, + 'role': current_role.name, + 'type': current_role.type, + 'resource_type': (current_role.summary_fields.resource_type|default('no_resource_type')), + (current_role.summary_fields.resource_type|default('no_resource_type')): (current_role.summary_fields.resource_name|default('no_resource_name')) + }] }}" + vars: + current_users: "{{ query(controller_api_plugin, current_role.related.users, + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) | map(attribute='username') + }}" + current_teams: "{{ query(controller_api_plugin, current_role.related.teams, + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) | map(attribute='name') + }}" + loop: "{{ query(controller_api_plugin, 'roles', + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) + }}" + loop_control: + loop_var: current_role + + - name: "Explode the roles for users" + ansible.builtin.set_fact: + __full_controller_api_roles: "{{ (__full_controller_api_roles | default([])) + [item.0 | combine({'user': item.1})] }}" + loop: "{{ (__controller_api_roles | subelements('users')) }}" + + - name: "Explode the roles for teams" + ansible.builtin.set_fact: + __full_controller_api_roles: "{{ (__full_controller_api_roles | default([])) + [item.0 | combine({'team': item.1})] }}" + loop: "{{ (__controller_api_roles | subelements('teams')) }}" - name: "Find the difference of Roles between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: __roles_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', - api_list=__controller_api_roles, compare_list=controller_roles, + api_list=__full_controller_api_roles, compare_list=controller_roles, with_present=false, set_absent=true) }}" From a46ce87697a2cfb510c738852954869d5584b530 Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Tue, 13 Dec 2022 09:15:04 -0500 Subject: [PATCH 24/94] Update minikube build Update minikube build --- .ansible-lint | 1 + .github/ISSUE_TEMPLATE/config.yml | 3 +++ .github/workflows/testing_minikube.yml | 7 ++++--- .github/workflows/update_pre_commit.yml | 2 +- .pre-commit-config.yaml | 4 ++-- meta/runtime.yml | 2 +- 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 5c40629f5..c84f3bd05 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -17,6 +17,7 @@ skip_list: # Skipping fqcn[action] because this collection supports using either the awx.awx or ansible.controller collection # so a FQCN cannot be used in module names - fqcn[action] + - meta-unsupported-ansible # This collection with the appropriate awx.awx or ansible.controller still works with older ansible. kinds: - playbooks: "**/examples/templates/*.{yml,yaml}" - playbooks: "**/examples/*.{yml,yaml}" diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index d02a1765f..451a12a00 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -8,6 +8,9 @@ contact_links: - name: Discussions url: https://github.com/redhat-cop/controller_configuration/discussions about: Any kind of questions should go on the forum. + - name: Matrix room + url: https://matrix.to/#/#aap_config_as_code:ansible.com + about: Matrix room for questions and discussion. - name: Ansible Code of Conduct url: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html about: Be nice to other members of the community. Behave. diff --git a/.github/workflows/testing_minikube.yml b/.github/workflows/testing_minikube.yml index 45a556602..8a3b3611b 100644 --- a/.github/workflows/testing_minikube.yml +++ b/.github/workflows/testing_minikube.yml @@ -16,10 +16,11 @@ jobs: run: pip install -r .github/requirements.txt - name: Setup Minikube - uses: manusa/actions-setup-minikube@v2.4.2 + uses: manusa/actions-setup-minikube@v2.7.1 with: - minikube version: 'v1.21.0' - kubernetes version: 'v1.20.7' + minikube version: 'v1.26.1' + kubernetes version: 'v1.25.0' + github token: ${{ secrets.GITHUB_TOKEN }} start args: '--addons=ingress' - name: Wait / Sleep diff --git a/.github/workflows/update_pre_commit.yml b/.github/workflows/update_pre_commit.yml index edbd05279..ca8f4c474 100644 --- a/.github/workflows/update_pre_commit.yml +++ b/.github/workflows/update_pre_commit.yml @@ -10,7 +10,7 @@ on: jobs: pre-commit: - uses: "redhat-cop/ansible_collections_tooling/.github/workflows/update_precommit.yml@main" + uses: "sean-m-sullivan/ansible_collections_tooling/.github/workflows/update_precommit.yml@main" with: github_actor: ${{ github.actor }} secrets: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 88708d151..168dae684 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: # types: # - yaml - repo: 'https://github.com/ansible-community/ansible-lint.git' - rev: v6.9.1 + rev: v6.10.0a1 hooks: # see discussions here about what arguments are used, and behavior # https://github.com/ansible/ansible-lint/issues/649 @@ -34,7 +34,7 @@ repos: hooks: - id: markdownlint-cli2 - repo: https://github.com/ambv/black - rev: 22.10.0 + rev: 22.12.0 hooks: - id: black name: black diff --git a/meta/runtime.yml b/meta/runtime.yml index 33947e1f5..e4bff6aec 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,3 +1,3 @@ --- -requires_ansible: '>=2.9.6' +requires_ansible: '>=2.9.27' ... From 4db7f57c54bb4979dc822af17a5bcb3e6b570142 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Fri, 6 Jan 2023 13:49:47 +0000 Subject: [PATCH 25/94] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 27cf74539..5bfb505c7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Red Hat Communities of Practice Controller Configuration Collection -![Ansible Lint](https://github.com/redhat-cop/controller_configuration/workflows/Yaml%20and%20Ansible%20Lint/badge.svg) +![pre-commit tests](https://github.com/redhat-cop/controller_configuration/actions/workflows/pre-commit.yml/badge.svg) ![Galaxy Release](https://github.com/redhat-cop/controller_configuration/workflows/galaxy-release/badge.svg) From 7771a8dd84f9c6d225d4fb92b4179bb5e8ef9fcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Aragon=C3=A9s=20Muniesa?= <26822043+ivarmu@users.noreply.github.com> Date: Tue, 10 Jan 2023 15:01:59 +0100 Subject: [PATCH 26/94] added 'return_all: true' at every object type (#461) * added 'return_all: true' at every object type * added changelog fragment and query_controller_api_max_objects documentation at README.md * added roles to diff defaults --- changelogs/fragments/object_diff_role_and_plugin.yml | 1 + roles/object_diff/README.md | 5 +++-- roles/object_diff/defaults/main.yml | 1 + roles/object_diff/tasks/credential_types.yml | 12 ++++++++---- roles/object_diff/tasks/credentials.yml | 3 ++- roles/object_diff/tasks/groups.yml | 10 ++++++---- roles/object_diff/tasks/hosts.yml | 6 ++++-- roles/object_diff/tasks/inventories.yml | 3 ++- roles/object_diff/tasks/inventory_sources.yml | 3 ++- roles/object_diff/tasks/job_templates.yml | 3 ++- roles/object_diff/tasks/organizations.yml | 3 ++- roles/object_diff/tasks/projects.yml | 3 ++- roles/object_diff/tasks/teams.yml | 3 ++- roles/object_diff/tasks/user_accounts.yml | 3 ++- roles/object_diff/tasks/workflow_job_templates.yml | 3 ++- 15 files changed, 41 insertions(+), 21 deletions(-) diff --git a/changelogs/fragments/object_diff_role_and_plugin.yml b/changelogs/fragments/object_diff_role_and_plugin.yml index 444e945a3..72eeefae7 100644 --- a/changelogs/fragments/object_diff_role_and_plugin.yml +++ b/changelogs/fragments/object_diff_role_and_plugin.yml @@ -1,4 +1,5 @@ --- minor_changes: - Add roles object to object_diff role and controller_object_diff lookup plugin + - "return_all: true has been added to return the maximum of max_objects=query_controller_api_max_objects objects." ... diff --git a/roles/object_diff/README.md b/roles/object_diff/README.md index 77b41f20c..318ffc891 100644 --- a/roles/object_diff/README.md +++ b/roles/object_diff/README.md @@ -14,10 +14,11 @@ The following Variables set the organization where should be applied the configu | Variable Name | Default Value | Required | Description | | :------------ | :-----------: | :------: | :---------- | -| `controller_api_plugin` | `ansible.controller` | yes | Full path for the controller_api_plugin to be used.
Can have two possible values:
  - awx.awx.controller_api # For the community Collection version
  - ansible.controller.controller_api # For the Red Hat Certified Collection version| +| `controller_api_plugin` | `ansible.controller` | yes | Full path for the controller_api_plugin to be used.
Can have two possible values:
  - awx.awx.controller_api # For the community Collection version
  - ansible.controller.controller_api # For the Red Hat Certified Collection version | | `drop_user_external_accounts` | `False` | no | When is true, all users will be taken to compare with SCM configuration as code | - | `protect_not_empty_orgs` | `N/A` | no | When is true, orgs which are not empty, will not be removed | +| `query_controller_api_max_objects` | 10000 | no | Sets the maximum number of objects to be returned from the API | + ## Role Tags diff --git a/roles/object_diff/defaults/main.yml b/roles/object_diff/defaults/main.yml index 861f7247c..b7e013cbe 100644 --- a/roles/object_diff/defaults/main.yml +++ b/roles/object_diff/defaults/main.yml @@ -32,6 +32,7 @@ controller_roles: [] controller_configuration_object_diff_tasks: - {name: workflow_job_templates, var: controller_workflows, tags: workflow_job_templates} - {name: job_templates, var: controller_templates, tags: job_templates} + - {name: roles, var: controller_roles, tags: roles} - {name: teams, var: controller_teams, tags: teams} - {name: user_accounts, var: controller_user_accounts, tags: users} - {name: groups, var: controller_groups, tags: groups} diff --git a/roles/object_diff/tasks/credential_types.yml b/roles/object_diff/tasks/credential_types.yml index 3a9065838..dbb5417fd 100644 --- a/roles/object_diff/tasks/credential_types.yml +++ b/roles/object_diff/tasks/credential_types.yml @@ -3,15 +3,19 @@ - name: "Get the API list of all Credential Types" ansible.builtin.set_fact: __controller_api_credential_types: "{{ query(controller_api_plugin, 'credential_types', - query_params={'managed': false}, - host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) }}" + query_params={'managed': false}, + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) + }}" when: is_aap - name: "Get the API list of all Credential Types" ansible.builtin.set_fact: __controller_api_credential_types: "{{ query(controller_api_plugin, 'credential_types', - query_params={'managed_by_tower': false}, - host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) }}" + query_params={'managed_by_tower': false}, + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) + }}" when: not is_aap - name: "Find the difference of Credential Types between what is on the Controller versus CasC on SCM" diff --git a/roles/object_diff/tasks/credentials.yml b/roles/object_diff/tasks/credentials.yml index 1383f33bd..1465af525 100644 --- a/roles/object_diff/tasks/credentials.yml +++ b/roles/object_diff/tasks/credentials.yml @@ -11,7 +11,8 @@ ansible.builtin.set_fact: __controller_api_credentials: "{{ query(controller_api_plugin, 'credentials', query_params={'organization': __controller_organization_id.id}, - host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) }}" - name: "Find the difference of Credentials between what is on the Controller versus CasC on SCM" diff --git a/roles/object_diff/tasks/groups.yml b/roles/object_diff/tasks/groups.yml index ddce8f8c3..b7cfd4ff9 100644 --- a/roles/object_diff/tasks/groups.yml +++ b/roles/object_diff/tasks/groups.yml @@ -2,8 +2,8 @@ - name: Get the organization ID ansible.builtin.set_fact: controller_organization_id: "{{ lookup(controller_api_plugin, 'organizations', - query_params={'name': orgs}, - host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) + query_params={'name': orgs}, + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) }}" - name: "Get the API list of all inventories" @@ -13,14 +13,16 @@ 'has_inventory_sources': 'false', 'not__total_groups': '0', 'not__kind': 'smart'}, - host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) }}" - name: "Get the API list of all groups in the inventories at organization {{ orgs }}" ansible.builtin.set_fact: __controller_api_groups: "{{ (__controller_api_groups | default([])) + query(controller_api_plugin, 'groups', query_params={'inventory': current_inventory.id}, - host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) }}" loop: "{{ __controller_api_inventories }}" loop_control: diff --git a/roles/object_diff/tasks/hosts.yml b/roles/object_diff/tasks/hosts.yml index 39a07e50e..1962ab145 100644 --- a/roles/object_diff/tasks/hosts.yml +++ b/roles/object_diff/tasks/hosts.yml @@ -14,14 +14,16 @@ 'not__total_hosts': '0', 'not__kind': 'smart'}, host=controller_hostname, username=controller_username, - password=controller_password, verify_ssl=controller_validate_certs) + password=controller_password, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) }}" - name: "Get the API list of all hosts in the inventories at organization {{ orgs }}" ansible.builtin.set_fact: __controller_api_hosts: "{{ (__controller_api_hosts | default([])) + query(controller_api_plugin, 'hosts', query_params={'inventory': current_inventory.id}, - host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) }}" loop: "{{ __controller_api_inventories }}" loop_control: diff --git a/roles/object_diff/tasks/inventories.yml b/roles/object_diff/tasks/inventories.yml index 44ebc983d..d9b74c550 100644 --- a/roles/object_diff/tasks/inventories.yml +++ b/roles/object_diff/tasks/inventories.yml @@ -10,7 +10,8 @@ ansible.builtin.set_fact: __controller_api_inventories: "{{ query(controller_api_plugin, 'inventories', query_params={'organization': __controller_organization_id.id}, - host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) }}" - name: "Find the difference of Inventories between what is on the Controller versus CasC on SCM" diff --git a/roles/object_diff/tasks/inventory_sources.yml b/roles/object_diff/tasks/inventory_sources.yml index 36b1caf15..caddc6c33 100644 --- a/roles/object_diff/tasks/inventory_sources.yml +++ b/roles/object_diff/tasks/inventory_sources.yml @@ -10,7 +10,8 @@ ansible.builtin.set_fact: __controller_api_inventory_sources: "{{ query(controller_api_plugin, 'inventory_sources', query_params={'organization': __controller_organization_id.id}, - host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) }}" - name: "Find the difference of Inventory Sources between what is on the Controller versus CasC on SCM" diff --git a/roles/object_diff/tasks/job_templates.yml b/roles/object_diff/tasks/job_templates.yml index 705d63e9b..cf9b5f677 100644 --- a/roles/object_diff/tasks/job_templates.yml +++ b/roles/object_diff/tasks/job_templates.yml @@ -10,7 +10,8 @@ ansible.builtin.set_fact: __controller_api_job_templates: "{{ query(controller_api_plugin, 'job_templates', query_params={'organization': __controller_organization_id.id}, - host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) }}" - name: "Find the difference of Job Templates between what is on the Controller versus CasC on SCM" diff --git a/roles/object_diff/tasks/organizations.yml b/roles/object_diff/tasks/organizations.yml index 3f793ea7d..87f6a9b06 100644 --- a/roles/object_diff/tasks/organizations.yml +++ b/roles/object_diff/tasks/organizations.yml @@ -13,7 +13,8 @@ - name: "Gets current Organizations configured" ansible.builtin.set_fact: __controller_api_organizations: "{{ query(controller_api_plugin, 'organizations', - host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) }}" - name: "Find the difference of Organizations between what is on the Controller versus curated list." diff --git a/roles/object_diff/tasks/projects.yml b/roles/object_diff/tasks/projects.yml index 957d9caa8..9b0db27bf 100644 --- a/roles/object_diff/tasks/projects.yml +++ b/roles/object_diff/tasks/projects.yml @@ -10,7 +10,8 @@ ansible.builtin.set_fact: __controller_api_projects: "{{ query(controller_api_plugin, 'projects', query_params={'organization': __controller_organization_id.id}, - host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) }}" - name: "Find the difference of Project between what is on the Controller versus CasC on SCM" diff --git a/roles/object_diff/tasks/teams.yml b/roles/object_diff/tasks/teams.yml index 7c7341d8c..fad5994c7 100644 --- a/roles/object_diff/tasks/teams.yml +++ b/roles/object_diff/tasks/teams.yml @@ -21,7 +21,8 @@ ansible.builtin.set_fact: __controller_api_teams: "{{ query(controller_api_plugin, 'teams', query_params={'organization': __controller_organization_id.id}, - host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) }}" - name: "Find the difference of Teams between what is on the Controller versus CasC on SCM" diff --git a/roles/object_diff/tasks/user_accounts.yml b/roles/object_diff/tasks/user_accounts.yml index f8b19dd4b..ee08740b7 100644 --- a/roles/object_diff/tasks/user_accounts.yml +++ b/roles/object_diff/tasks/user_accounts.yml @@ -10,7 +10,8 @@ - name: "Get all users from the API" ansible.builtin.set_fact: __controller_api_user_accounts: "{{ query(controller_api_plugin, 'users', - host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) }}" - name: "Populate user accounts (block)" diff --git a/roles/object_diff/tasks/workflow_job_templates.yml b/roles/object_diff/tasks/workflow_job_templates.yml index 28e669df7..9867cb506 100644 --- a/roles/object_diff/tasks/workflow_job_templates.yml +++ b/roles/object_diff/tasks/workflow_job_templates.yml @@ -10,7 +10,8 @@ ansible.builtin.set_fact: __controller_api_workflow_job_templates: "{{ query(controller_api_plugin, 'workflow_job_templates', query_params={'organization': __controller_organization_id.id}, - host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) }}" - name: "Find the difference of Workflow Job Templates between what is on the Controller versus CasC on SCM" From 026e5b31af88e8ab125bc8a5451caa4f250b6c6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Aragon=C3=A9s=20Muniesa?= <26822043+ivarmu@users.noreply.github.com> Date: Tue, 10 Jan 2023 15:40:57 +0100 Subject: [PATCH 27/94] replaced the 'warning' call for the 'v' call to show the information only when verbosity is required (#462) --- plugins/lookup/controller_object_diff.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/lookup/controller_object_diff.py b/plugins/lookup/controller_object_diff.py index b9210c826..67e9c6512 100644 --- a/plugins/lookup/controller_object_diff.py +++ b/plugins/lookup/controller_object_diff.py @@ -248,8 +248,8 @@ def run(self, terms, variables=None, **kwargs): item.update({"organization": item["summary_fields"]["organization"]["name"]}) item.pop("summary_fields") - self.display.warning("compare_list_reduced: {0}".format(compare_list_reduced)) - self.display.warning("api_list_reduced: {0}".format(api_list_reduced)) + self.display.v("compare_list_reduced: {0}".format(compare_list_reduced)) + self.display.v("api_list_reduced: {0}".format(api_list_reduced)) # Find difference between lists if api_list[0]["type"] != "role": From 02ac4fc3efcbbf4d789e257c3c7ea90c6427974e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Aragon=C3=A9s=20Muniesa?= <26822043+ivarmu@users.noreply.github.com> Date: Wed, 11 Jan 2023 15:54:07 +0100 Subject: [PATCH 28/94] fixes a reserved name collision (#463) * fixes a reserved name collision * rename to 'update_project' --- changelogs/fragments/project_updates.yml | 4 ++++ roles/project_update/README.md | 1 + roles/project_update/tasks/main.yml | 2 +- roles/project_update/tests/configs/projects.yml | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/project_updates.yml diff --git a/changelogs/fragments/project_updates.yml b/changelogs/fragments/project_updates.yml new file mode 100644 index 000000000..99783dea4 --- /dev/null +++ b/changelogs/fragments/project_updates.yml @@ -0,0 +1,4 @@ +--- +minor_changes: + - Renamed the field `update` to `update_project` to avoid colliding with the Python dict update method +... diff --git a/roles/project_update/README.md b/roles/project_update/README.md index 3db355415..049bb7235 100644 --- a/roles/project_update/README.md +++ b/roles/project_update/README.md @@ -63,6 +63,7 @@ This also speeds up the overall role. |`wait`|""|no|str|Wait for the project to complete.| |`interval`|`controller_configuration_project_update_async_delay`|no|str|The interval to request an update from controller.| |`timeout`|""|no|str|If waiting for the job to complete this will abort after this amount of seconds.| +|`update_project`|false|no|bool|If defined and true, the project update will be executed, otherwise it won't.| ### Standard Project Data Structure diff --git a/roles/project_update/tasks/main.yml b/roles/project_update/tasks/main.yml index 384ce69dd..dad71857d 100644 --- a/roles/project_update/tasks/main.yml +++ b/roles/project_update/tasks/main.yml @@ -21,7 +21,7 @@ no_log: "{{ controller_configuration_project_update_secure_logging }}" when: - controller_projects is defined - - __project_update_update_item.update + - __project_update_update_item.update_project | default(false) - __project_update_update_item.state | default('present') != "absent" async: 1000 poll: 0 diff --git a/roles/project_update/tests/configs/projects.yml b/roles/project_update/tests/configs/projects.yml index 183a1c44f..89fc9cfb0 100644 --- a/roles/project_update/tests/configs/projects.yml +++ b/roles/project_update/tests/configs/projects.yml @@ -7,7 +7,7 @@ controller_projects: scm_clean: true description: Test Project 1 organization: Satellite - update: true + update_project: true wait: true - name: Test Project 2 scm_type: git From 4e3e0eae358793a3eade995b34ec97ca7c7b4f15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Aragon=C3=A9s=20Muniesa?= <26822043+ivarmu@users.noreply.github.com> Date: Thu, 12 Jan 2023 12:40:23 +0100 Subject: [PATCH 29/94] renamed all controller_workflow_job_templates to controller_workflows (#464) * renamed all controller_workflow_job_templates to controller_workflows * add changelog fragment --- changelogs/fragments/filetree_create.yml | 1 + changelogs/fragments/object_diff_role_and_plugin.yml | 3 ++- roles/filetree_create/defaults/main.yml | 2 +- roles/filetree_read/defaults/main.yml | 2 +- roles/filetree_read/tasks/main.yml | 2 +- roles/object_diff/defaults/main.yml | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/changelogs/fragments/filetree_create.yml b/changelogs/fragments/filetree_create.yml index 7d7e359db..e91d29e26 100644 --- a/changelogs/fragments/filetree_create.yml +++ b/changelogs/fragments/filetree_create.yml @@ -1,5 +1,6 @@ --- minor_changes: + - Renamed variable controller_workflow_job_templates to controller_workflows (the previos one was not used at all). - Improve template to export settings with filetree_create role. Settings will be in yaml format. - Add or fix some variables or extra_vars exported from objects like notifications, inventory, inventory_source, hosts, groups, jt or wjt. ... diff --git a/changelogs/fragments/object_diff_role_and_plugin.yml b/changelogs/fragments/object_diff_role_and_plugin.yml index 72eeefae7..495ea3f7b 100644 --- a/changelogs/fragments/object_diff_role_and_plugin.yml +++ b/changelogs/fragments/object_diff_role_and_plugin.yml @@ -1,5 +1,6 @@ --- minor_changes: - - Add roles object to object_diff role and controller_object_diff lookup plugin + - Renamed variable controller_workflow_job_templates to controller_workflows (the previos one was not used at all). + - Add roles object to object_diff role and controller_object_diff lookup plugin. - "return_all: true has been added to return the maximum of max_objects=query_controller_api_max_objects objects." ... diff --git a/roles/filetree_create/defaults/main.yml b/roles/filetree_create/defaults/main.yml index 7d4f219a0..87a192b92 100644 --- a/roles/filetree_create/defaults/main.yml +++ b/roles/filetree_create/defaults/main.yml @@ -15,7 +15,7 @@ controller_schedules: [] controller_settings: [] controller_teams: [] controller_user_accounts: [] -controller_workflow_job_templates: [] +controller_workflows: [] # Output directory path output_path: "/tmp/filetree_output" diff --git a/roles/filetree_read/defaults/main.yml b/roles/filetree_read/defaults/main.yml index a9d9e3892..3c54f4c28 100644 --- a/roles/filetree_read/defaults/main.yml +++ b/roles/filetree_read/defaults/main.yml @@ -26,7 +26,7 @@ controller_instance_groups: [] controller_hosts: [] controller_groups: [] controller_templates: [] -controller_workflow_job_templates: [] +controller_workflows: [] controller_schedules: [] controller_roles: [] diff --git a/roles/filetree_read/tasks/main.yml b/roles/filetree_read/tasks/main.yml index a39b7e108..d69788658 100644 --- a/roles/filetree_read/tasks/main.yml +++ b/roles/filetree_read/tasks/main.yml @@ -20,7 +20,7 @@ controller_hosts: [] controller_groups: [] controller_templates: [] - controller_workflow_job_templates: [] + controller_workflows: [] controller_schedules: [] controller_roles: [] tags: always diff --git a/roles/object_diff/defaults/main.yml b/roles/object_diff/defaults/main.yml index b7e013cbe..9e5176239 100644 --- a/roles/object_diff/defaults/main.yml +++ b/roles/object_diff/defaults/main.yml @@ -24,7 +24,7 @@ controller_instance_groups: [] controller_hosts: [] controller_groups: [] controller_templates: [] -controller_workflow_job_templates: [] +controller_workflows: [] controller_schedules: [] controller_roles: [] From 758198241852298827e349b76f4661f4834f549a Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Fri, 13 Jan 2023 05:17:08 -0500 Subject: [PATCH 30/94] update release (#466) --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 00670d9bb..09355cad8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,8 +21,10 @@ jobs: collection_name: controller_configuration collection_version: ${{ github.ref_name }} collection_repo: https://github.com/redhat-cop/controller_configuration/ + quay_username: redhat_cop secrets: galaxy_api_key: ${{ secrets.ANSIBLE_GALAXY_APIKEY }} infra_api_key: ${{ secrets.GALAXY_INFRA_KEY }} token: ${{ secrets.GITHUB_TOKEN }} + quay_token: ${{ secrets.quay_token }} ... From 674abc0bc943d318589e2420999a5e1bdfa03057 Mon Sep 17 00:00:00 2001 From: ansible Date: Fri, 13 Jan 2023 11:56:40 +0100 Subject: [PATCH 31/94] update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8fbc38cb3..c15f1f7d9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ collections/* galaxy.yml *.tar.gz *.pyc +id_rsa* From 25b8e0287afcc5ca761e6a3797b208d3480c943b Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Wed, 18 Jan 2023 05:26:28 -0500 Subject: [PATCH 32/94] Update worflow_job_template to always allow missig state (#469) workflow_job_templates required `state` to be defined when using simplified_worklow_nodes. This change now allows `state` to be undefined when using simplified_workflow_nodes. --- .github/tests/configs/differential_items.yml | 3 ++ .github/tests/configs/workflows.yml | 43 +++++++++++++++++++ .../workflow_job_template_state_and_nodes.yml | 4 ++ roles/workflow_job_templates/tasks/main.yml | 2 +- 4 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/workflow_job_template_state_and_nodes.yml diff --git a/.github/tests/configs/differential_items.yml b/.github/tests/configs/differential_items.yml index bc4a637d6..3adeff41c 100644 --- a/.github/tests/configs/differential_items.yml +++ b/.github/tests/configs/differential_items.yml @@ -138,4 +138,7 @@ differential_items: - name: Simple workflow schema2 organization: Default state: absent + - name: Simple workflow schema no state defined + organization: Default + state: absent ... diff --git a/.github/tests/configs/workflows.yml b/.github/tests/configs/workflows.yml index 6c8bee677..acf4b1eaf 100644 --- a/.github/tests/configs/workflows.yml +++ b/.github/tests/configs/workflows.yml @@ -73,4 +73,47 @@ controller_workflows: notification_templates_success: [] notification_templates_error: [] notification_templates_approvals: [] + - name: Simple workflow schema no state defined + description: a basic workflow + extra_vars: {} + survey_enabled: false + allow_simultaneous: false + ask_variables_on_launch: false + inventory: + limit: + job_tags: + - stuff + - stuff2 + skip_tags: + - stuff3 + ask_labels_on_launch: true + ask_skip_tags_on_launch: true + labels: + - Prod + scm_branch: + ask_inventory_on_launch: false + ask_scm_branch_on_launch: false + ask_limit_on_launch: false + organization: Default + schedules: [] + simplified_workflow_nodes: + - all_parents_must_converge: false + identifier: node101 + unified_job_template: RHVM-01 + success_nodes: + - node201 + - all_parents_must_converge: false + identifier: node201 + unified_job_template: test-template-1 + instance_groups: + - default + labels: + - differential + - differential2 + timeout: 165 + notification_templates_started: [] + notification_templates_success: [] + notification_templates_error: [] + notification_templates_approvals: [] + survey_spec: {} ... diff --git a/changelogs/fragments/workflow_job_template_state_and_nodes.yml b/changelogs/fragments/workflow_job_template_state_and_nodes.yml new file mode 100644 index 000000000..f8603eabe --- /dev/null +++ b/changelogs/fragments/workflow_job_template_state_and_nodes.yml @@ -0,0 +1,4 @@ +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). diff --git a/roles/workflow_job_templates/tasks/main.yml b/roles/workflow_job_templates/tasks/main.yml index 73f6adaeb..91d7c7d6f 100644 --- a/roles/workflow_job_templates/tasks/main.yml +++ b/roles/workflow_job_templates/tasks/main.yml @@ -75,5 +75,5 @@ loop_var: __workflow_loop_item when: - __workflow_loop_item.simplified_workflow_nodes is defined - - __workflow_loop_item.state == "present" + - (__workflow_loop_item.state | default('present')) == "present" ... From ad679a4481e79afbc36b948cb76e6e80b9acd13f Mon Sep 17 00:00:00 2001 From: sean-m-sullivan Date: Wed, 18 Jan 2023 05:14:25 +0000 Subject: [PATCH 33/94] Update pre-commit --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6c696a903..e9876aa40 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: # types: # - yaml - repo: 'https://github.com/ansible-community/ansible-lint.git' - rev: v6.10.2 + rev: v6.11.0 hooks: # see discussions here about what arguments are used, and behavior # https://github.com/ansible/ansible-lint/issues/649 From 5eea7a030cd27516649ff8a20e2a7272ce08fe55 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 18 Jan 2023 15:58:40 +0000 Subject: [PATCH 34/94] Add note to labels option in readmes (#472) --- roles/job_templates/README.md | 2 +- roles/workflow_job_templates/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/job_templates/README.md b/roles/job_templates/README.md index 37f6fd9f4..e1a393246 100644 --- a/roles/job_templates/README.md +++ b/roles/job_templates/README.md @@ -108,7 +108,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| +|`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.| |`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.| diff --git a/roles/workflow_job_templates/README.md b/roles/workflow_job_templates/README.md index df30f2813..6c6f7d552 100644 --- a/roles/workflow_job_templates/README.md +++ b/roles/workflow_job_templates/README.md @@ -71,7 +71,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| +|`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.| |`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.| @@ -103,7 +103,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| +|`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.| |`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.| From 9f4fb52f0ede1f794e88e9622c40d8ac750399d9 Mon Sep 17 00:00:00 2001 From: "tompage1994@hotmail.co.uk" Date: Wed, 18 Jan 2023 14:53:41 +0000 Subject: [PATCH 35/94] Add execution environment option to job_template example --- roles/job_templates/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/job_templates/README.md b/roles/job_templates/README.md index e1a393246..b1f13f40e 100644 --- a/roles/job_templates/README.md +++ b/roles/job_templates/README.md @@ -185,6 +185,7 @@ controller_templates: - name: Survey Template with vars job_type: run inventory: Demo Inventory + execution_environment: my_exec_env survey_enabled: true survey: "{{ lookup('template', 'template_surveys/basic_survey.json') | regex_replace('\\n', '') }}" project: controller Config From 442da3cbef36e6210e3aa2e10a3bf6ca8b488dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Aragon=C3=A9s=20Muniesa?= <26822043+ivarmu@users.noreply.github.com> Date: Mon, 23 Jan 2023 08:47:38 +0100 Subject: [PATCH 36/94] Added types of the parameters for the filetree_read role --- roles/filetree_read/README.md | 54 +++++++++++++++++------------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/roles/filetree_read/README.md b/roles/filetree_read/README.md index e0bede6e5..f31cbcc9b 100644 --- a/roles/filetree_read/README.md +++ b/roles/filetree_read/README.md @@ -12,33 +12,33 @@ ansible-galaxy collection install -r tests/collections/requirements.yml to be in The following Variables set the organization where should be applied the configuration, the absolute or relative of the directory structure where the variables will be stored and the life-cycle environment to use. -|Variable Name|Default Value|Required|Description| -|:---:|:---:|:---:|:---:| -|`orgs:`|Acme|yes|This variable sets the organization where should be applied the configuration.| -|`dir_orgs_vars:`|orgs_vars|yes|This variable sets the directory path where the variables will be store.| -|`env:`|dev|yes|This variable sets the life-cycle environment to use.| -|`controller_location:`|''|no|This variable sets object localtion. It is useful when the configuration need to be replicated in an active/passive sites architecture| -|`filetree_controller_settings`|{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_settings.d/|yes|Directory path to load controller object variables| -|`filetree_controller_organizations`|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_organizations.d/|yes|Directory path to load controller object variables| -|`filetree_controller_labels`|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_labels.d/|yes|Directory path to load controller object variables| -|`filetree_controller_user_accounts`| {{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_users.d/| -|`filetree_controller_teams`| {{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_teams.d/|yes|Directory path to load controller object variables| -|`filetree_controller_credential_types`| {{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_credential_types.d/|yes|Directory path to load controller object variables| -|`filetree_controller_credentials`| {{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_credentials.d/|yes|Directory path to load controller object variables| -|`filetree_controller_credential_input_sources`| {{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_credential_input_sources.d/|yes|Directory path to load controller object variables| -|`filetree_controller_notifications`| {{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_notification_templates.d/|yes|Directory path to load controller object variables| -|`filetree_controller_projects`| {{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_projects.d/|yes|Directory path to load controller object variables| -|`filetree_controller_execution_environments`| {{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_execution_environments.d/|yes|Directory path to load controller object variables| -|`filetree_controller_applications`| {{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_applications.d/|yes|Directory path to load controller object variables| -|`filetree_controller_inventories`| {{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_inventories.d/|yes|Directory path to load controller object variables| -|`filetree_controller_inventory_sources`| {{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_inventory_sources.d/|yes|Directory path to load controller object variables| -|`filetree_controller_instance_groups`| {{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_instance_groups.d/|yes|Directory path to load controller object variables| -|`filetree_controller_hosts`| {{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_hosts.d/|yes|Directory path to load controller object variables| -|`filetree_controller_groups`| {{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_groups.d/|yes|Directory path to load controller object variables| -|`filetree_controller_templates`| {{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_job_templates.d/|yes|Directory path to load controller object variables| -|`filetree_controller_workflow_job_templates`| {{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_workflow_job_templates.d/|yes|Directory path to load controller object variables| -|`filetree_controller_schedules`| {{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_schedules.d/|yes|Directory path to load controller object variables| -|`filetree_controller_roles`| {{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_roles.d/|yes|Directory path to load controller object variables| +|Variable Name|Type|Default Value|Required|Description| +|:---:|:---:|:---:|:---:|:---:| +|`orgs:`|String|Acme|yes|This variable sets the organization where should be applied the configuration.| +|`dir_orgs_vars:`|String|orgs_vars|yes|This variable sets the directory path where the variables will be store.| +|`env:`|String|dev|yes|This variable sets the life-cycle environment to use.| +|`controller_location:`|String|''|no|This variable sets object localtion. It is useful when the configuration need to be replicated in an active/passive sites architecture| +|`filetree_controller_settings`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_settings.d/|yes|Directory path to load controller object variables| +|`filetree_controller_organizations`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_organizations.d/|yes|Directory path to load controller object variables| +|`filetree_controller_labels`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_labels.d/|yes|Directory path to load controller object variables| +|`filetree_controller_user_accounts`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_users.d/| +|`filetree_controller_teams`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_teams.d/|yes|Directory path to load controller object variables| +|`filetree_controller_credential_types`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_credential_types.d/|yes|Directory path to load controller object variables| +|`filetree_controller_credentials`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_credentials.d/|yes|Directory path to load controller object variables| +|`filetree_controller_credential_input_sources`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_credential_input_sources.d/|yes|Directory path to load controller object variables| +|`filetree_controller_notifications`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_notification_templates.d/|yes|Directory path to load controller object variables| +|`filetree_controller_projects`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_projects.d/|yes|Directory path to load controller object variables| +|`filetree_controller_execution_environments`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_execution_environments.d/|yes|Directory path to load controller object variables| +|`filetree_controller_applications`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_applications.d/|yes|Directory path to load controller object variables| +|`filetree_controller_inventories`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_inventories.d/|yes|Directory path to load controller object variables| +|`filetree_controller_inventory_sources`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_inventory_sources.d/|yes|Directory path to load controller object variables| +|`filetree_controller_instance_groups`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_instance_groups.d/|yes|Directory path to load controller object variables| +|`filetree_controller_hosts`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_hosts.d/|yes|Directory path to load controller object variables| +|`filetree_controller_groups`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_groups.d/|yes|Directory path to load controller object variables| +|`filetree_controller_templates`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_job_templates.d/|yes|Directory path to load controller object variables| +|`filetree_controller_workflow_job_templates`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_workflow_job_templates.d/|yes|Directory path to load controller object variables| +|`filetree_controller_schedules`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_schedules.d/|yes|Directory path to load controller object variables| +|`filetree_controller_roles`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_roles.d/|yes|Directory path to load controller object variables| ### Data Structure From a4ddf30dc5bddc8dc2d87eeba2c2a7fafd6ca934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Aragon=C3=A9s=20Muniesa?= <26822043+ivarmu@users.noreply.github.com> Date: Mon, 23 Jan 2023 09:10:08 +0100 Subject: [PATCH 37/94] fix missing information --- roles/filetree_read/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/filetree_read/README.md b/roles/filetree_read/README.md index f31cbcc9b..d22ffef74 100644 --- a/roles/filetree_read/README.md +++ b/roles/filetree_read/README.md @@ -21,7 +21,7 @@ The following Variables set the organization where should be applied the configu |`filetree_controller_settings`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_settings.d/|yes|Directory path to load controller object variables| |`filetree_controller_organizations`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_organizations.d/|yes|Directory path to load controller object variables| |`filetree_controller_labels`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_labels.d/|yes|Directory path to load controller object variables| -|`filetree_controller_user_accounts`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_users.d/| +|`filetree_controller_user_accounts`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_users.d/|yes|Directory path to load controller object variables| |`filetree_controller_teams`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_teams.d/|yes|Directory path to load controller object variables| |`filetree_controller_credential_types`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_credential_types.d/|yes|Directory path to load controller object variables| |`filetree_controller_credentials`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_credentials.d/|yes|Directory path to load controller object variables| From f66b28c6785b03d2f06f86ad6691eaa000755e67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Aragon=C3=A9s=20Muniesa?= <26822043+ivarmu@users.noreply.github.com> Date: Mon, 23 Jan 2023 09:11:38 +0100 Subject: [PATCH 38/94] fix missing information --- roles/filetree_read/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/filetree_read/README.md b/roles/filetree_read/README.md index d22ffef74..356cd9691 100644 --- a/roles/filetree_read/README.md +++ b/roles/filetree_read/README.md @@ -14,10 +14,10 @@ The following Variables set the organization where should be applied the configu |Variable Name|Type|Default Value|Required|Description| |:---:|:---:|:---:|:---:|:---:| -|`orgs:`|String|Acme|yes|This variable sets the organization where should be applied the configuration.| -|`dir_orgs_vars:`|String|orgs_vars|yes|This variable sets the directory path where the variables will be store.| +|`orgs`|String|Acme|yes|This variable sets the organization where should be applied the configuration.| +|`dir_orgs_vars`|String|orgs_vars|yes|This variable sets the directory path where the variables will be store.| |`env:`|String|dev|yes|This variable sets the life-cycle environment to use.| -|`controller_location:`|String|''|no|This variable sets object localtion. It is useful when the configuration need to be replicated in an active/passive sites architecture| +|`controller_location`|String|''|no|This variable sets object localtion. It is useful when the configuration need to be replicated in an active/passive sites architecture| |`filetree_controller_settings`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_settings.d/|yes|Directory path to load controller object variables| |`filetree_controller_organizations`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_organizations.d/|yes|Directory path to load controller object variables| |`filetree_controller_labels`|String/List(String)|{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_labels.d/|yes|Directory path to load controller object variables| From 8d99ae3ce975a6a612fe558f6abc14101c270782 Mon Sep 17 00:00:00 2001 From: adonisgarciac Date: Tue, 24 Jan 2023 11:02:01 +0100 Subject: [PATCH 39/94] change controller_password for oauth_token in a query for inventory --- roles/object_diff/tasks/hosts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/object_diff/tasks/hosts.yml b/roles/object_diff/tasks/hosts.yml index 1962ab145..41863ba30 100644 --- a/roles/object_diff/tasks/hosts.yml +++ b/roles/object_diff/tasks/hosts.yml @@ -14,7 +14,7 @@ 'not__total_hosts': '0', 'not__kind': 'smart'}, host=controller_hostname, username=controller_username, - password=controller_password, verify_ssl=controller_validate_certs, + oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" From c75f3f5ad27a3353a26d2392720c02601748bb40 Mon Sep 17 00:00:00 2001 From: adonisgarciac Date: Tue, 24 Jan 2023 11:02:53 +0100 Subject: [PATCH 40/94] change controller_password for oauth_token in a query for inventory --- changelogs/fragments/object_diff_role_and_plugin.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/changelogs/fragments/object_diff_role_and_plugin.yml b/changelogs/fragments/object_diff_role_and_plugin.yml index 495ea3f7b..6320da4d7 100644 --- a/changelogs/fragments/object_diff_role_and_plugin.yml +++ b/changelogs/fragments/object_diff_role_and_plugin.yml @@ -3,4 +3,5 @@ minor_changes: - Renamed variable controller_workflow_job_templates to controller_workflows (the previos one was not used at all). - Add roles object to object_diff role and controller_object_diff lookup plugin. - "return_all: true has been added to return the maximum of max_objects=query_controller_api_max_objects objects." + - Fix one query with controller_password to change it and set oauth_token=controller_oauthtoken. ... From 9855ce131555d5a0f6c167ff70a63beddd74a5d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Aragon=C3=A9s=20Muniesa?= <26822043+ivarmu@users.noreply.github.com> Date: Thu, 26 Jan 2023 09:13:22 +0100 Subject: [PATCH 41/94] add no_log everywhere controller_api_plugin is used --- roles/filetree_create/tasks/all.yml | 1 + roles/filetree_create/tasks/applications.yml | 3 ++- roles/filetree_create/tasks/credential_types.yml | 2 ++ roles/filetree_create/tasks/credentials.yml | 1 + roles/filetree_create/tasks/execution_environments.yml | 1 + roles/filetree_create/tasks/instance_groups.yml | 1 + roles/filetree_create/tasks/inventory.yml | 4 ++++ roles/filetree_create/tasks/job_templates.yml | 2 ++ roles/filetree_create/tasks/labels.yml | 1 + roles/filetree_create/tasks/notification_templates.yml | 1 + roles/filetree_create/tasks/organizations.yml | 2 ++ roles/filetree_create/tasks/projects.yml | 2 ++ roles/filetree_create/tasks/settings.yml | 1 + roles/filetree_create/tasks/team_roles.yml | 1 + roles/filetree_create/tasks/teams.yml | 1 + roles/filetree_create/tasks/user_roles.yml | 1 + roles/filetree_create/tasks/users.yml | 8 +++++++- roles/filetree_create/tasks/workflow_job_templates.yml | 2 ++ roles/filetree_create/tests/filetree_create.yml | 2 +- roles/object_diff/tasks/credential_types.yml | 2 ++ roles/object_diff/tasks/credentials.yml | 2 ++ roles/object_diff/tasks/groups.yml | 3 +++ roles/object_diff/tasks/hosts.yml | 3 +++ roles/object_diff/tasks/inventories.yml | 2 ++ roles/object_diff/tasks/inventory_sources.yml | 2 ++ roles/object_diff/tasks/job_templates.yml | 2 ++ roles/object_diff/tasks/main.yml | 1 + roles/object_diff/tasks/organizations.yml | 3 +++ roles/object_diff/tasks/projects.yml | 2 ++ roles/object_diff/tasks/roles.yml | 2 ++ roles/object_diff/tasks/teams.yml | 3 +++ roles/object_diff/tasks/user_accounts.yml | 2 ++ roles/object_diff/tasks/workflow_job_templates.yml | 2 ++ 33 files changed, 65 insertions(+), 3 deletions(-) diff --git a/roles/filetree_create/tasks/all.yml b/roles/filetree_create/tasks/all.yml index 081e5200e..900038000 100644 --- a/roles/filetree_create/tasks/all.yml +++ b/roles/filetree_create/tasks/all.yml @@ -4,6 +4,7 @@ is_aap: "{{ lookup(controller_api_plugin, 'ping', host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs).version is version('4.0.0', '>=') }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - name: Include tasks (block) when: "['all', 'labels', 'applications', 'instance_groups', 'settings', 'inventory', 'credentials', 'credential_types', 'notification_templates', 'users', 'teams', 'organizations', 'projects', 'execution_environments', 'job_templates', 'workflow_job_templates', 'workflow_job_template_nodes'] | intersect(input_tag) | length > 0" diff --git a/roles/filetree_create/tasks/applications.yml b/roles/filetree_create/tasks/applications.yml index ce66bdbf0..477902b17 100644 --- a/roles/filetree_create/tasks/applications.yml +++ b/roles/filetree_create/tasks/applications.yml @@ -5,7 +5,8 @@ query_params={'order_by': 'organization,id'}, host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) - }}" + }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - name: "Create the /applications output directory for applications in {{ output_path }}" ansible.builtin.file: diff --git a/roles/filetree_create/tasks/credential_types.yml b/roles/filetree_create/tasks/credential_types.yml index f732c78fa..ac0291539 100644 --- a/roles/filetree_create/tasks/credential_types.yml +++ b/roles/filetree_create/tasks/credential_types.yml @@ -6,6 +6,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" when: is_aap - name: "Get current Credential Types from the API when Tower" @@ -15,6 +16,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" when: not is_aap - name: "Create the output directory for credential types: {{ output_path }}" diff --git a/roles/filetree_create/tasks/credentials.yml b/roles/filetree_create/tasks/credentials.yml index 5f1b7e0e8..3af85f91f 100644 --- a/roles/filetree_create/tasks/credentials.yml +++ b/roles/filetree_create/tasks/credentials.yml @@ -6,6 +6,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - name: "Create the /credentials output directory for credentials in {{ output_path }}" ansible.builtin.file: diff --git a/roles/filetree_create/tasks/execution_environments.yml b/roles/filetree_create/tasks/execution_environments.yml index 259a42d77..2fc737d3f 100644 --- a/roles/filetree_create/tasks/execution_environments.yml +++ b/roles/filetree_create/tasks/execution_environments.yml @@ -5,6 +5,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - name: "Create the output directory for execution environments: {{ output_path }}" ansible.builtin.file: diff --git a/roles/filetree_create/tasks/instance_groups.yml b/roles/filetree_create/tasks/instance_groups.yml index 6846941d9..41657a065 100644 --- a/roles/filetree_create/tasks/instance_groups.yml +++ b/roles/filetree_create/tasks/instance_groups.yml @@ -5,6 +5,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - name: "Create the output directory for instance groups: {{ output_path }}" ansible.builtin.file: diff --git a/roles/filetree_create/tasks/inventory.yml b/roles/filetree_create/tasks/inventory.yml index 3bf4a52a1..2c3e9ef64 100644 --- a/roles/filetree_create/tasks/inventory.yml +++ b/roles/filetree_create/tasks/inventory.yml @@ -6,6 +6,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - name: "Create the /inventories output directory for inventories in {{ output_path }}" ansible.builtin.file: @@ -50,6 +51,7 @@ loop_control: loop_var: current_inventory_sources label: "{{ inventory_sources_output_path }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - name: "Set the inventory's hosts" ansible.builtin.include_tasks: "hosts.yml" @@ -66,6 +68,7 @@ loop_control: loop_var: current_inventory_hosts label: "{{ hosts_output_path }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - name: "Set the inventory's groups" ansible.builtin.include_tasks: "groups.yml" @@ -82,4 +85,5 @@ loop_control: loop_var: current_inventory_groups label: "{{ groups_output_path }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" ... diff --git a/roles/filetree_create/tasks/job_templates.yml b/roles/filetree_create/tasks/job_templates.yml index a54e16e45..87617eaf1 100644 --- a/roles/filetree_create/tasks/job_templates.yml +++ b/roles/filetree_create/tasks/job_templates.yml @@ -6,6 +6,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - name: "Create the output directories for job templates in {{ output_path }}" ansible.builtin.file: @@ -47,4 +48,5 @@ loop_control: loop_var: current_job_templates_asset_value label: "{{ __dest }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" ... diff --git a/roles/filetree_create/tasks/labels.yml b/roles/filetree_create/tasks/labels.yml index 2cec4a266..f993c998f 100644 --- a/roles/filetree_create/tasks/labels.yml +++ b/roles/filetree_create/tasks/labels.yml @@ -6,6 +6,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - name: "Create the /labels output directory for labels in {{ output_path }}" ansible.builtin.file: diff --git a/roles/filetree_create/tasks/notification_templates.yml b/roles/filetree_create/tasks/notification_templates.yml index d42859d1d..d2517e90f 100644 --- a/roles/filetree_create/tasks/notification_templates.yml +++ b/roles/filetree_create/tasks/notification_templates.yml @@ -5,6 +5,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - name: "Create the /notification_templates output directory for notification templates in {{ output_path }}" ansible.builtin.file: diff --git a/roles/filetree_create/tasks/organizations.yml b/roles/filetree_create/tasks/organizations.yml index 1d889f1f8..ebbfed93c 100644 --- a/roles/filetree_create/tasks/organizations.yml +++ b/roles/filetree_create/tasks/organizations.yml @@ -6,6 +6,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - name: "Create the output directory for organizations: {{ output_path + '/' + current_organization_dir.name }}" ansible.builtin.file: @@ -42,4 +43,5 @@ loop_control: loop_var: current_organization label: "{{ __dest }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" ... diff --git a/roles/filetree_create/tasks/projects.yml b/roles/filetree_create/tasks/projects.yml index be873f744..0b96f126d 100644 --- a/roles/filetree_create/tasks/projects.yml +++ b/roles/filetree_create/tasks/projects.yml @@ -6,6 +6,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - name: "Create the /projects output directory for projects in {{ output_path }}" ansible.builtin.file: @@ -44,4 +45,5 @@ loop_control: loop_var: current_projects_asset_value label: "{{ __dest }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" ... diff --git a/roles/filetree_create/tasks/settings.yml b/roles/filetree_create/tasks/settings.yml index 88ae1d154..856a61c8c 100644 --- a/roles/filetree_create/tasks/settings.yml +++ b/roles/filetree_create/tasks/settings.yml @@ -5,6 +5,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - name: "Create the output directory for credential types: {{ output_path }}" ansible.builtin.file: diff --git a/roles/filetree_create/tasks/team_roles.yml b/roles/filetree_create/tasks/team_roles.yml index 9f497d1f5..1db22c86d 100644 --- a/roles/filetree_create/tasks/team_roles.yml +++ b/roles/filetree_create/tasks/team_roles.yml @@ -5,6 +5,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - name: "Create the output directory for team roles: {{ output_path }}" ansible.builtin.file: diff --git a/roles/filetree_create/tasks/teams.yml b/roles/filetree_create/tasks/teams.yml index 0cf0a745e..ea20e6ae3 100644 --- a/roles/filetree_create/tasks/teams.yml +++ b/roles/filetree_create/tasks/teams.yml @@ -6,6 +6,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - name: "Create the /teams output directory for teams in {{ output_path }}" ansible.builtin.file: diff --git a/roles/filetree_create/tasks/user_roles.yml b/roles/filetree_create/tasks/user_roles.yml index efdab949a..cd4335327 100644 --- a/roles/filetree_create/tasks/user_roles.yml +++ b/roles/filetree_create/tasks/user_roles.yml @@ -5,6 +5,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - name: "Create the output directory for user roles: {{ output_path }}" ansible.builtin.file: diff --git a/roles/filetree_create/tasks/users.yml b/roles/filetree_create/tasks/users.yml index 296d2715e..bd3a0b8bd 100644 --- a/roles/filetree_create/tasks/users.yml +++ b/roles/filetree_create/tasks/users.yml @@ -5,16 +5,22 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - name: "Add the users the Organizations information" ansible.builtin.set_fact: current_users: "{{ (current_users | default([])) + [user_lookvar_item | combine({'organizations': user_lookvar_item_organizations})] }}" vars: - user_lookvar_item_organizations: "{{ query(controller_api_plugin, user_lookvar_item.related.organizations, host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) | selectattr('name', 'defined') | map(attribute='name') }}" + user_lookvar_item_organizations: "{{ query(controller_api_plugin, user_lookvar_item.related.organizations, + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects + ) | selectattr('name', 'defined') | map(attribute='name') + }}" loop: "{{ users_lookvar }}" loop_control: loop_var: user_lookvar_item label: "User {{ user_lookvar_item.username }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - name: "Create the output directory for users in {{ output_path }}" ansible.builtin.file: diff --git a/roles/filetree_create/tasks/workflow_job_templates.yml b/roles/filetree_create/tasks/workflow_job_templates.yml index 095ac0cc4..0f4655130 100644 --- a/roles/filetree_create/tasks/workflow_job_templates.yml +++ b/roles/filetree_create/tasks/workflow_job_templates.yml @@ -6,6 +6,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - name: "Create the /workflow_job_templates output directory for workflow job templates in {{ output_path }}" ansible.builtin.file: @@ -50,4 +51,5 @@ loop_control: loop_var: current_workflow_job_templates_asset_value label: "{{ __dest }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" ... diff --git a/roles/filetree_create/tests/filetree_create.yml b/roles/filetree_create/tests/filetree_create.yml index f9afd9b2a..f8f0c42cd 100644 --- a/roles/filetree_create/tests/filetree_create.yml +++ b/roles/filetree_create/tests/filetree_create.yml @@ -26,7 +26,7 @@ ansible.builtin.set_fact: controller_oauthtoken: "{{ authtoken_res.json.token }}" controller_oauthtoken_url: "{{ authtoken_res.json.url }}" - no_log: "{{ controller_configuration_filetree_create_secure_logging | default('false') }}" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" when: controller_oauthtoken is not defined tags: - always diff --git a/roles/object_diff/tasks/credential_types.yml b/roles/object_diff/tasks/credential_types.yml index dbb5417fd..237ad0779 100644 --- a/roles/object_diff/tasks/credential_types.yml +++ b/roles/object_diff/tasks/credential_types.yml @@ -7,6 +7,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" when: is_aap - name: "Get the API list of all Credential Types" @@ -16,6 +17,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" when: not is_aap - name: "Find the difference of Credential Types between what is on the Controller versus CasC on SCM" diff --git a/roles/object_diff/tasks/credentials.yml b/roles/object_diff/tasks/credentials.yml index 1465af525..b4263d14f 100644 --- a/roles/object_diff/tasks/credentials.yml +++ b/roles/object_diff/tasks/credentials.yml @@ -6,6 +6,7 @@ query_params={'name': orgs}, host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Get the API list of all Credentials in Organization {{ orgs }}" ansible.builtin.set_fact: @@ -14,6 +15,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Find the difference of Credentials between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: diff --git a/roles/object_diff/tasks/groups.yml b/roles/object_diff/tasks/groups.yml index b7cfd4ff9..cd8c71127 100644 --- a/roles/object_diff/tasks/groups.yml +++ b/roles/object_diff/tasks/groups.yml @@ -5,6 +5,7 @@ query_params={'name': orgs}, host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Get the API list of all inventories" ansible.builtin.set_fact: @@ -16,6 +17,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Get the API list of all groups in the inventories at organization {{ orgs }}" ansible.builtin.set_fact: @@ -27,6 +29,7 @@ loop: "{{ __controller_api_inventories }}" loop_control: loop_var: current_inventory + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Group differences (block)" when: __controller_api_groups is defined diff --git a/roles/object_diff/tasks/hosts.yml b/roles/object_diff/tasks/hosts.yml index 1962ab145..303ad6950 100644 --- a/roles/object_diff/tasks/hosts.yml +++ b/roles/object_diff/tasks/hosts.yml @@ -5,6 +5,7 @@ query_params={'name': orgs}, host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Get the API list of all inventories" ansible.builtin.set_fact: @@ -17,6 +18,7 @@ password=controller_password, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Get the API list of all hosts in the inventories at organization {{ orgs }}" ansible.builtin.set_fact: @@ -25,6 +27,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" loop: "{{ __controller_api_inventories }}" loop_control: loop_var: current_inventory diff --git a/roles/object_diff/tasks/inventories.yml b/roles/object_diff/tasks/inventories.yml index d9b74c550..65e2930a9 100644 --- a/roles/object_diff/tasks/inventories.yml +++ b/roles/object_diff/tasks/inventories.yml @@ -5,6 +5,7 @@ query_params={'name': orgs}, host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Get the API list of all Inventories" ansible.builtin.set_fact: @@ -13,6 +14,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Find the difference of Inventories between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: diff --git a/roles/object_diff/tasks/inventory_sources.yml b/roles/object_diff/tasks/inventory_sources.yml index caddc6c33..6da6f9179 100644 --- a/roles/object_diff/tasks/inventory_sources.yml +++ b/roles/object_diff/tasks/inventory_sources.yml @@ -5,6 +5,7 @@ query_params={'name': orgs}, host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Get the API list of all Inventory Sources" ansible.builtin.set_fact: @@ -13,6 +14,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Find the difference of Inventory Sources between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: diff --git a/roles/object_diff/tasks/job_templates.yml b/roles/object_diff/tasks/job_templates.yml index cf9b5f677..ce4d1a8eb 100644 --- a/roles/object_diff/tasks/job_templates.yml +++ b/roles/object_diff/tasks/job_templates.yml @@ -5,6 +5,7 @@ query_params={'name': orgs}, host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Get the API list of all Job Templates in Organization {{ orgs }}" ansible.builtin.set_fact: @@ -13,6 +14,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Find the difference of Job Templates between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: diff --git a/roles/object_diff/tasks/main.yml b/roles/object_diff/tasks/main.yml index 3ad3a5014..34bec9423 100644 --- a/roles/object_diff/tasks/main.yml +++ b/roles/object_diff/tasks/main.yml @@ -32,6 +32,7 @@ is_aap: "{{ lookup(controller_api_plugin, 'ping', host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs).version is version('4.0.0', '>=') }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" tags: - always diff --git a/roles/object_diff/tasks/organizations.yml b/roles/object_diff/tasks/organizations.yml index 87f6a9b06..79482b6c5 100644 --- a/roles/object_diff/tasks/organizations.yml +++ b/roles/object_diff/tasks/organizations.yml @@ -5,6 +5,7 @@ query_params={'username': controller_username}, host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Role differences (block)" when: @@ -16,6 +17,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Find the difference of Organizations between what is on the Controller versus curated list." ansible.builtin.set_fact: @@ -30,6 +32,7 @@ loop: "{{ __organizations_difference }}" loop_control: loop_var: __organizations_difference_list_empty_item + no_log: "{{ controller_configuration_object_diff_secure_logging }}" when: - protect_not_empty_orgs is defined - protect_not_empty_orgs diff --git a/roles/object_diff/tasks/projects.yml b/roles/object_diff/tasks/projects.yml index 9b0db27bf..6ea7b93cf 100644 --- a/roles/object_diff/tasks/projects.yml +++ b/roles/object_diff/tasks/projects.yml @@ -5,6 +5,7 @@ query_params={'name': orgs}, host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Get the API list of all Projects in Organization {{ orgs }}" ansible.builtin.set_fact: @@ -13,6 +14,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Find the difference of Project between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: diff --git a/roles/object_diff/tasks/roles.yml b/roles/object_diff/tasks/roles.yml index c97f470cf..8c10126ba 100644 --- a/roles/object_diff/tasks/roles.yml +++ b/roles/object_diff/tasks/roles.yml @@ -5,6 +5,7 @@ query_params={'username': controller_username}, host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Role differences (block)" when: @@ -38,6 +39,7 @@ }}" loop_control: loop_var: current_role + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Explode the roles for users" ansible.builtin.set_fact: diff --git a/roles/object_diff/tasks/teams.yml b/roles/object_diff/tasks/teams.yml index fad5994c7..12ef352fb 100644 --- a/roles/object_diff/tasks/teams.yml +++ b/roles/object_diff/tasks/teams.yml @@ -5,6 +5,7 @@ query_params={'username': controller_username}, host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Team differences (block)" when: @@ -16,6 +17,7 @@ query_params={'name': orgs}, host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Get the API list of all teams in Organization {{ orgs }}" ansible.builtin.set_fact: @@ -24,6 +26,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Find the difference of Teams between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: diff --git a/roles/object_diff/tasks/user_accounts.yml b/roles/object_diff/tasks/user_accounts.yml index ee08740b7..2b8d7ac03 100644 --- a/roles/object_diff/tasks/user_accounts.yml +++ b/roles/object_diff/tasks/user_accounts.yml @@ -6,6 +6,7 @@ query_params={'username': controller_username}, host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Get all users from the API" ansible.builtin.set_fact: @@ -13,6 +14,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Populate user accounts (block)" when: not drop_user_external_accounts diff --git a/roles/object_diff/tasks/workflow_job_templates.yml b/roles/object_diff/tasks/workflow_job_templates.yml index 9867cb506..f26795e2c 100644 --- a/roles/object_diff/tasks/workflow_job_templates.yml +++ b/roles/object_diff/tasks/workflow_job_templates.yml @@ -5,6 +5,7 @@ query_params={'name': orgs}, host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Get the API list of all Workflow Job Templates" ansible.builtin.set_fact: @@ -13,6 +14,7 @@ host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, return_all=true, max_objects=query_controller_api_max_objects) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Find the difference of Workflow Job Templates between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: From 725b95ff9172de615beba083adc8c2173b22fadb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Aragon=C3=A9s=20Muniesa?= <26822043+ivarmu@users.noreply.github.com> Date: Thu, 26 Jan 2023 11:44:09 +0100 Subject: [PATCH 42/94] added changelog fragment --- changelogs/fragments/filetree_create.yml | 1 + changelogs/fragments/object_diff.yml | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 changelogs/fragments/object_diff.yml diff --git a/changelogs/fragments/filetree_create.yml b/changelogs/fragments/filetree_create.yml index e91d29e26..01e8d2aaa 100644 --- a/changelogs/fragments/filetree_create.yml +++ b/changelogs/fragments/filetree_create.yml @@ -3,4 +3,5 @@ minor_changes: - Renamed variable controller_workflow_job_templates to controller_workflows (the previos one was not used at all). - Improve template to export settings with filetree_create role. Settings will be in yaml format. - Add or fix some variables or extra_vars exported from objects like notifications, inventory, inventory_source, hosts, groups, jt or wjt. + - Add no_log everywhere controller_api_plugin is used to avoid to expose sensitive information in case of crashes. ... diff --git a/changelogs/fragments/object_diff.yml b/changelogs/fragments/object_diff.yml new file mode 100644 index 000000000..d0e9d6908 --- /dev/null +++ b/changelogs/fragments/object_diff.yml @@ -0,0 +1,4 @@ +--- +minor_changes: + - Add no_log everywhere controller_api_plugin is used to avoid to expose sensitive information in case of crashes. +... From 9bb0e22722f4025d64894d74621f0f5005fa4bb5 Mon Sep 17 00:00:00 2001 From: silvinux Date: Thu, 26 Jan 2023 16:37:42 +0100 Subject: [PATCH 43/94] Added task to simplify the assignment of galaxy/ee to org in the dispatch --- .../dispatch_creds_ee_orgs_creation.yml | 7 +++++++ roles/dispatch/tasks/main.yml | 14 +++++++++++++- .../tests/config-controller-filetree.yml | 17 ++--------------- 3 files changed, 22 insertions(+), 16 deletions(-) create mode 100644 changelogs/fragments/dispatch_creds_ee_orgs_creation.yml diff --git a/changelogs/fragments/dispatch_creds_ee_orgs_creation.yml b/changelogs/fragments/dispatch_creds_ee_orgs_creation.yml new file mode 100644 index 000000000..9db29d6fa --- /dev/null +++ b/changelogs/fragments/dispatch_creds_ee_orgs_creation.yml @@ -0,0 +1,7 @@ +--- +minor_changes: + - Set the following variables to false when run all roles at dispatch role: + - assign_galaxy_credentials_to_org: false + - assign_default_ee_to_org: false + - Add task to add Galaxy credentials and Execution Environments to Organization +... diff --git a/roles/dispatch/tasks/main.yml b/roles/dispatch/tasks/main.yml index da519e77e..6b14b0a4b 100644 --- a/roles/dispatch/tasks/main.yml +++ b/roles/dispatch/tasks/main.yml @@ -1,5 +1,4 @@ --- - - name: "Run redhat_cop.controller_configuration.{{ __role.role }}" ansible.builtin.include_role: name: "{{ __role.role }}" @@ -10,4 +9,17 @@ loop: "{{ controller_configuration_dispatcher_roles }}" loop_control: loop_var: __role + vars: + assign_galaxy_credentials_to_org: false + assign_default_ee_to_org: false + +- name: Include Tasks to add Galaxy credentials and Execution Environments to Organizations + ansible.builtin.include_role: + name: redhat_cop.controller_configuration.dispatch + apply: + tags: + - organizations + vars: + controller_configuration_dispatcher_roles: + - {role: organizations, var: controller_organizations, tags: organizations} ... diff --git a/roles/filetree_read/tests/config-controller-filetree.yml b/roles/filetree_read/tests/config-controller-filetree.yml index c87de6604..96ef7bcb8 100644 --- a/roles/filetree_read/tests/config-controller-filetree.yml +++ b/roles/filetree_read/tests/config-controller-filetree.yml @@ -32,23 +32,10 @@ tags: - always roles: - - {role: redhat_cop.controller_configuration.filetree_read, assign_galaxy_credentials_to_org: false} - - {role: redhat_cop.controller_configuration.dispatch, assign_galaxy_credentials_to_org: false} + - redhat_cop.controller_configuration.filetree_read + - redhat_cop.controller_configuration.dispatch post_tasks: - - block: - - name: Include Tasks to add Galaxy credentials to Organizations - ansible.builtin.include_role: - name: redhat_cop.controller_configuration.dispatch - apply: - tags: - - organizations - vars: - controller_configuration_dispatcher_roles: - - {role: organizations, var: controller_organizations, tags: organizations} - tags: - - organizations - - name: "Delete the Authentication Token used" ansible.builtin.uri: url: "https://{{ controller_hostname }}{{ controller_oauthtoken_url }}" From 4a9d96e844149e7272d8d22bbb7df1e624b6fb41 Mon Sep 17 00:00:00 2001 From: silvinux Date: Thu, 26 Jan 2023 17:17:57 +0100 Subject: [PATCH 44/94] Fix changelogs --- changelogs/fragments/dispatch_creds_ee_orgs_creation.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/changelogs/fragments/dispatch_creds_ee_orgs_creation.yml b/changelogs/fragments/dispatch_creds_ee_orgs_creation.yml index 9db29d6fa..a502a3488 100644 --- a/changelogs/fragments/dispatch_creds_ee_orgs_creation.yml +++ b/changelogs/fragments/dispatch_creds_ee_orgs_creation.yml @@ -1,7 +1,6 @@ --- minor_changes: - - Set the following variables to false when run all roles at dispatch role: - - assign_galaxy_credentials_to_org: false - - assign_default_ee_to_org: false - - Add task to add Galaxy credentials and Execution Environments to Organization + - Set the variables to assign_galaxy_credentials_to_org and assign_default_ee_to_org to false in the task to run all roles at dispatch role. + - Add task to add Galaxy credentials and Execution Environments to Organization. + - Adapt filetree_read role tests playbook config-controller-filetree.yml. ... From cac0ed3bf74e95847ea9910997969008731199b4 Mon Sep 17 00:00:00 2001 From: silvinux Date: Thu, 26 Jan 2023 17:39:05 +0100 Subject: [PATCH 45/94] Fix role import task --- roles/dispatch/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/dispatch/tasks/main.yml b/roles/dispatch/tasks/main.yml index 6b14b0a4b..5722401ff 100644 --- a/roles/dispatch/tasks/main.yml +++ b/roles/dispatch/tasks/main.yml @@ -15,7 +15,7 @@ - name: Include Tasks to add Galaxy credentials and Execution Environments to Organizations ansible.builtin.include_role: - name: redhat_cop.controller_configuration.dispatch + name: dispatch apply: tags: - organizations From 93c31cf8ae5c5fab256fa49403fdc093ea0c8328 Mon Sep 17 00:00:00 2001 From: silvinux Date: Thu, 26 Jan 2023 18:15:56 +0100 Subject: [PATCH 46/94] Fix role import task --- roles/dispatch/tasks/main.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/roles/dispatch/tasks/main.yml b/roles/dispatch/tasks/main.yml index 5722401ff..e3ec23410 100644 --- a/roles/dispatch/tasks/main.yml +++ b/roles/dispatch/tasks/main.yml @@ -15,11 +15,8 @@ - name: Include Tasks to add Galaxy credentials and Execution Environments to Organizations ansible.builtin.include_role: - name: dispatch + name: organizations apply: tags: - organizations - vars: - controller_configuration_dispatcher_roles: - - {role: organizations, var: controller_organizations, tags: organizations} ... From 1a6e93990c2d4177de2d30410693d61451757b40 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 26 Jan 2023 20:28:49 -0500 Subject: [PATCH 47/94] Update changelog refs/tags/2.2.5 (#480) Co-authored-by: sean-m-sullivan --- CHANGELOG.rst | 24 +++++++++++++ changelogs/.plugin-cache.yaml | 4 ++- changelogs/changelog.yaml | 35 +++++++++++++++++++ changelogs/fragments/filetree_create.yml | 7 ---- changelogs/fragments/instance_group.yml | 4 --- changelogs/fragments/object_diff.yml | 4 --- .../fragments/object_diff_role_and_plugin.yml | 7 ---- changelogs/fragments/project_updates.yml | 4 --- changelogs/fragments/typos.yml | 4 --- .../workflow_job_template_state_and_nodes.yml | 4 --- 10 files changed, 62 insertions(+), 35 deletions(-) delete mode 100644 changelogs/fragments/filetree_create.yml delete mode 100644 changelogs/fragments/instance_group.yml delete mode 100644 changelogs/fragments/object_diff.yml delete mode 100644 changelogs/fragments/object_diff_role_and_plugin.yml delete mode 100644 changelogs/fragments/project_updates.yml delete mode 100644 changelogs/fragments/typos.yml delete mode 100644 changelogs/fragments/workflow_job_template_state_and_nodes.yml diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7ded1513f..de79e5cc0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,30 @@ redhat_cop.controller_configuration Release Notes .. contents:: Topics +v2.2.5 +====== + +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 information in case of crashes. +- Add no_log everywhere controller_api_plugin is used to avoid to expose sensitive information in case of crashes. +- Add or fix some variables or extra_vars exported from objects like notifications, inventory, inventory_source, hosts, groups, jt or wjt. +- Add roles object to object_diff role and controller_object_diff lookup plugin. +- Fix one query with controller_password to change it and set oauth_token=controller_oauthtoken. +- Fixed typos in README.md. +- Improve template to export settings with filetree_create role. Settings will be in yaml format. +- Renamed the field `update` to `update_project` to avoid colliding with the Python dict update method +- Renamed variable controller_workflow_job_templates to controller_workflows (the previos one was not used at all). +- Renamed variable controller_workflow_job_templates to controller_workflows (the previos one was not used at all). +- return_all: true has been added to return the maximum of max_objects=query_controller_api_max_objects objects. + +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). + v2.2.4 ====== diff --git a/changelogs/.plugin-cache.yaml b/changelogs/.plugin-cache.yaml index 97d430d7e..991ebd90d 100644 --- a/changelogs/.plugin-cache.yaml +++ b/changelogs/.plugin-cache.yaml @@ -6,6 +6,7 @@ plugins: callback: {} cliconf: {} connection: {} + filter: {} httpapi: {} inventory: {} lookup: @@ -17,5 +18,6 @@ plugins: netconf: {} shell: {} strategy: {} + test: {} vars: {} -version: 2.2.4 +version: 2.2.5 diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 70dc24cfc..e72f3d6b5 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -346,3 +346,38 @@ releases: - remove_examples.yml - removed_ update_on_project_update.yml release_date: '2022-11-30' + 2.2.5: + 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). + 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 + information in case of crashes. + - Add no_log everywhere controller_api_plugin is used to avoid to expose sensitive + information in case of crashes. + - Add or fix some variables or extra_vars exported from objects like notifications, + inventory, inventory_source, hosts, groups, jt or wjt. + - Add roles object to object_diff role and controller_object_diff lookup plugin. + - Fix one query with controller_password to change it and set oauth_token=controller_oauthtoken. + - Fixed typos in README.md. + - Improve template to export settings with filetree_create role. Settings will + be in yaml format. + - Renamed the field `update` to `update_project` to avoid colliding with the + Python dict update method + - Renamed variable controller_workflow_job_templates to controller_workflows + (the previos one was not used at all). + - Renamed variable controller_workflow_job_templates to controller_workflows + (the previos one was not used at all). + - 'return_all: true has been added to return the maximum of max_objects=query_controller_api_max_objects + objects.' + fragments: + - filetree_create.yml + - instance_group.yml + - object_diff.yml + - object_diff_role_and_plugin.yml + - project_updates.yml + - typos.yml + - workflow_job_template_state_and_nodes.yml + release_date: '2023-01-26' diff --git a/changelogs/fragments/filetree_create.yml b/changelogs/fragments/filetree_create.yml deleted file mode 100644 index 01e8d2aaa..000000000 --- a/changelogs/fragments/filetree_create.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -minor_changes: - - Renamed variable controller_workflow_job_templates to controller_workflows (the previos one was not used at all). - - Improve template to export settings with filetree_create role. Settings will be in yaml format. - - Add or fix some variables or extra_vars exported from objects like notifications, inventory, inventory_source, hosts, groups, jt or wjt. - - Add no_log everywhere controller_api_plugin is used to avoid to expose sensitive information in case of crashes. -... diff --git a/changelogs/fragments/instance_group.yml b/changelogs/fragments/instance_group.yml deleted file mode 100644 index 641412479..000000000 --- a/changelogs/fragments/instance_group.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -minor_changes: - - Add max_forks, max_concurrent_jobs as options to instance_groups role -... diff --git a/changelogs/fragments/object_diff.yml b/changelogs/fragments/object_diff.yml deleted file mode 100644 index d0e9d6908..000000000 --- a/changelogs/fragments/object_diff.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -minor_changes: - - Add no_log everywhere controller_api_plugin is used to avoid to expose sensitive information in case of crashes. -... diff --git a/changelogs/fragments/object_diff_role_and_plugin.yml b/changelogs/fragments/object_diff_role_and_plugin.yml deleted file mode 100644 index 6320da4d7..000000000 --- a/changelogs/fragments/object_diff_role_and_plugin.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -minor_changes: - - Renamed variable controller_workflow_job_templates to controller_workflows (the previos one was not used at all). - - Add roles object to object_diff role and controller_object_diff lookup plugin. - - "return_all: true has been added to return the maximum of max_objects=query_controller_api_max_objects objects." - - Fix one query with controller_password to change it and set oauth_token=controller_oauthtoken. -... diff --git a/changelogs/fragments/project_updates.yml b/changelogs/fragments/project_updates.yml deleted file mode 100644 index 99783dea4..000000000 --- a/changelogs/fragments/project_updates.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -minor_changes: - - Renamed the field `update` to `update_project` to avoid colliding with the Python dict update method -... diff --git a/changelogs/fragments/typos.yml b/changelogs/fragments/typos.yml deleted file mode 100644 index 4f5628189..000000000 --- a/changelogs/fragments/typos.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -minor_changes: - - Fixed typos in README.md. -... diff --git a/changelogs/fragments/workflow_job_template_state_and_nodes.yml b/changelogs/fragments/workflow_job_template_state_and_nodes.yml deleted file mode 100644 index f8603eabe..000000000 --- a/changelogs/fragments/workflow_job_template_state_and_nodes.yml +++ /dev/null @@ -1,4 +0,0 @@ -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). From d740007cc0cb9a2f8f251d3b4e3526ff2d13549f Mon Sep 17 00:00:00 2001 From: David Danielsson Date: Mon, 30 Jan 2023 12:24:44 -0600 Subject: [PATCH 48/94] fixing schedules readme --- changelogs/fragments/fixing_readme.yaml | 2 ++ roles/schedules/README.md | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/fixing_readme.yaml diff --git a/changelogs/fragments/fixing_readme.yaml b/changelogs/fragments/fixing_readme.yaml new file mode 100644 index 000000000..6e25e317d --- /dev/null +++ b/changelogs/fragments/fixing_readme.yaml @@ -0,0 +1,2 @@ +minor_changes: + fixed an extra blank line in schedules readme that was breaking the table \ No newline at end of file diff --git a/roles/schedules/README.md b/roles/schedules/README.md index d4ccf734d..ff6da5bdd 100644 --- a/roles/schedules/README.md +++ b/roles/schedules/README.md @@ -72,7 +72,6 @@ This also speeds up the overall role. |`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| |`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| - |`job_type`|Job template default|no|str|The job type used for the job template.| |`job_tags`|""|no|str|Comma separated list of tags to apply to the job| |`skip_tags`|""|no|str|Comma separated list of tags to skip for the job| From bb991295614eed83dece6a9b4050cff80e59c86c Mon Sep 17 00:00:00 2001 From: David Danielsson Date: Mon, 30 Jan 2023 12:27:24 -0600 Subject: [PATCH 49/94] lint --- changelogs/fragments/fixing_readme.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/fragments/fixing_readme.yaml b/changelogs/fragments/fixing_readme.yaml index 6e25e317d..e0b5645f1 100644 --- a/changelogs/fragments/fixing_readme.yaml +++ b/changelogs/fragments/fixing_readme.yaml @@ -1,2 +1,2 @@ minor_changes: - fixed an extra blank line in schedules readme that was breaking the table \ No newline at end of file + fixed an extra blank line in schedules readme that was breaking the table From 7bf88675e40922c757dc2c89cecb7d0e3e2ee2ce Mon Sep 17 00:00:00 2001 From: David Danielsson Date: Mon, 30 Jan 2023 12:33:34 -0600 Subject: [PATCH 50/94] forgot to make it a list --- changelogs/fragments/fixing_readme.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/fragments/fixing_readme.yaml b/changelogs/fragments/fixing_readme.yaml index e0b5645f1..40838503d 100644 --- a/changelogs/fragments/fixing_readme.yaml +++ b/changelogs/fragments/fixing_readme.yaml @@ -1,2 +1,2 @@ minor_changes: - fixed an extra blank line in schedules readme that was breaking the table + - fixed an extra blank line in schedules readme that was breaking the table From 580a9fc4bad2326e7bf7257b22051439db9ea957 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 09:54:28 -0500 Subject: [PATCH 51/94] Update pre-commit (#485) Co-authored-by: sean-m-sullivan --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e9876aa40..40df28278 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,7 +34,7 @@ repos: hooks: - id: markdownlint-cli2 - repo: https://github.com/ambv/black - rev: 22.12.0 + rev: 23.1.0 hooks: - id: black name: black From d5fcdb6f76d5f0799e524edd7225b14bae99278b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 2 Feb 2023 10:29:04 -0500 Subject: [PATCH 52/94] Update pre-commit (#486) Co-authored-by: sean-m-sullivan --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 40df28278..df394c0e4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: # types: # - yaml - repo: 'https://github.com/ansible-community/ansible-lint.git' - rev: v6.11.0 + rev: v6.12.0 hooks: # see discussions here about what arguments are used, and behavior # https://github.com/ansible/ansible-lint/issues/649 From f92e61f5f10f4f635321c8b6105a854738e171f6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 5 Feb 2023 10:05:45 -0500 Subject: [PATCH 53/94] Update pre-commit (#488) Co-authored-by: sean-m-sullivan --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index df394c0e4..26de7ccd7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: # types: # - yaml - repo: 'https://github.com/ansible-community/ansible-lint.git' - rev: v6.12.0 + rev: v6.12.1 hooks: # see discussions here about what arguments are used, and behavior # https://github.com/ansible/ansible-lint/issues/649 From bf4d38c965233df579a23841ddeccff616d17168 Mon Sep 17 00:00:00 2001 From: adonisgarciac <71078987+adonisgarciac@users.noreply.github.com> Date: Tue, 7 Feb 2023 11:25:20 +0100 Subject: [PATCH 54/94] add new object types to object_diff role (#481) * add new object types to object_diff role * lint controller_object_diff.py * add fragment for changelog * yaml lint * lint controller_object_diff.py --- .../fragments/object_diff_role_and_plugin.yml | 4 ++ plugins/lookup/controller_object_diff.py | 31 +++++++++--- roles/object_diff/defaults/main.yml | 5 ++ roles/object_diff/tasks/applications.yml | 27 +++++++++++ .../tasks/execution_environments.yml | 27 +++++++++++ roles/object_diff/tasks/instance_groups.yml | 32 +++++++++++++ .../tasks/notification_templates.yml | 27 +++++++++++ roles/object_diff/tasks/schedules.yml | 48 +++++++++++++++++++ 8 files changed, 195 insertions(+), 6 deletions(-) create mode 100644 changelogs/fragments/object_diff_role_and_plugin.yml create mode 100644 roles/object_diff/tasks/applications.yml create mode 100644 roles/object_diff/tasks/execution_environments.yml create mode 100644 roles/object_diff/tasks/instance_groups.yml create mode 100644 roles/object_diff/tasks/notification_templates.yml create mode 100644 roles/object_diff/tasks/schedules.yml diff --git a/changelogs/fragments/object_diff_role_and_plugin.yml b/changelogs/fragments/object_diff_role_and_plugin.yml new file mode 100644 index 000000000..4fbd39c17 --- /dev/null +++ b/changelogs/fragments/object_diff_role_and_plugin.yml @@ -0,0 +1,4 @@ +--- +minor_changes: + - "Add new type of objects for object_diff role: applications, execution environments, instance groups, notifications and schedules" +... diff --git a/plugins/lookup/controller_object_diff.py b/plugins/lookup/controller_object_diff.py index 67e9c6512..1ccbf4b41 100644 --- a/plugins/lookup/controller_object_diff.py +++ b/plugins/lookup/controller_object_diff.py @@ -120,7 +120,7 @@ def run(self, terms, variables=None, **kwargs): return [api_list] # Set Keys to keep for each list. Depending on type - if api_list[0]["type"] == "organization" or api_list[0]["type"] == "credential_type": + if api_list[0]["type"] == "organization" or api_list[0]["type"] == "credential_type" or api_list[0]["type"] == "instance_group": keys_to_keep = ["name"] api_keys_to_keep = ["name"] elif api_list[0]["type"] == "user": @@ -132,6 +132,12 @@ def run(self, terms, variables=None, **kwargs): elif api_list[0]["type"] == "group" or api_list[0]["type"] == "host": keys_to_keep = ["name", "inventory"] api_keys_to_keep = ["name", "summary_fields"] + elif api_list[0]["type"] == "schedule": + keys_to_keep = ["name", "unified_job_template"] + api_keys_to_keep = ["name", "summary_fields"] + elif api_list[0]["type"] == "execution_environment": + keys_to_keep = ["name", "organization", "image"] + api_keys_to_keep = ["name", "summary_fields", "image"] elif api_list[0]["type"] == "role": pass else: @@ -158,12 +164,15 @@ def run(self, terms, variables=None, **kwargs): self.handle_error(msg="Key: '{0}' missing from item in api_list. Does this object come from the api? item: {1}".format(key, item)) # Reduce list to name and organization - if api_list[0]["type"] != "role": - compare_list_reduced = [{key: item[key] for key in keys_to_keep} for item in compare_list] - api_list_reduced = [{key: item[key] for key in api_keys_to_keep} for item in api_list] - else: + if api_list[0]["type"] == "role": compare_list_reduced = copy.deepcopy(compare_list) api_list_reduced = copy.deepcopy(api_list) + elif api_list[0]["type"] == "instance_group": + compare_list_reduced = [{key: item[key] for key in keys_to_keep} for item in compare_list] + api_list_reduced = [{key: item[key] for key in api_keys_to_keep} for item in api_list if item["summary_fields"]["user_capabilities"]["delete"]] + else: + compare_list_reduced = [{key: item[key] for key in keys_to_keep} for item in compare_list] + api_list_reduced = [{key: item[key] for key in api_keys_to_keep} for item in api_list] # Convert summary field name into org name Only if not type organization if api_list[0]["type"] == "group" or api_list[0]["type"] == "host": @@ -185,6 +194,10 @@ def run(self, terms, variables=None, **kwargs): item.update({"unified_job_template": item["summary_fields"]["unified_job_template"]["name"]}) item.update({"workflow_job_template": item["summary_fields"]["workflow_job_template"]["name"]}) item.pop("summary_fields") + elif api_list[0]["type"] == "schedule": + for item in api_list_reduced: + item.update({"unified_job_template": item["summary_fields"]["unified_job_template"]["name"]}) + item.pop("summary_fields") elif api_list[0]["type"] == "role": for item in api_list_reduced: if item["resource_type"] == "organization": @@ -243,7 +256,13 @@ def run(self, terms, variables=None, **kwargs): for item in list_to_remove: compare_list_reduced.remove(item) compare_list_reduced.extend(list_to_extend) - elif api_list[0]["type"] != "organization" and api_list[0]["type"] != "user" and api_list[0]["type"] != "credential_type": + elif ( + api_list[0]["type"] != "organization" + and api_list[0]["type"] != "user" + and api_list[0]["type"] != "credential_type" + and api_list[0]["type"] != "schedule" + and api_list[0]["type"] != "instance_group" + ): for item in api_list_reduced: item.update({"organization": item["summary_fields"]["organization"]["name"]}) item.pop("summary_fields") diff --git a/roles/object_diff/defaults/main.yml b/roles/object_diff/defaults/main.yml index 9e5176239..bc7e6e5ee 100644 --- a/roles/object_diff/defaults/main.yml +++ b/roles/object_diff/defaults/main.yml @@ -30,6 +30,7 @@ controller_roles: [] # object_diff tasks name controller_configuration_object_diff_tasks: + - {name: schedules, var: controller_schedules, tags: schedules} - {name: workflow_job_templates, var: controller_workflows, tags: workflow_job_templates} - {name: job_templates, var: controller_templates, tags: job_templates} - {name: roles, var: controller_roles, tags: roles} @@ -37,9 +38,13 @@ controller_configuration_object_diff_tasks: - {name: user_accounts, var: controller_user_accounts, tags: users} - {name: groups, var: controller_groups, tags: groups} - {name: hosts, var: controller_hosts, tags: hosts} + - {name: instance_groups, var: controller_instance_groups, tags: instance_groups} + - {name: applications, var: controller_applications, tags: applications} + - {name: execution_environments, var: controller_execution_environments, tags: execution_environments} - {name: inventory_sources, var: controller_inventory_sources, tags: inventory_sources} - {name: inventories, var: controller_inventories, tags: inventories} - {name: projects, var: controller_projects, tags: projects} + - {name: notification_templates, var: controller_notification_templates, tags: notification_templates} - {name: credentials, var: controller_credentials, tags: credentials} - {name: credential_types, var: controller_credential_types, tags: credential_types} - {name: organizations, var: controller_organizations, tags: organizations} diff --git a/roles/object_diff/tasks/applications.yml b/roles/object_diff/tasks/applications.yml new file mode 100644 index 000000000..5eaee8b33 --- /dev/null +++ b/roles/object_diff/tasks/applications.yml @@ -0,0 +1,27 @@ +--- +- name: Get the organization ID + ansible.builtin.set_fact: + __controller_organization_id: "{{ lookup(controller_api_plugin, 'organizations', + query_params={'name': orgs}, + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) + }}" + +- name: "Get the API list of all Applications in Organization {{ orgs }}" + ansible.builtin.set_fact: + __controller_api_applications: "{{ query(controller_api_plugin, 'applications', + query_params={'organization': __controller_organization_id.id}, + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) + }}" + +- name: "Find the difference of Application between what is on the Controller versus CasC on SCM" + ansible.builtin.set_fact: + __applications_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + api_list=__controller_api_applications, compare_list=controller_applications, + with_present=false, set_absent=true) + }}" + +- name: "Set application's list to be configured" + ansible.builtin.set_fact: + controller_applications: "{{ __applications_difference }}" +... diff --git a/roles/object_diff/tasks/execution_environments.yml b/roles/object_diff/tasks/execution_environments.yml new file mode 100644 index 000000000..612073bcf --- /dev/null +++ b/roles/object_diff/tasks/execution_environments.yml @@ -0,0 +1,27 @@ +--- +- name: Get the organization ID + ansible.builtin.set_fact: + __controller_organization_id: "{{ lookup(controller_api_plugin, 'organizations', + query_params={'name': orgs}, + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) + }}" + +- name: "Get the API list of all Execution Environments in Organization {{ orgs }}" + ansible.builtin.set_fact: + __controller_api_execution_environments: "{{ query(controller_api_plugin, 'execution_environments', + query_params={'organization': __controller_organization_id.id}, + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) + }}" + +- name: "Find the difference of Execution Environment between what is on the Controller versus CasC on SCM" + ansible.builtin.set_fact: + __execution_environments_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + api_list=__controller_api_execution_environments, compare_list=controller_execution_environments, + with_present=false, set_absent=true) + }}" + +- name: "Set execution_environment's list to be configured" + ansible.builtin.set_fact: + controller_execution_environments: "{{ __execution_environments_difference }}" +... diff --git a/roles/object_diff/tasks/instance_groups.yml b/roles/object_diff/tasks/instance_groups.yml new file mode 100644 index 000000000..50e72ecfe --- /dev/null +++ b/roles/object_diff/tasks/instance_groups.yml @@ -0,0 +1,32 @@ +--- +- name: "Get the current controller user to determine if it is super-admin" + ansible.builtin.set_fact: + __controller_api_current_user_check_is_admin: "{{ lookup(controller_api_plugin, 'users', + query_params={'username': controller_username}, + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) + }}" + +- name: "Instance Group differences (block)" + when: + - __controller_api_current_user_check_is_admin.is_superuser + block: + - name: "Get the API list of all instance_groups" + ansible.builtin.set_fact: + __controller_api_instance_groups: "{{ query(controller_api_plugin, 'instance_groups', + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) + }}" + + - name: "Find the difference of Instance Groups between what is on the Controller versus CasC on SCM" + ansible.builtin.set_fact: + __instance_groups_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + api_list=__controller_api_instance_groups, + compare_list=controller_instance_groups, + with_present=false, + set_absent=true) + }}" + + - name: "Sets the difference of Instance Groups between what is on the Controller versus CasC on SCM" + ansible.builtin.set_fact: + controller_instance_groups: "{{ __instance_groups_difference }}" +... diff --git a/roles/object_diff/tasks/notification_templates.yml b/roles/object_diff/tasks/notification_templates.yml new file mode 100644 index 000000000..e3b8f53d1 --- /dev/null +++ b/roles/object_diff/tasks/notification_templates.yml @@ -0,0 +1,27 @@ +--- +- name: Get the organization ID + ansible.builtin.set_fact: + __controller_organization_id: "{{ lookup(controller_api_plugin, 'organizations', + query_params={'name': orgs}, + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) + }}" + +- name: "Get the API list of all Notification Templates in Organization {{ orgs }}" + ansible.builtin.set_fact: + __controller_api_notification_templates: "{{ query(controller_api_plugin, 'notification_templates', + query_params={'organization': __controller_organization_id.id}, + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) + }}" + +- name: "Find the difference of Notification Template between what is on the Controller versus CasC on SCM" + ansible.builtin.set_fact: + __notification_templates_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + api_list=__controller_api_notification_templates, compare_list=controller_notifications, + with_present=false, set_absent=true) + }}" + +- name: "Set notification_template's list to be configured" + ansible.builtin.set_fact: + controller_notifications: "{{ __notification_templates_difference }}" +... diff --git a/roles/object_diff/tasks/schedules.yml b/roles/object_diff/tasks/schedules.yml new file mode 100644 index 000000000..a985251f3 --- /dev/null +++ b/roles/object_diff/tasks/schedules.yml @@ -0,0 +1,48 @@ +--- +- name: Get the organization ID + ansible.builtin.set_fact: + __controller_organization_id: "{{ lookup(controller_api_plugin, 'organizations', + query_params={'name': orgs}, + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs) + }}" + +- name: "Get the API list of all WF and Job Templates in Organization {{ orgs }}" + ansible.builtin.set_fact: + __controller_api_job_templates: "{{ query(controller_api_plugin, 'job_templates', + query_params={'organization': __controller_organization_id.id}, + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) + }}" + __controller_api_workflow_job_templates: "{{ query(controller_api_plugin, 'workflow_job_templates', + query_params={'organization': __controller_organization_id.id}, + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) + }}" + + +- name: "Get WF and JT IDs" + ansible.builtin.set_fact: + __controller_api_templates_ids: '{{ __controller_api_job_templates | selectattr("id", "defined") | map(attribute="id") | flatten | unique + __controller_api_workflow_job_templates | selectattr("id", "defined") | map(attribute="id") | flatten | unique }}' + +- name: "Get the API list of all Schedules" + ansible.builtin.set_fact: + __controller_api_schedules_prefilter: "{{ query(controller_api_plugin, 'schedules', + host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs, + return_all=true, max_objects=query_controller_api_max_objects) + }}" + +- name: "Get the API list of all Schedules in Organization {{ orgs }}" + ansible.builtin.set_fact: + __controller_api_schedules: "{{ __controller_api_schedules_prefilter | selectattr('unified_job_template', 'in', __controller_api_templates_ids) }}" + +- name: "Find the difference of Schedule between what is on the Controller versus CasC on SCM" + ansible.builtin.set_fact: + __schedules_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + api_list=__controller_api_schedules, compare_list=controller_schedules, + with_present=false, set_absent=true) + }}" + +- name: "Set schedule's list to be configured" + ansible.builtin.set_fact: + controller_schedules: "{{ __schedules_difference }}" +... From 1e25a5ec6103012d15aa559d50352f6bb374c382 Mon Sep 17 00:00:00 2001 From: adonisgarciac <71078987+adonisgarciac@users.noreply.github.com> Date: Wed, 8 Feb 2023 04:07:23 +0100 Subject: [PATCH 55/94] change behavior of labels when parameter is empty (#491) --- roles/job_templates/tasks/main.yml | 2 +- roles/schedules/tasks/main.yml | 2 +- roles/workflow_job_templates/tasks/add_workflows_schema.yml | 2 +- roles/workflow_job_templates/tasks/main.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/job_templates/tasks/main.yml b/roles/job_templates/tasks/main.yml index d4a3d1320..d91400c35 100644 --- a/roles/job_templates/tasks/main.yml +++ b/roles/job_templates/tasks/main.yml @@ -52,7 +52,7 @@ webhook_service: "{{ __controller_template_item.webhook_service | default(omit, true) }}" webhook_credential: "{{ __controller_template_item.webhook_credential | default(omit, true) }}" scm_branch: "{{ __controller_template_item.scm_branch | default(omit, true) }}" - labels: "{{ __controller_template_item.labels | default(__controller_template_item.related.labels | default([]) | map(attribute='name') | list) | default(omit, true) }}" + labels: "{{ __controller_template_item.labels | default(__controller_template_item.related.labels | default([]) | map(attribute='name') | list) | default(omit) }}" state: "{{ __controller_template_item.state | default(controller_state | default('present')) }}" notification_templates_started: "{{ __controller_template_item.notification_templates_started | default(__controller_template_item.related.notification_templates_started | default([]) | map(attribute='name') | list) | default(omit, true) }}" notification_templates_success: "{{ __controller_template_item.notification_templates_success | default(__controller_template_item.related.notification_templates_success | default([]) | map(attribute='name') | list) | default(omit, true) }}" diff --git a/roles/schedules/tasks/main.yml b/roles/schedules/tasks/main.yml index 6c3db6357..7ecd557b7 100644 --- a/roles/schedules/tasks/main.yml +++ b/roles/schedules/tasks/main.yml @@ -13,7 +13,7 @@ forks: "{{ __controller_schedule_item.forks | default(omit, true) }}" instance_groups: "{{ __controller_schedule_item.instance_groups | default(omit, true) }}" job_slice_count: "{{ __controller_schedule_item.job_slice_count | default(omit, true) }}" - labels: "{{ __controller_schedule_item.labels | default(__controller_schedule_item.related.labels | default([]) | map(attribute='name') | list) | default(omit, true) }}" + labels: "{{ __controller_schedule_item.labels | default(__controller_schedule_item.related.labels | default([]) | map(attribute='name') | list) | default(omit) }}" timeout: "{{ __controller_schedule_item.timeout | default(omit, true) }}" job_type: "{{ __controller_schedule_item.job_type | default(omit, true) }}" job_tags: "{{ __controller_schedule_item.job_tags | default(omit, true) }}" diff --git a/roles/workflow_job_templates/tasks/add_workflows_schema.yml b/roles/workflow_job_templates/tasks/add_workflows_schema.yml index 7abf34995..e208b5e2d 100644 --- a/roles/workflow_job_templates/tasks/add_workflows_schema.yml +++ b/roles/workflow_job_templates/tasks/add_workflows_schema.yml @@ -20,7 +20,7 @@ forks: "{{ __workflow_loop_node_item.forks | default(omit, true) }}" instance_groups: "{{ __workflow_loop_node_item.instance_groups | default(omit, true) }}" job_slice_count: "{{ __workflow_loop_node_item.job_slice_count | default(omit, true) }}" - labels: "{{ __workflow_loop_node_item.labels | default(__workflow_loop_node_item.related.labels | default([]) | map(attribute='name') | list) | default(omit, true) }}" + labels: "{{ __workflow_loop_node_item.labels | default(__workflow_loop_node_item.related.labels | default([]) | map(attribute='name') | list) | default(omit) }}" timeout: "{{ __workflow_loop_node_item.timeout | default(omit, true) }}" approval_node: "{{ __workflow_loop_node_item.approval_node | default(omit, true) }}" workflow: "{{ __workflow_loop_item.name | mandatory }}" # Workflow job template name to associate with diff --git a/roles/workflow_job_templates/tasks/main.yml b/roles/workflow_job_templates/tasks/main.yml index 91d7c7d6f..556175824 100644 --- a/roles/workflow_job_templates/tasks/main.yml +++ b/roles/workflow_job_templates/tasks/main.yml @@ -12,7 +12,7 @@ ask_variables_on_launch: "{{ __workflow_loop_item.ask_variables_on_launch | default(omit) }}" # only supported starting from Ansible 2.9 inventory: "{{ __workflow_loop_item.inventory.name | default(__workflow_loop_item.inventory | default(omit, true)) }}" limit: "{{ __workflow_loop_item.limit | default(omit, true) }}" - labels: "{{ __workflow_loop_item.labels | default(__workflow_loop_item.related.labels | default([]) | map(attribute='name') | list) | default(omit, true) }}" + labels: "{{ __workflow_loop_item.labels | default(__workflow_loop_item.related.labels | default([]) | map(attribute='name') | list) | default(omit) }}" scm_branch: "{{ __workflow_loop_item.scm_branch | default(omit, true) }}" ask_inventory_on_launch: "{{ __workflow_loop_item.ask_inventory_on_launch | default(omit) }}" ask_scm_branch_on_launch: "{{ __workflow_loop_item.ask_scm_branch_on_launch | default(omit) }}" From a044d12b84a797b5590e83a3334558f1b608a494 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 8 Feb 2023 16:46:52 +0000 Subject: [PATCH 56/94] Workflow deps (#492) * Add test workflow * fix typo * fix typo * fix typo * remove collection install path * fix to old ns' * Fix linting * fix linting * revert to infra ns * fix ns * Remove test workflow * Add collection dependencies * Trigger Git Commit * Trigger Git Commit --- .ansible-lint | 1 + .github/tests/templates/controller_config.yml | 2 +- .../tasks/manage_controller_settings.yml | 4 ++-- .../tasks/manage_credential_types.yml | 2 +- .../templates/tasks/manage_credentials.yml | 2 +- .../tasks/manage_execution_environments.yml | 2 +- .../tests/templates/tasks/manage_groups.yml | 2 +- .../tests/templates/tasks/manage_hosts.yml | 2 +- .../tasks/manage_instance_groups.yml | 2 +- .../templates/tasks/manage_inventories.yml | 2 +- .../tasks/manage_inventory_sources.yml | 2 +- .../templates/tasks/manage_job_templates.yml | 2 +- .../tests/templates/tasks/manage_labels.yml | 2 +- .../tasks/manage_notification_templates.yml | 2 +- .../templates/tasks/manage_organizations.yml | 4 ++-- .../tests/templates/tasks/manage_projects.yml | 2 +- .../tests/templates/tasks/manage_roles.yml | 2 +- .../templates/tasks/manage_schedules.yml | 2 +- .../tests/templates/tasks/manage_teams.yml | 2 +- .../tests/templates/tasks/manage_users.yml | 2 +- .../tasks/manage_workflow_templates.yml | 2 +- .github/workflows/pre-commit.yml | 1 + roles/ad_hoc_command/README.md | 2 +- roles/ad_hoc_command/tests/test.yml | 2 +- roles/ad_hoc_command_cancel/README.md | 2 +- roles/ad_hoc_command_cancel/tests/test.yml | 2 +- roles/applications/README.md | 2 +- roles/applications/tests/test.yml | 2 +- roles/credential_input_sources/README.md | 2 +- roles/credential_input_sources/tests/test.yml | 2 +- roles/credential_types/README.md | 2 +- roles/credential_types/tests/test.yml | 2 +- roles/credentials/README.md | 2 +- roles/credentials/tests/test.yml | 2 +- roles/dispatch/README.md | 2 +- roles/dispatch/tests/test.yml | 2 +- roles/execution_environments/tests/test.yml | 2 +- .../filetree_create/tests/filetree_create.yml | 10 ++++----- .../tests/config-controller-filetree.yml | 21 ++++++++++--------- roles/groups/README.md | 2 +- roles/groups/tests/test.yml | 2 +- roles/hosts/README.md | 2 +- roles/hosts/tests/test.yml | 2 +- roles/instance_groups/README.md | 2 +- roles/instance_groups/tests/test.yml | 2 +- roles/instances/README.md | 2 +- roles/instances/tests/test.yml | 2 +- roles/inventories/README.md | 2 +- roles/inventories/tests/test.yml | 2 +- roles/inventory_source_update/README.md | 2 +- roles/inventory_source_update/tests/test.yml | 2 +- roles/inventory_sources/README.md | 2 +- roles/inventory_sources/tests/test.yml | 2 +- roles/job_launch/README.md | 2 +- roles/job_launch/tests/test.yml | 2 +- roles/job_templates/README.md | 2 +- roles/job_templates/tests/test.yml | 2 +- roles/jobs_cancel/README.md | 2 +- roles/jobs_cancel/tests/test.yml | 2 +- roles/labels/README.md | 2 +- roles/labels/tests/test.yml | 2 +- roles/license/README.md | 2 +- roles/license/tests/test.yml | 2 +- roles/master_role_example/README.md | 2 +- roles/master_role_example/tests/test.yml | 2 +- roles/notification_templates/README.md | 2 +- roles/notification_templates/tests/test.yml | 2 +- roles/object_diff/tests/drop_diff.yml | 14 ++++++------- roles/object_diff/tests/object_diff.yml | 12 +++++------ roles/organizations/README.md | 2 +- roles/organizations/tests/test.yml | 2 +- roles/project_update/README.md | 2 +- roles/project_update/tests/test.yml | 2 +- roles/projects/README.md | 2 +- roles/projects/tests/test.yml | 2 +- roles/roles/README.md | 2 +- roles/roles/tests/test.yml | 2 +- roles/schedules/README.md | 2 +- roles/schedules/tests/test.yml | 2 +- roles/settings/README.md | 2 +- roles/settings/tests/test.yml | 2 +- roles/teams/README.md | 2 +- roles/teams/tests/test.yml | 2 +- roles/users/README.md | 2 +- roles/users/tests/test.yml | 2 +- roles/workflow_job_templates/README.md | 2 +- roles/workflow_job_templates/tests/test.yaml | 2 +- roles/workflow_launch/README.md | 2 +- roles/workflow_launch/tests/test.yml | 2 +- 89 files changed, 116 insertions(+), 113 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index c84f3bd05..a3bee52e4 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -17,6 +17,7 @@ skip_list: # Skipping fqcn[action] because this collection supports using either the awx.awx or ansible.controller collection # so a FQCN cannot be used in module names - fqcn[action] + - fqcn[keyword] - meta-unsupported-ansible # This collection with the appropriate awx.awx or ansible.controller still works with older ansible. kinds: - playbooks: "**/examples/templates/*.{yml,yaml}" diff --git a/.github/tests/templates/controller_config.yml b/.github/tests/templates/controller_config.yml index a0b816497..98bb683f3 100644 --- a/.github/tests/templates/controller_config.yml +++ b/.github/tests/templates/controller_config.yml @@ -40,7 +40,7 @@ pre_tasks: - name: Include Vars - include_vars: "vars/controller_vars.yml" + ansible.builtin.include_vars: "vars/controller_vars.yml" tasks: - name: Include task for managing LDAP settings diff --git a/.github/tests/templates/tasks/manage_controller_settings.yml b/.github/tests/templates/tasks/manage_controller_settings.yml index 000eeacad..be2b91501 100644 --- a/.github/tests/templates/tasks/manage_controller_settings.yml +++ b/.github/tests/templates/tasks/manage_controller_settings.yml @@ -1,6 +1,6 @@ --- - name: Include LDAP settings vars - include_vars: ../vars/controller_ldap_configuration.json + ansible.builtin.include_vars: ../vars/controller_ldap_configuration.json tags: - settings - alltags @@ -12,7 +12,7 @@ - alltags - name: Include credential types vars - include_vars: ../vars/controller_ldap_configuration.json + ansible.builtin.include_vars: ../vars/controller_ldap_configuration.json tags: - settings - alltags diff --git a/.github/tests/templates/tasks/manage_credential_types.yml b/.github/tests/templates/tasks/manage_credential_types.yml index a86d457a2..527b0570e 100644 --- a/.github/tests/templates/tasks/manage_credential_types.yml +++ b/.github/tests/templates/tasks/manage_credential_types.yml @@ -1,6 +1,6 @@ --- - name: Include credential types vars - include_vars: ../vars/controller_credential_types.yml + ansible.builtin.include_vars: ../vars/controller_credential_types.yml tags: - credtypes - alltags diff --git a/.github/tests/templates/tasks/manage_credentials.yml b/.github/tests/templates/tasks/manage_credentials.yml index 1b61554b2..8ebaa58dc 100644 --- a/.github/tests/templates/tasks/manage_credentials.yml +++ b/.github/tests/templates/tasks/manage_credentials.yml @@ -1,6 +1,6 @@ --- - name: Include credentials vars - include_vars: ../vars/controller_credentials.yml + ansible.builtin.include_vars: ../vars/controller_credentials.yml tags: - credentials - alltags diff --git a/.github/tests/templates/tasks/manage_execution_environments.yml b/.github/tests/templates/tasks/manage_execution_environments.yml index aa25a7e35..49d7ae315 100644 --- a/.github/tests/templates/tasks/manage_execution_environments.yml +++ b/.github/tests/templates/tasks/manage_execution_environments.yml @@ -1,6 +1,6 @@ --- - name: Include EE vars - include_vars: ../vars/controller_ees.yml + ansible.builtin.include_vars: ../vars/controller_ees.yml tags: - ees - alltags diff --git a/.github/tests/templates/tasks/manage_groups.yml b/.github/tests/templates/tasks/manage_groups.yml index 4908ec6bc..f7eeb412b 100644 --- a/.github/tests/templates/tasks/manage_groups.yml +++ b/.github/tests/templates/tasks/manage_groups.yml @@ -1,6 +1,6 @@ --- - name: Include groups vars - include_vars: ../vars/controller_groups.yml + ansible.builtin.include_vars: ../vars/controller_groups.yml tags: - groups - alltags diff --git a/.github/tests/templates/tasks/manage_hosts.yml b/.github/tests/templates/tasks/manage_hosts.yml index d5b81346b..a3c12e0db 100644 --- a/.github/tests/templates/tasks/manage_hosts.yml +++ b/.github/tests/templates/tasks/manage_hosts.yml @@ -1,6 +1,6 @@ --- - name: Include hosts vars - include_vars: ../vars/controller_hosts.yml + ansible.builtin.include_vars: ../vars/controller_hosts.yml tags: - hosts - alltags diff --git a/.github/tests/templates/tasks/manage_instance_groups.yml b/.github/tests/templates/tasks/manage_instance_groups.yml index 0ce7c6ab7..0c37afa29 100644 --- a/.github/tests/templates/tasks/manage_instance_groups.yml +++ b/.github/tests/templates/tasks/manage_instance_groups.yml @@ -1,6 +1,6 @@ --- - name: Include instance group vars - include_vars: ../vars/controller_instance_groups.yml + ansible.builtin.include_vars: ../vars/controller_instance_groups.yml tags: - instancegroups - alltags diff --git a/.github/tests/templates/tasks/manage_inventories.yml b/.github/tests/templates/tasks/manage_inventories.yml index 50bfe538b..1d22e81e1 100644 --- a/.github/tests/templates/tasks/manage_inventories.yml +++ b/.github/tests/templates/tasks/manage_inventories.yml @@ -1,6 +1,6 @@ --- - name: Include inventories vars - include_vars: ../vars/controller_inventories.yml + ansible.builtin.include_vars: ../vars/controller_inventories.yml tags: - inventory - alltags diff --git a/.github/tests/templates/tasks/manage_inventory_sources.yml b/.github/tests/templates/tasks/manage_inventory_sources.yml index b917ecbcf..1da724aa5 100644 --- a/.github/tests/templates/tasks/manage_inventory_sources.yml +++ b/.github/tests/templates/tasks/manage_inventory_sources.yml @@ -1,6 +1,6 @@ --- - name: Include inventory sources vars - include_vars: ../vars/controller_inventory_sources.yml + ansible.builtin.include_vars: ../vars/controller_inventory_sources.yml tags: - inventorysources - alltags diff --git a/.github/tests/templates/tasks/manage_job_templates.yml b/.github/tests/templates/tasks/manage_job_templates.yml index 3098adb9e..808dedf78 100644 --- a/.github/tests/templates/tasks/manage_job_templates.yml +++ b/.github/tests/templates/tasks/manage_job_templates.yml @@ -1,6 +1,6 @@ --- - name: Include job templates vars - include_vars: ../vars/controller_job_templates.yml + ansible.builtin.include_vars: ../vars/controller_job_templates.yml tags: - jobtemplates - alltags diff --git a/.github/tests/templates/tasks/manage_labels.yml b/.github/tests/templates/tasks/manage_labels.yml index 3dd221d3d..1ae2821fb 100644 --- a/.github/tests/templates/tasks/manage_labels.yml +++ b/.github/tests/templates/tasks/manage_labels.yml @@ -1,6 +1,6 @@ --- - name: Include labels vars - include_vars: ../vars/controller_labels.yml + ansible.builtin.include_vars: ../vars/controller_labels.yml tags: - labels - alltags diff --git a/.github/tests/templates/tasks/manage_notification_templates.yml b/.github/tests/templates/tasks/manage_notification_templates.yml index d626b8a2b..1c2007c84 100644 --- a/.github/tests/templates/tasks/manage_notification_templates.yml +++ b/.github/tests/templates/tasks/manage_notification_templates.yml @@ -1,6 +1,6 @@ --- - name: Include notification template vars - include_vars: ../vars/controller_notification_templates.yml + ansible.builtin.include_vars: ../vars/controller_notification_templates.yml tags: - notifications - alltags diff --git a/.github/tests/templates/tasks/manage_organizations.yml b/.github/tests/templates/tasks/manage_organizations.yml index 74a4193e2..640e05347 100644 --- a/.github/tests/templates/tasks/manage_organizations.yml +++ b/.github/tests/templates/tasks/manage_organizations.yml @@ -25,7 +25,7 @@ - alltags - name: Include organizations vars - include_vars: ../vars/controller_organizations.yml + ansible.builtin.include_vars: ../vars/controller_organizations.yml when: - org_exists is not defined tags: @@ -33,7 +33,7 @@ - alltags - name: Include organizations vars - include_vars: ../vars/controller_organizations_with_hub.yml + ansible.builtin.include_vars: ../vars/controller_organizations_with_hub.yml when: - org_exists is defined - org_exists diff --git a/.github/tests/templates/tasks/manage_projects.yml b/.github/tests/templates/tasks/manage_projects.yml index b617176f7..453c10bef 100644 --- a/.github/tests/templates/tasks/manage_projects.yml +++ b/.github/tests/templates/tasks/manage_projects.yml @@ -1,6 +1,6 @@ --- - name: Include projects vars - include_vars: ../vars/controller_projects.yml + ansible.builtin.include_vars: ../vars/controller_projects.yml tags: - projects - alltags diff --git a/.github/tests/templates/tasks/manage_roles.yml b/.github/tests/templates/tasks/manage_roles.yml index 68dce00ab..a9f255282 100644 --- a/.github/tests/templates/tasks/manage_roles.yml +++ b/.github/tests/templates/tasks/manage_roles.yml @@ -1,6 +1,6 @@ --- - name: Include roles vars - include_vars: ../vars/controller_roles.yml + ansible.builtin.include_vars: ../vars/controller_roles.yml tags: - roles - alltags diff --git a/.github/tests/templates/tasks/manage_schedules.yml b/.github/tests/templates/tasks/manage_schedules.yml index 8585042ac..55112271d 100644 --- a/.github/tests/templates/tasks/manage_schedules.yml +++ b/.github/tests/templates/tasks/manage_schedules.yml @@ -1,6 +1,6 @@ --- - name: Include schedules vars - include_vars: ../vars/controller_schedules.yml + ansible.builtin.include_vars: ../vars/controller_schedules.yml tags: - schedules - alltags diff --git a/.github/tests/templates/tasks/manage_teams.yml b/.github/tests/templates/tasks/manage_teams.yml index 6e8b91ab8..754c41bdb 100644 --- a/.github/tests/templates/tasks/manage_teams.yml +++ b/.github/tests/templates/tasks/manage_teams.yml @@ -1,6 +1,6 @@ --- - name: Include teams vars - include_vars: ../vars/controller_teams.yml + ansible.builtin.include_vars: ../vars/controller_teams.yml tags: - teams - alltags diff --git a/.github/tests/templates/tasks/manage_users.yml b/.github/tests/templates/tasks/manage_users.yml index 519aca9ca..d289cd4bc 100644 --- a/.github/tests/templates/tasks/manage_users.yml +++ b/.github/tests/templates/tasks/manage_users.yml @@ -1,6 +1,6 @@ --- - name: Include users vars - include_vars: ../vars/controller_users.yml + ansible.builtin.include_vars: ../vars/controller_users.yml tags: - users - alltags diff --git a/.github/tests/templates/tasks/manage_workflow_templates.yml b/.github/tests/templates/tasks/manage_workflow_templates.yml index 10e637ceb..1431308e1 100644 --- a/.github/tests/templates/tasks/manage_workflow_templates.yml +++ b/.github/tests/templates/tasks/manage_workflow_templates.yml @@ -1,6 +1,6 @@ --- - name: Include workflows vars - include_vars: ../vars/controller_workflows.yml + ansible.builtin.include_vars: ../vars/controller_workflows.yml tags: - workflows - alltags diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 148e98ce1..7a4449e6d 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -18,4 +18,5 @@ jobs: collection_name: controller_configuration collection_version: 2.0.0 collection_repo: https://github.com/redhat-cop/controller_configuration/ + collection_dependencies: awx.awx ... diff --git a/roles/ad_hoc_command/README.md b/roles/ad_hoc_command/README.md index 63bc9bd5b..e137ebe9c 100644 --- a/roles/ad_hoc_command/README.md +++ b/roles/ad_hoc_command/README.md @@ -90,7 +90,7 @@ controller_ad_hoc_commands: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/ad_hoc_command/tests/test.yml b/roles/ad_hoc_command/tests/test.yml index d5d897ea3..9bcad1c09 100644 --- a/roles/ad_hoc_command/tests/test.yml +++ b/roles/ad_hoc_command/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/ad_hoc_command_cancel/README.md b/roles/ad_hoc_command_cancel/README.md index 5754ff19b..561b83298 100644 --- a/roles/ad_hoc_command_cancel/README.md +++ b/roles/ad_hoc_command_cancel/README.md @@ -82,7 +82,7 @@ controller_ad_hoc_commands_cancel: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/ad_hoc_command_cancel/tests/test.yml b/roles/ad_hoc_command_cancel/tests/test.yml index fde1a56b3..3802c9362 100644 --- a/roles/ad_hoc_command_cancel/tests/test.yml +++ b/roles/ad_hoc_command_cancel/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/applications/README.md b/roles/applications/README.md index dae32355f..a738306b1 100644 --- a/roles/applications/README.md +++ b/roles/applications/README.md @@ -113,7 +113,7 @@ controller_applications: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/applications/tests/test.yml b/roles/applications/tests/test.yml index 44e36bdc1..eea09d7bd 100644 --- a/roles/applications/tests/test.yml +++ b/roles/applications/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/credential_input_sources/README.md b/roles/credential_input_sources/README.md index 098cbc63a..110fa6da1 100644 --- a/roles/credential_input_sources/README.md +++ b/roles/credential_input_sources/README.md @@ -117,7 +117,7 @@ controller_credential_input_sources: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/credential_input_sources/tests/test.yml b/roles/credential_input_sources/tests/test.yml index 43f6862df..38b597cf0 100644 --- a/roles/credential_input_sources/tests/test.yml +++ b/roles/credential_input_sources/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/credential_types/README.md b/roles/credential_types/README.md index c24b387ff..ce80547b8 100644 --- a/roles/credential_types/README.md +++ b/roles/credential_types/README.md @@ -214,7 +214,7 @@ controller_credential_types: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/credential_types/tests/test.yml b/roles/credential_types/tests/test.yml index 4099a10a6..76e89cb06 100644 --- a/roles/credential_types/tests/test.yml +++ b/roles/credential_types/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/credentials/README.md b/roles/credentials/README.md index b5b59716a..66f52a12a 100644 --- a/roles/credentials/README.md +++ b/roles/credentials/README.md @@ -150,7 +150,7 @@ controller_credentials: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/credentials/tests/test.yml b/roles/credentials/tests/test.yml index 409e049a5..42409f5a2 100644 --- a/roles/credentials/tests/test.yml +++ b/roles/credentials/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/dispatch/README.md b/roles/dispatch/README.md index 9bef64bb7..58e198111 100644 --- a/roles/dispatch/README.md +++ b/roles/dispatch/README.md @@ -98,7 +98,7 @@ This also speeds up the overall role. Each individual role has its own variable # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/dispatch/tests/test.yml b/roles/dispatch/tests/test.yml index 1bfa26a8a..d1502b046 100644 --- a/roles/dispatch/tests/test.yml +++ b/roles/dispatch/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] tags: always diff --git a/roles/execution_environments/tests/test.yml b/roles/execution_environments/tests/test.yml index dd294be24..cedbc88d5 100644 --- a/roles/execution_environments/tests/test.yml +++ b/roles/execution_environments/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/filetree_create/tests/filetree_create.yml b/roles/filetree_create/tests/filetree_create.yml index f8f0c42cd..398ee43c3 100644 --- a/roles/filetree_create/tests/filetree_create.yml +++ b/roles/filetree_create/tests/filetree_create.yml @@ -10,6 +10,10 @@ pre_tasks: - name: "Setup authentication (block)" + no_log: "{{ controller_configuration_filetree_create_secure_logging }}" + when: controller_oauthtoken is not defined + tags: + - always block: - name: "Get the Authentication Token for the future requests" ansible.builtin.uri: @@ -26,13 +30,9 @@ ansible.builtin.set_fact: controller_oauthtoken: "{{ authtoken_res.json.token }}" controller_oauthtoken_url: "{{ authtoken_res.json.url }}" - no_log: "{{ controller_configuration_filetree_create_secure_logging }}" - when: controller_oauthtoken is not defined - tags: - - always roles: - - redhat_cop.controller_configuration.filetree_create + - infra.controller_configuration.filetree_create post_tasks: - name: "Delete the Authentication Token used" diff --git a/roles/filetree_read/tests/config-controller-filetree.yml b/roles/filetree_read/tests/config-controller-filetree.yml index c87de6604..b3d10ac18 100644 --- a/roles/filetree_read/tests/config-controller-filetree.yml +++ b/roles/filetree_read/tests/config-controller-filetree.yml @@ -11,6 +11,10 @@ controller_validate_certs: "{{ vault_controller_validate_certs | default(lookup('env', 'CONTROLLER_VERIFY_SSL')) }}" pre_tasks: - name: "Setup authentication (block)" + no_log: "{{ controller_configuration_filetree_read_secure_logging | default('false') }}" + when: controller_oauthtoken is not defined + tags: + - always block: - name: "Get the Authentication Token for the future requests" ansible.builtin.uri: @@ -27,27 +31,24 @@ ansible.builtin.set_fact: controller_oauthtoken: "{{ authtoken_res.json.token }}" controller_oauthtoken_url: "{{ authtoken_res.json.url }}" - no_log: "{{ controller_configuration_filetree_read_secure_logging | default('false') }}" - when: controller_oauthtoken is not defined - tags: - - always roles: - - {role: redhat_cop.controller_configuration.filetree_read, assign_galaxy_credentials_to_org: false} - - {role: redhat_cop.controller_configuration.dispatch, assign_galaxy_credentials_to_org: false} + - {role: infra.controller_configuration.filetree_read, assign_galaxy_credentials_to_org: false} + - {role: infra.controller_configuration.dispatch, assign_galaxy_credentials_to_org: false} post_tasks: - - block: + - name: Add galaxy creds + tags: + - organizations + block: - name: Include Tasks to add Galaxy credentials to Organizations ansible.builtin.include_role: - name: redhat_cop.controller_configuration.dispatch + name: infra.controller_configuration.dispatch apply: tags: - organizations vars: controller_configuration_dispatcher_roles: - {role: organizations, var: controller_organizations, tags: organizations} - tags: - - organizations - name: "Delete the Authentication Token used" ansible.builtin.uri: diff --git a/roles/groups/README.md b/roles/groups/README.md index a27cca8e7..d0febfd50 100644 --- a/roles/groups/README.md +++ b/roles/groups/README.md @@ -141,7 +141,7 @@ controller_groups: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/groups/tests/test.yml b/roles/groups/tests/test.yml index f8a2167ec..d13500f63 100644 --- a/roles/groups/tests/test.yml +++ b/roles/groups/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/hosts/README.md b/roles/hosts/README.md index 299dd603a..d61c35d10 100644 --- a/roles/hosts/README.md +++ b/roles/hosts/README.md @@ -131,7 +131,7 @@ controller_hosts: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/hosts/tests/test.yml b/roles/hosts/tests/test.yml index 95b3bd5c8..b7a00793d 100644 --- a/roles/hosts/tests/test.yml +++ b/roles/hosts/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/instance_groups/README.md b/roles/instance_groups/README.md index 37443f7f8..992a82204 100644 --- a/roles/instance_groups/README.md +++ b/roles/instance_groups/README.md @@ -96,7 +96,7 @@ controller_instance_groups: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/instance_groups/tests/test.yml b/roles/instance_groups/tests/test.yml index 55921ab0e..640b8f963 100644 --- a/roles/instance_groups/tests/test.yml +++ b/roles/instance_groups/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/instances/README.md b/roles/instances/README.md index 905a99bff..3c95be888 100644 --- a/roles/instances/README.md +++ b/roles/instances/README.md @@ -93,7 +93,7 @@ controller_instances: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/instances/tests/test.yml b/roles/instances/tests/test.yml index 1cfc4e808..6c37843aa 100644 --- a/roles/instances/tests/test.yml +++ b/roles/instances/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/inventories/README.md b/roles/inventories/README.md index cbd25c382..4fd2cfdfa 100644 --- a/roles/inventories/README.md +++ b/roles/inventories/README.md @@ -144,7 +144,7 @@ controller_inventories: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/inventories/tests/test.yml b/roles/inventories/tests/test.yml index 2df3ea9e4..c78f4c92c 100644 --- a/roles/inventories/tests/test.yml +++ b/roles/inventories/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/inventory_source_update/README.md b/roles/inventory_source_update/README.md index 8b0e489ca..d854b8aa9 100644 --- a/roles/inventory_source_update/README.md +++ b/roles/inventory_source_update/README.md @@ -101,7 +101,7 @@ controller_inventory_sources: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/inventory_source_update/tests/test.yml b/roles/inventory_source_update/tests/test.yml index 7d695edef..e8ad47f16 100644 --- a/roles/inventory_source_update/tests/test.yml +++ b/roles/inventory_source_update/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/inventory_sources/README.md b/roles/inventory_sources/README.md index ab937be7a..efee4c6c0 100644 --- a/roles/inventory_sources/README.md +++ b/roles/inventory_sources/README.md @@ -157,7 +157,7 @@ controller_inventory_sources: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/inventory_sources/tests/test.yml b/roles/inventory_sources/tests/test.yml index 28f86a6aa..b71721ddb 100644 --- a/roles/inventory_sources/tests/test.yml +++ b/roles/inventory_sources/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/job_launch/README.md b/roles/job_launch/README.md index 3f7aff9a4..7655434fc 100644 --- a/roles/job_launch/README.md +++ b/roles/job_launch/README.md @@ -93,7 +93,7 @@ controller_launch_jobs: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/job_launch/tests/test.yml b/roles/job_launch/tests/test.yml index 7a08f815c..69cf2cee4 100644 --- a/roles/job_launch/tests/test.yml +++ b/roles/job_launch/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/job_templates/README.md b/roles/job_templates/README.md index b1f13f40e..67a83f25b 100644 --- a/roles/job_templates/README.md +++ b/roles/job_templates/README.md @@ -272,7 +272,7 @@ controller_templates: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/job_templates/tests/test.yml b/roles/job_templates/tests/test.yml index a9b8d29a3..ff7a743bb 100644 --- a/roles/job_templates/tests/test.yml +++ b/roles/job_templates/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/jobs_cancel/README.md b/roles/jobs_cancel/README.md index 62594b9fc..ece21d3e5 100644 --- a/roles/jobs_cancel/README.md +++ b/roles/jobs_cancel/README.md @@ -73,7 +73,7 @@ controller_cancel_jobs: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/jobs_cancel/tests/test.yml b/roles/jobs_cancel/tests/test.yml index f92a2ef51..1cbbbdea3 100644 --- a/roles/jobs_cancel/tests/test.yml +++ b/roles/jobs_cancel/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/labels/README.md b/roles/labels/README.md index 1e5def597..ef76a4c70 100644 --- a/roles/labels/README.md +++ b/roles/labels/README.md @@ -108,7 +108,7 @@ controller_labels: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/labels/tests/test.yml b/roles/labels/tests/test.yml index d5f71c1b2..776d50623 100644 --- a/roles/labels/tests/test.yml +++ b/roles/labels/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/license/README.md b/roles/license/README.md index 296aa732f..5befd0fd8 100644 --- a/roles/license/README.md +++ b/roles/license/README.md @@ -95,7 +95,7 @@ controller_license: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/license/tests/test.yml b/roles/license/tests/test.yml index 065b81b06..0f256fcba 100644 --- a/roles/license/tests/test.yml +++ b/roles/license/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./config extensions: ["yml"] diff --git a/roles/master_role_example/README.md b/roles/master_role_example/README.md index 82244366c..2e4d5e5db 100644 --- a/roles/master_role_example/README.md +++ b/roles/master_role_example/README.md @@ -96,7 +96,7 @@ This also speeds up the overall role. # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/master_role_example/tests/test.yml b/roles/master_role_example/tests/test.yml index 2040626c8..ae745ffd5 100644 --- a/roles/master_role_example/tests/test.yml +++ b/roles/master_role_example/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/notification_templates/README.md b/roles/notification_templates/README.md index 87505aec8..ed8ac1127 100644 --- a/roles/notification_templates/README.md +++ b/roles/notification_templates/README.md @@ -168,7 +168,7 @@ controller_notifications: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/notification_templates/tests/test.yml b/roles/notification_templates/tests/test.yml index 59ce13d9d..48f311ade 100644 --- a/roles/notification_templates/tests/test.yml +++ b/roles/notification_templates/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/object_diff/tests/drop_diff.yml b/roles/object_diff/tests/drop_diff.yml index 1f67063d1..d76a29a71 100644 --- a/roles/object_diff/tests/drop_diff.yml +++ b/roles/object_diff/tests/drop_diff.yml @@ -11,6 +11,10 @@ pre_tasks: - name: "Setup authentication (block)" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" + when: controller_oauthtoken is not defined + tags: + - always block: - name: "Get the Authentication Token for the future requests" ansible.builtin.uri: @@ -27,15 +31,11 @@ ansible.builtin.set_fact: controller_oauthtoken: "{{ authtoken_res.json.token }}" controller_oauthtoken_url: "{{ authtoken_res.json.url }}" - no_log: "{{ controller_configuration_object_diff_secure_logging }}" - when: controller_oauthtoken is not defined - tags: - - always roles: - - role: redhat_cop.controller_configuration.filetree_read - - role: redhat_cop.controller_configuration.object_diff - - role: redhat_cop.controller_configuration.dispatch + - role: infra.controller_configuration.filetree_read + - role: infra.controller_configuration.object_diff + - role: infra.controller_configuration.dispatch vars: controller_configuration_dispatcher_roles: - {role: workflow_job_templates, var: controller_workflows, tags: workflow_job_templates} diff --git a/roles/object_diff/tests/object_diff.yml b/roles/object_diff/tests/object_diff.yml index 498da6cb6..b6cd9efa7 100644 --- a/roles/object_diff/tests/object_diff.yml +++ b/roles/object_diff/tests/object_diff.yml @@ -11,6 +11,10 @@ pre_tasks: - name: "Setup authentication (block)" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" + when: controller_oauthtoken is not defined + tags: + - always block: - name: "Get the Authentication Token for the future requests" ansible.builtin.uri: @@ -27,13 +31,9 @@ ansible.builtin.set_fact: controller_oauthtoken: "{{ authtoken_res.json.token }}" controller_oauthtoken_url: "{{ authtoken_res.json.url }}" - no_log: "{{ controller_configuration_object_diff_secure_logging }}" - when: controller_oauthtoken is not defined - tags: - - always roles: - - redhat_cop.controller_configuration.filetree_read - - redhat_cop.controller_configuration.object_diff + - infra.controller_configuration.filetree_read + - infra.controller_configuration.object_diff post_tasks: - name: "Delete the Authentication Token used" diff --git a/roles/organizations/README.md b/roles/organizations/README.md index 0ec06f774..4cf6b880d 100644 --- a/roles/organizations/README.md +++ b/roles/organizations/README.md @@ -158,7 +158,7 @@ controller_organizations: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/organizations/tests/test.yml b/roles/organizations/tests/test.yml index bf2ffa8ce..9bdc016f9 100644 --- a/roles/organizations/tests/test.yml +++ b/roles/organizations/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/project_update/README.md b/roles/project_update/README.md index 049bb7235..5dc89c806 100644 --- a/roles/project_update/README.md +++ b/roles/project_update/README.md @@ -110,7 +110,7 @@ controller_projects: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/project_update/tests/test.yml b/roles/project_update/tests/test.yml index a3f03362f..8c771034b 100644 --- a/roles/project_update/tests/test.yml +++ b/roles/project_update/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/projects/README.md b/roles/projects/README.md index b26c6cd9a..453b2bd71 100644 --- a/roles/projects/README.md +++ b/roles/projects/README.md @@ -144,7 +144,7 @@ controller_projects: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/projects/tests/test.yml b/roles/projects/tests/test.yml index 147e4e3b5..8c877ea54 100644 --- a/roles/projects/tests/test.yml +++ b/roles/projects/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/roles/README.md b/roles/roles/README.md index b1b092a40..b94876575 100644 --- a/roles/roles/README.md +++ b/roles/roles/README.md @@ -146,7 +146,7 @@ controller_roles: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/roles/tests/test.yml b/roles/roles/tests/test.yml index 03550ab8c..b36acf8a1 100644 --- a/roles/roles/tests/test.yml +++ b/roles/roles/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/schedules/README.md b/roles/schedules/README.md index ff6da5bdd..8ef7da3ca 100644 --- a/roles/schedules/README.md +++ b/roles/schedules/README.md @@ -132,7 +132,7 @@ controller_schedules: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/schedules/tests/test.yml b/roles/schedules/tests/test.yml index 24ab8e259..f62efd482 100644 --- a/roles/schedules/tests/test.yml +++ b/roles/schedules/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/settings/README.md b/roles/settings/README.md index a465ce7e7..8845b6e9c 100644 --- a/roles/settings/README.md +++ b/roles/settings/README.md @@ -135,7 +135,7 @@ controller_settings: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/settings/tests/test.yml b/roles/settings/tests/test.yml index 0209f429a..4b44866ed 100644 --- a/roles/settings/tests/test.yml +++ b/roles/settings/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/teams/README.md b/roles/teams/README.md index adc031598..1fe4dcdc5 100644 --- a/roles/teams/README.md +++ b/roles/teams/README.md @@ -77,7 +77,7 @@ This also speeds up the overall role. # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/teams/tests/test.yml b/roles/teams/tests/test.yml index 6803555c0..c06f49f27 100644 --- a/roles/teams/tests/test.yml +++ b/roles/teams/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/users/README.md b/roles/users/README.md index c2f0edbd6..26688c109 100644 --- a/roles/users/README.md +++ b/roles/users/README.md @@ -112,7 +112,7 @@ controller_user_accounts: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/users/tests/test.yml b/roles/users/tests/test.yml index e8671378f..cc3110b28 100644 --- a/roles/users/tests/test.yml +++ b/roles/users/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/workflow_job_templates/README.md b/roles/workflow_job_templates/README.md index 6c6f7d552..c8c667add 100644 --- a/roles/workflow_job_templates/README.md +++ b/roles/workflow_job_templates/README.md @@ -397,7 +397,7 @@ controller_workflows: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/workflow_job_templates/tests/test.yaml b/roles/workflow_job_templates/tests/test.yaml index fde8cf77e..bb0048b70 100644 --- a/roles/workflow_job_templates/tests/test.yaml +++ b/roles/workflow_job_templates/tests/test.yaml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] diff --git a/roles/workflow_launch/README.md b/roles/workflow_launch/README.md index 44c34b79c..b22a1dfd3 100644 --- a/roles/workflow_launch/README.md +++ b/roles/workflow_launch/README.md @@ -80,7 +80,7 @@ controller_workflow_launch_jobs: # controller_password: changeme pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./yaml ignore_files: [controller_config.yml.template] extensions: ["yml"] diff --git a/roles/workflow_launch/tests/test.yml b/roles/workflow_launch/tests/test.yml index 976a06c2a..adb835e04 100644 --- a/roles/workflow_launch/tests/test.yml +++ b/roles/workflow_launch/tests/test.yml @@ -14,7 +14,7 @@ pre_tasks: - name: Include vars from controller_configs directory - include_vars: + ansible.builtin.include_vars: dir: ./configs extensions: ["yml"] From eed59188282ccb9f17ccf602f6841484bfbab78e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Aragon=C3=A9s=20Muniesa?= <26822043+ivarmu@users.noreply.github.com> Date: Thu, 9 Feb 2023 11:49:15 +0100 Subject: [PATCH 57/94] added no_log to the 'Populate *' tasks (#493) * added no_log to the 'Populate *' tasks * Fix the connection method * Fix the connection method --- changelogs/fragments/filetree_read.yml | 4 ++++ roles/filetree_read/tasks/applications.yml | 2 ++ roles/filetree_read/tasks/credential_input_sources.yml | 2 ++ roles/filetree_read/tasks/credential_types.yml | 2 ++ roles/filetree_read/tasks/credentials.yml | 6 ++++++ roles/filetree_read/tasks/execution_environments.yml | 6 ++++++ roles/filetree_read/tasks/groups.yml | 2 ++ roles/filetree_read/tasks/hosts.yml | 6 ++++++ roles/filetree_read/tasks/instance_groups.yml | 6 ++++++ roles/filetree_read/tasks/inventories.yml | 2 ++ roles/filetree_read/tasks/inventory_sources.yml | 6 ++++++ roles/filetree_read/tasks/job_templates.yml | 2 ++ roles/filetree_read/tasks/labels.yml | 2 ++ roles/filetree_read/tasks/notifications.yml | 2 ++ roles/filetree_read/tasks/organizations.yml | 2 ++ roles/filetree_read/tasks/projects.yml | 2 ++ roles/filetree_read/tasks/roles.yml | 2 ++ roles/filetree_read/tasks/schedules.yml | 2 ++ roles/filetree_read/tasks/settings.yml | 6 ++++++ roles/filetree_read/tasks/teams.yml | 2 ++ roles/filetree_read/tasks/user_accounts.yml | 1 + roles/filetree_read/tasks/workflow_job_templates.yml | 2 ++ roles/object_diff/tasks/user_accounts.yml | 4 ++++ 23 files changed, 73 insertions(+) create mode 100644 changelogs/fragments/filetree_read.yml diff --git a/changelogs/fragments/filetree_read.yml b/changelogs/fragments/filetree_read.yml new file mode 100644 index 000000000..72f1c6328 --- /dev/null +++ b/changelogs/fragments/filetree_read.yml @@ -0,0 +1,4 @@ +--- +minor_changes: + - "Add no_log to all tasks that populates data to avoid exposing encrypted data" +... diff --git a/roles/filetree_read/tasks/applications.yml b/roles/filetree_read/tasks/applications.yml index 9dbc9495a..ac5638e0c 100644 --- a/roles/filetree_read/tasks/applications.yml +++ b/roles/filetree_read/tasks/applications.yml @@ -20,10 +20,12 @@ loop: "{{ __contents_filetree_controller_applications.results }}" loop_control: loop_var: __populate_applications_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_applications.results is defined and __populate_applications_list_item.ansible_facts.controller_applications is defined - name: "Set Applications Data Structure" ansible.builtin.set_fact: controller_applications: "{{ __populate_controller_applications }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_applications is defined ... diff --git a/roles/filetree_read/tasks/credential_input_sources.yml b/roles/filetree_read/tasks/credential_input_sources.yml index 631bd7789..27201d47a 100644 --- a/roles/filetree_read/tasks/credential_input_sources.yml +++ b/roles/filetree_read/tasks/credential_input_sources.yml @@ -20,10 +20,12 @@ loop: "{{ __contents_filetree_controller_credential_input_sources.results }}" loop_control: loop_var: __populate_input_sources_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_credential_input_sources.results is defined and __populate_input_sources_list_item.ansible_facts.controller_credential_input_sources is defined - name: "Set Credential Input Sources Data Structure" ansible.builtin.set_fact: controller_credential_input_sources: "{{ __populate_controller_credential_input_sources }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_credential_input_sources is defined ... diff --git a/roles/filetree_read/tasks/credential_types.yml b/roles/filetree_read/tasks/credential_types.yml index abdf34864..90e51dde0 100644 --- a/roles/filetree_read/tasks/credential_types.yml +++ b/roles/filetree_read/tasks/credential_types.yml @@ -20,10 +20,12 @@ loop: "{{ __contents_filetree_controller_credential_types.results }}" loop_control: loop_var: __populate_credentials_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_credential_types.results is defined and __populate_credentials_list_item.ansible_facts.controller_credential_types is defined - name: "Set Projects Data Structure" ansible.builtin.set_fact: controller_credential_types: "{{ __populate_controller_credential_types }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_credential_types is defined ... diff --git a/roles/filetree_read/tasks/credentials.yml b/roles/filetree_read/tasks/credentials.yml index c3d6632a7..3ff5661bb 100644 --- a/roles/filetree_read/tasks/credentials.yml +++ b/roles/filetree_read/tasks/credentials.yml @@ -20,6 +20,7 @@ loop: "{{ __contents_filetree_controller_credentials.results }}" loop_control: loop_var: __populate_credentials_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_credentials.results is defined and __populate_credentials_list_item.ansible_facts.controller_credentials is defined - name: "Segregated Credentials list when controller_location is defined" @@ -31,6 +32,7 @@ loop: "{{ __populate_controller_credentials }}" loop_control: loop_var: __populate_credentials_list_common_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: "__populate_credentials_list_common_item.controller_location is not defined" - name: "Populate Credentials list by __site objects" @@ -39,20 +41,24 @@ loop: "{{ __populate_controller_credentials }}" loop_control: loop_var: __populate_credentials_list_site_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: "__populate_credentials_list_site_item.controller_location is defined and __populate_credentials_list_site_item.controller_location == controller_location" - name: "Concatenate Credentials list common + site" ansible.builtin.set_fact: __populate_controller_credentials_total: "{{ __populate_controller_credentials_common | default([]) + __populate_controller_credentials_site }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_credentials_site is defined - name: "Set Credentials Data Structure common + site concatenated" ansible.builtin.set_fact: __populate_controller_credentials: "{{ __populate_controller_credentials_total }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_credentials_total is defined - name: "Set Credentials Data Structure" ansible.builtin.set_fact: controller_credentials: "{{ __populate_controller_credentials }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_credentials is defined ... diff --git a/roles/filetree_read/tasks/execution_environments.yml b/roles/filetree_read/tasks/execution_environments.yml index 08adbf49d..8dd80a77c 100644 --- a/roles/filetree_read/tasks/execution_environments.yml +++ b/roles/filetree_read/tasks/execution_environments.yml @@ -20,6 +20,7 @@ loop: "{{ __contents_filetree_controller_execution_environments.results }}" loop_control: loop_var: __populate_execution_environments_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_execution_environments.results is defined and __populate_execution_environments_list_item.ansible_facts.controller_execution_environments is defined - name: "Segregated Execution Environments list when controller_location is defined" @@ -31,6 +32,7 @@ loop: "{{ __populate_controller_execution_environments }}" loop_control: loop_var: __populate_execution_environments_list_common_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: "__populate_execution_environments_list_common_item.controller_location is not defined" - name: "Populate Execution Environments list by __site objects" @@ -39,20 +41,24 @@ loop: "{{ __populate_controller_execution_environments }}" loop_control: loop_var: __populate_execution_environments_list_site_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: "__populate_execution_environments_list_site_item.controller_location is defined and __populate_execution_environments_list_site_item.controller_location == controller_location" - name: "Concatenate Execution Environments list common + site" ansible.builtin.set_fact: __populate_controller_execution_environments_total: "{{ __populate_controller_execution_environments_common | default([]) + __populate_controller_execution_environments_site }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_execution_environments_site is defined - name: "Set Execution Environments Data Structure common + site concatenated" ansible.builtin.set_fact: __populate_controller_execution_environments: "{{ __populate_controller_execution_environments_total }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_execution_environments_total is defined - name: "Set Execution Environments Data Structure" ansible.builtin.set_fact: controller_execution_environments: "{{ __populate_controller_execution_environments }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_execution_environments is defined ... diff --git a/roles/filetree_read/tasks/groups.yml b/roles/filetree_read/tasks/groups.yml index 578db97b7..6f17d6e80 100644 --- a/roles/filetree_read/tasks/groups.yml +++ b/roles/filetree_read/tasks/groups.yml @@ -20,10 +20,12 @@ loop: "{{ __contents_filetree_controller_groups.results }}" loop_control: loop_var: __populate_groups_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_groups.results is defined and __populate_groups_list_item.ansible_facts.controller_groups is defined - name: "Set Groups Data Structure" ansible.builtin.set_fact: controller_groups: "{{ __populate_controller_groups }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_groups is defined ... diff --git a/roles/filetree_read/tasks/hosts.yml b/roles/filetree_read/tasks/hosts.yml index 78470d497..ab7af5a2f 100644 --- a/roles/filetree_read/tasks/hosts.yml +++ b/roles/filetree_read/tasks/hosts.yml @@ -20,6 +20,7 @@ loop: "{{ __contents_filetree_controller_hosts.results }}" loop_control: loop_var: __populate_hosts_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_hosts.results is defined and __populate_hosts_list_item.ansible_facts.controller_hosts is defined - name: "Segregated Hosts list when controller_location is defined" @@ -31,6 +32,7 @@ loop: "{{ __populate_controller_hosts }}" loop_control: loop_var: __populate_hosts_list_common_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: "__populate_hosts_list_common_item.controller_location is not defined" - name: "Populate Hosts list by __site objects" @@ -39,20 +41,24 @@ loop: "{{ __populate_controller_hosts }}" loop_control: loop_var: __populate_hosts_list_site_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: "__populate_hosts_list_site_item.controller_location is defined and __populate_hosts_list_site_item.controller_location == controller_location" - name: "Concatenate Hosts list common + site" ansible.builtin.set_fact: __populate_controller_hosts_total: "{{ __populate_controller_hosts_common | default([]) + __populate_controller_hosts_site }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_hosts_site is defined - name: "Set Hosts Data Structure common + site concatenated" ansible.builtin.set_fact: __populate_controller_hosts: "{{ __populate_controller_hosts_total }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_hosts_total is defined - name: "Set Hosts Data Structure" ansible.builtin.set_fact: controller_hosts: "{{ __populate_controller_hosts }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_hosts is defined ... diff --git a/roles/filetree_read/tasks/instance_groups.yml b/roles/filetree_read/tasks/instance_groups.yml index be76abaa6..f5a1e113b 100644 --- a/roles/filetree_read/tasks/instance_groups.yml +++ b/roles/filetree_read/tasks/instance_groups.yml @@ -20,6 +20,7 @@ loop: "{{ __contents_filetree_controller_instance_groups.results }}" loop_control: loop_var: __populate_instance_groups_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_instance_groups.results is defined and __populate_instance_groups_list_item.ansible_facts.controller_instance_groups is defined - name: "Segregated Instance Groups list when controller_location is defined" @@ -31,6 +32,7 @@ loop: "{{ __populate_controller_instance_groups }}" loop_control: loop_var: __populate_instance_groups_list_common_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: "__populate_instance_groups_list_common_item.controller_location is not defined" - name: "Populate Instance Groups list by __site objects" @@ -39,20 +41,24 @@ loop: "{{ __populate_controller_instance_groups }}" loop_control: loop_var: __populate_instance_groups_list_site_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: "__populate_instance_groups_list_site_item.controller_location is defined and __populate_instance_groups_list_site_item.controller_location == controller_location" - name: "Concatenate Instance Groups list common + site" ansible.builtin.set_fact: __populate_controller_instance_groups_total: "{{ __populate_controller_instance_groups_common | default([]) + __populate_controller_instance_groups_site }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_instance_groups_site is defined - name: "Set Instance Groups Data Structure common + site concatenated" ansible.builtin.set_fact: __populate_controller_instance_groups: "{{ __populate_controller_instance_groups_total }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_instance_groups_total is defined - name: "Set Instance Groups Data Structure" ansible.builtin.set_fact: controller_instance_groups: "{{ __populate_controller_instance_groups }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_instance_groups is defined ... diff --git a/roles/filetree_read/tasks/inventories.yml b/roles/filetree_read/tasks/inventories.yml index 673cc2d26..6de650c3a 100644 --- a/roles/filetree_read/tasks/inventories.yml +++ b/roles/filetree_read/tasks/inventories.yml @@ -20,10 +20,12 @@ loop: "{{ __contents_filetree_controller_inventories.results }}" loop_control: loop_var: __populate_inventories_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_inventories.results is defined and __populate_inventories_list_item.ansible_facts.controller_inventories is defined - name: "Set Inventories Data Structure" ansible.builtin.set_fact: controller_inventories: "{{ __populate_controller_inventories }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_inventories is defined ... diff --git a/roles/filetree_read/tasks/inventory_sources.yml b/roles/filetree_read/tasks/inventory_sources.yml index a64814da6..1c5d457bd 100644 --- a/roles/filetree_read/tasks/inventory_sources.yml +++ b/roles/filetree_read/tasks/inventory_sources.yml @@ -20,6 +20,7 @@ loop: "{{ __contents_filetree_controller_inventory_sources.results }}" loop_control: loop_var: __populate_inventory_sources_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_inventory_sources.results is defined and __populate_inventory_sources_list_item.ansible_facts.controller_inventory_sources is defined - name: "Segregated Inventory Sources list when controller_location is defined" @@ -31,6 +32,7 @@ loop: "{{ __populate_controller_inventory_sources }}" loop_control: loop_var: __populate_inventory_sources_list_common_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: "__populate_inventory_sources_list_common_item.controller_location is not defined" - name: "Populate Inventory Sources list by __site objects" @@ -39,20 +41,24 @@ loop: "{{ __populate_controller_inventory_sources }}" loop_control: loop_var: __populate_inventory_sources_list_site_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: "__populate_inventory_sources_list_site_item.controller_location is defined and __populate_inventory_sources_list_site_item.controller_location == controller_location" - name: "Concatenate Inventory Sources list common + site" ansible.builtin.set_fact: __populate_controller_inventory_sources_total: "{{ __populate_controller_inventory_sources_common | default([]) + __populate_controller_inventory_sources_site }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_inventory_sources_site is defined - name: "Set Inventory Sources Data Structure common + site concatenated" ansible.builtin.set_fact: __populate_controller_inventory_sources: "{{ __populate_controller_inventory_sources_total }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_inventory_sources_total is defined - name: "Set Inventory Sources Data Structure" ansible.builtin.set_fact: controller_inventory_sources: "{{ __populate_controller_inventory_sources }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_inventory_sources is defined ... diff --git a/roles/filetree_read/tasks/job_templates.yml b/roles/filetree_read/tasks/job_templates.yml index b83bb0f9e..287998c11 100644 --- a/roles/filetree_read/tasks/job_templates.yml +++ b/roles/filetree_read/tasks/job_templates.yml @@ -20,10 +20,12 @@ loop: "{{ __contents_filetree_controller_templates.results }}" loop_control: loop_var: __populate_job_templates_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_templates.results is defined and __populate_job_templates_list_item.ansible_facts.controller_templates is defined - name: "Set Job Templates Data Structure" ansible.builtin.set_fact: controller_templates: "{{ __populate_controller_job_templates }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_job_templates is defined ... diff --git a/roles/filetree_read/tasks/labels.yml b/roles/filetree_read/tasks/labels.yml index d8e6b479d..16b8f51f9 100644 --- a/roles/filetree_read/tasks/labels.yml +++ b/roles/filetree_read/tasks/labels.yml @@ -20,10 +20,12 @@ loop: "{{ __contents_filetree_controller_labels.results }}" loop_control: loop_var: __populate_labels_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_labels.results is defined and __populate_labels_list_item.ansible_facts.controller_labels is defined - name: "Set Labels Data Structure" ansible.builtin.set_fact: controller_labels: "{{ __populate_controller_labels }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_labels is defined ... diff --git a/roles/filetree_read/tasks/notifications.yml b/roles/filetree_read/tasks/notifications.yml index c7c703748..f40c7db0f 100644 --- a/roles/filetree_read/tasks/notifications.yml +++ b/roles/filetree_read/tasks/notifications.yml @@ -20,10 +20,12 @@ loop: "{{ __contents_filetree_controller_notifications.results }}" loop_control: loop_var: __populate_notifications_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_notifications.results is defined and __populate_notifications_list_item.ansible_facts.controller_notifications is defined - name: "Set Notifications Data Structure" ansible.builtin.set_fact: controller_notifications: "{{ __populate_controller_notifications }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_notifications is defined ... diff --git a/roles/filetree_read/tasks/organizations.yml b/roles/filetree_read/tasks/organizations.yml index c1c55cfec..1fb04bd67 100644 --- a/roles/filetree_read/tasks/organizations.yml +++ b/roles/filetree_read/tasks/organizations.yml @@ -20,10 +20,12 @@ loop: "{{ __contents_filetree_controller_organizations.results }}" loop_control: loop_var: __populate_organizations_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_organizations.results is defined and __populate_organizations_list_item.ansible_facts.controller_organizations is defined - name: "Set Organization Data Structure" ansible.builtin.set_fact: controller_organizations: "{{ __populate_controller_organizations }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_organizations is defined ... diff --git a/roles/filetree_read/tasks/projects.yml b/roles/filetree_read/tasks/projects.yml index 32f9b138b..83d9038e3 100644 --- a/roles/filetree_read/tasks/projects.yml +++ b/roles/filetree_read/tasks/projects.yml @@ -20,10 +20,12 @@ loop: "{{ __contents_filetree_controller_projects.results }}" loop_control: loop_var: __populate_projects_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_projects.results is defined and __populate_projects_list_item.ansible_facts.controller_projects is defined - name: "Set Projects Data Structure" ansible.builtin.set_fact: controller_projects: "{{ __populate_controller_projects }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_projects is defined ... diff --git a/roles/filetree_read/tasks/roles.yml b/roles/filetree_read/tasks/roles.yml index ea8fd731f..3d9ec8c6c 100644 --- a/roles/filetree_read/tasks/roles.yml +++ b/roles/filetree_read/tasks/roles.yml @@ -20,10 +20,12 @@ loop: "{{ __contents_filetree_controller_roles.results }}" loop_control: loop_var: __populate_roles_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_roles.results is defined and __populate_roles_list_item.ansible_facts.controller_roles is defined - name: "Set Roles Data Structure" ansible.builtin.set_fact: controller_roles: "{{ __populate_controller_roles }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_roles is defined ... diff --git a/roles/filetree_read/tasks/schedules.yml b/roles/filetree_read/tasks/schedules.yml index df13b9e6e..a86d4df9b 100644 --- a/roles/filetree_read/tasks/schedules.yml +++ b/roles/filetree_read/tasks/schedules.yml @@ -20,10 +20,12 @@ loop: "{{ __contents_filetree_controller_schedules.results }}" loop_control: loop_var: __populate_schedules_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_schedules.results is defined and __populate_schedules_list_item.ansible_facts.controller_schedules is defined - name: "Set Schedules Data Structure" ansible.builtin.set_fact: controller_schedules: "{{ __populate_controller_schedules }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_schedules is defined ... diff --git a/roles/filetree_read/tasks/settings.yml b/roles/filetree_read/tasks/settings.yml index 25978994f..0c850634d 100644 --- a/roles/filetree_read/tasks/settings.yml +++ b/roles/filetree_read/tasks/settings.yml @@ -20,6 +20,7 @@ loop: "{{ __contents_filetree_controller_settings.results }}" loop_control: loop_var: __populate_settings_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_settings.results is defined and __populate_settings_list_item.ansible_facts.controller_settings is defined - name: "Segregated Settings list when controller_location is defined" @@ -31,6 +32,7 @@ loop: "{{ __populate_controller_settings }}" loop_control: loop_var: __populate_settings_list_common_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: "__populate_settings_list_common_item.controller_location is not defined" - name: "Populate Settings list by __site objects" @@ -39,20 +41,24 @@ loop: "{{ __populate_controller_settings }}" loop_control: loop_var: __populate_settings_list_site_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: "__populate_settings_list_site_item.controller_location is defined and __populate_settings_list_site_item.controller_location == controller_location" - name: "Concatenate Settings list common + site" ansible.builtin.set_fact: __populate_controller_settings_total: "{{ __populate_controller_settings_common | default([]) + __populate_controller_settings_site }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_settings_site is defined - name: "Set Settings Data Structure common + site concatenated" ansible.builtin.set_fact: __populate_controller_settings: "{{ __populate_controller_settings_total }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_settings_total is defined - name: "Set Settings Data Structure" ansible.builtin.set_fact: controller_settings: "{{ __populate_controller_settings }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_settings is defined ... diff --git a/roles/filetree_read/tasks/teams.yml b/roles/filetree_read/tasks/teams.yml index 9a0a95776..3b9a62b35 100644 --- a/roles/filetree_read/tasks/teams.yml +++ b/roles/filetree_read/tasks/teams.yml @@ -20,10 +20,12 @@ loop: "{{ __contents_filetree_controller_teams.results }}" loop_control: loop_var: __populate_teams_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_teams.results is defined and __populate_teams_list_item.ansible_facts.controller_teams is defined - name: "Set Teams Data Structure" ansible.builtin.set_fact: controller_teams: "{{ __populate_controller_teams }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_teams is defined ... diff --git a/roles/filetree_read/tasks/user_accounts.yml b/roles/filetree_read/tasks/user_accounts.yml index b56a31132..22b21711c 100644 --- a/roles/filetree_read/tasks/user_accounts.yml +++ b/roles/filetree_read/tasks/user_accounts.yml @@ -20,6 +20,7 @@ loop: "{{ __contents_filetree_controller_user_accounts.results }}" loop_control: loop_var: __populate_user_accounts_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_user_accounts.results is defined and __populate_user_accounts_list_item.ansible_facts.controller_user_accounts is defined - name: "Set User Accounts Data Structure" diff --git a/roles/filetree_read/tasks/workflow_job_templates.yml b/roles/filetree_read/tasks/workflow_job_templates.yml index d65686abe..baab23c38 100644 --- a/roles/filetree_read/tasks/workflow_job_templates.yml +++ b/roles/filetree_read/tasks/workflow_job_templates.yml @@ -20,10 +20,12 @@ loop: "{{ __contents_filetree_controller_workflow_job_templates.results }}" loop_control: loop_var: __populate_credentials_list_item + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __contents_filetree_controller_workflow_job_templates.results is defined and __populate_credentials_list_item.ansible_facts.controller_workflows is defined - name: "Set Job Templates Data Structure" ansible.builtin.set_fact: controller_workflows: "{{ __populate_controller_workflow_job_templates }}" + no_log: "{{ controller_configuration_filetree_read_secure_logging }}" when: __populate_controller_workflow_job_templates is defined ... diff --git a/roles/object_diff/tasks/user_accounts.yml b/roles/object_diff/tasks/user_accounts.yml index 2b8d7ac03..0504bd4c1 100644 --- a/roles/object_diff/tasks/user_accounts.yml +++ b/roles/object_diff/tasks/user_accounts.yml @@ -22,10 +22,12 @@ - name: "Populate User Accounts list" ansible.builtin.set_fact: populate_controller_api_user_accounts_without_external_accounts: "{{ __controller_api_user_accounts | selectattr('external_account', 'none') | list }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Set User Accounts from API without External Accounts Data Structure" ansible.builtin.set_fact: __controller_api_user_accounts: "{{ populate_controller_api_user_accounts_without_external_accounts }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" when: populate_controller_api_user_accounts_without_external_accounts is defined - name: "User account differences (block)" @@ -38,8 +40,10 @@ api_list=__controller_api_user_accounts, compare_list=controller_user_accounts, with_present=false, set_absent=true) }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" - name: "Sets the difference of User Accounts between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: controller_user_accounts: "{{ __user_accounts_difference }}" + no_log: "{{ controller_configuration_object_diff_secure_logging }}" ... From cd4f0dfba715a07ffdf0aa1d36d19037b8283f46 Mon Sep 17 00:00:00 2001 From: adonisgarciac <71078987+adonisgarciac@users.noreply.github.com> Date: Thu, 9 Feb 2023 14:37:31 +0100 Subject: [PATCH 58/94] add defaulta variable for controller_configuration_filetree_read_secure_logging (#494) --- roles/filetree_read/defaults/main.yml | 1 + roles/object_diff/defaults/main.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/filetree_read/defaults/main.yml b/roles/filetree_read/defaults/main.yml index 3c54f4c28..e72a4ba1c 100644 --- a/roles/filetree_read/defaults/main.yml +++ b/roles/filetree_read/defaults/main.yml @@ -5,6 +5,7 @@ orgs: "Acme" dir_orgs_vars: orgs_vars env: dev +controller_configuration_filetree_read_secure_logging: "{{ controller_configuration_secure_logging | default(true) }}" # Controller lists diff --git a/roles/object_diff/defaults/main.yml b/roles/object_diff/defaults/main.yml index bc7e6e5ee..483b3c949 100644 --- a/roles/object_diff/defaults/main.yml +++ b/roles/object_diff/defaults/main.yml @@ -49,7 +49,7 @@ controller_configuration_object_diff_tasks: - {name: credential_types, var: controller_credential_types, tags: credential_types} - {name: organizations, var: controller_organizations, tags: organizations} -controller_configuration_object_diff_secure_logging: "{{ controller_configuration_secure_logging | default('false') }}" +controller_configuration_object_diff_secure_logging: "{{ controller_configuration_secure_logging | default(true) }}" controller_api_version: "v2" From 5eaec0965df84e52acb0deb002be042a8204d96b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 11 Feb 2023 09:35:39 -0500 Subject: [PATCH 59/94] Update pre-commit (#498) Co-authored-by: sean-m-sullivan --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 26de7ccd7..92f1cc826 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: # types: # - yaml - repo: 'https://github.com/ansible-community/ansible-lint.git' - rev: v6.12.1 + rev: v6.12.2 hooks: # see discussions here about what arguments are used, and behavior # https://github.com/ansible/ansible-lint/issues/649 From c4331d825a60d2b092e489c588b2013289831adc Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Mon, 13 Feb 2023 11:55:40 -0500 Subject: [PATCH 60/94] update linting and readme (#499) --- .ansible-lint | 2 +- README.md | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.ansible-lint b/.ansible-lint index a3bee52e4..b2eeee7f6 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -18,7 +18,7 @@ skip_list: # so a FQCN cannot be used in module names - fqcn[action] - fqcn[keyword] - - meta-unsupported-ansible # This collection with the appropriate awx.awx or ansible.controller still works with older ansible. + - meta-runtime # This collection with the appropriate awx.awx or ansible.controller still works with older ansible. kinds: - playbooks: "**/examples/templates/*.{yml,yaml}" - playbooks: "**/examples/*.{yml,yaml}" diff --git a/README.md b/README.md index 5bfb505c7..97bf21456 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,14 @@ A Template to use in order to start using the collections can be found [here](ht For details on changes between versions, please see [the changelog for this collection](CHANGELOG.rst). +## Releasing, Versioning and Deprecation + +This collection follows [Semantic Versioning](https://semver.org/). More details on versioning can be found [in the Ansible docs](https://docs.ansible.com/ansible/latest/dev_guide/developing_collections.html#collection-versions). + +We plan to regularly release new minor or bugfix versions once new features or bugfixes have been implemented. + +Releasing the current major version happens from the `devel` branch. + ## Roadmap Adding the ability to use direct output from the awx export command in the roles along with the current data model. From d9145f08cb0d21fc0ce5ae2bbfbbad2229a89b98 Mon Sep 17 00:00:00 2001 From: adonisgarciac <71078987+adonisgarciac@users.noreply.github.com> Date: Tue, 14 Feb 2023 21:27:21 +0100 Subject: [PATCH 61/94] #496 fix to omit labels if it is not defined (#500) --- roles/job_templates/tasks/main.yml | 2 +- roles/schedules/tasks/main.yml | 2 +- roles/workflow_job_templates/tasks/add_workflows_schema.yml | 2 +- roles/workflow_job_templates/tasks/main.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/job_templates/tasks/main.yml b/roles/job_templates/tasks/main.yml index d91400c35..3ac6f4292 100644 --- a/roles/job_templates/tasks/main.yml +++ b/roles/job_templates/tasks/main.yml @@ -52,7 +52,7 @@ webhook_service: "{{ __controller_template_item.webhook_service | default(omit, true) }}" webhook_credential: "{{ __controller_template_item.webhook_credential | default(omit, true) }}" scm_branch: "{{ __controller_template_item.scm_branch | default(omit, true) }}" - labels: "{{ __controller_template_item.labels | default(__controller_template_item.related.labels | default([]) | map(attribute='name') | list) | default(omit) }}" + labels: "{{ __controller_template_item.labels | default(__controller_template_item.related.labels | default([]) | map(attribute='name') | list if __controller_template_item.related.labels is defined else omit) }}" state: "{{ __controller_template_item.state | default(controller_state | default('present')) }}" notification_templates_started: "{{ __controller_template_item.notification_templates_started | default(__controller_template_item.related.notification_templates_started | default([]) | map(attribute='name') | list) | default(omit, true) }}" notification_templates_success: "{{ __controller_template_item.notification_templates_success | default(__controller_template_item.related.notification_templates_success | default([]) | map(attribute='name') | list) | default(omit, true) }}" diff --git a/roles/schedules/tasks/main.yml b/roles/schedules/tasks/main.yml index 7ecd557b7..4f9fd9192 100644 --- a/roles/schedules/tasks/main.yml +++ b/roles/schedules/tasks/main.yml @@ -13,7 +13,7 @@ forks: "{{ __controller_schedule_item.forks | default(omit, true) }}" instance_groups: "{{ __controller_schedule_item.instance_groups | default(omit, true) }}" job_slice_count: "{{ __controller_schedule_item.job_slice_count | default(omit, true) }}" - labels: "{{ __controller_schedule_item.labels | default(__controller_schedule_item.related.labels | default([]) | map(attribute='name') | list) | default(omit) }}" + labels: "{{ __controller_schedule_item.labels | default(__controller_schedule_item.related.labels | default([]) | map(attribute='name') | list if __controller_schedule_item.related.labels is defined else omit) }}" timeout: "{{ __controller_schedule_item.timeout | default(omit, true) }}" job_type: "{{ __controller_schedule_item.job_type | default(omit, true) }}" job_tags: "{{ __controller_schedule_item.job_tags | default(omit, true) }}" diff --git a/roles/workflow_job_templates/tasks/add_workflows_schema.yml b/roles/workflow_job_templates/tasks/add_workflows_schema.yml index e208b5e2d..86eb47cad 100644 --- a/roles/workflow_job_templates/tasks/add_workflows_schema.yml +++ b/roles/workflow_job_templates/tasks/add_workflows_schema.yml @@ -20,7 +20,7 @@ forks: "{{ __workflow_loop_node_item.forks | default(omit, true) }}" instance_groups: "{{ __workflow_loop_node_item.instance_groups | default(omit, true) }}" job_slice_count: "{{ __workflow_loop_node_item.job_slice_count | default(omit, true) }}" - labels: "{{ __workflow_loop_node_item.labels | default(__workflow_loop_node_item.related.labels | default([]) | map(attribute='name') | list) | default(omit) }}" + labels: "{{ __workflow_loop_node_item.labels | default(__workflow_loop_node_item.related.labels | default([]) | map(attribute='name') | list if __workflow_loop_node_item.related.labels is defined else omit) }}" timeout: "{{ __workflow_loop_node_item.timeout | default(omit, true) }}" approval_node: "{{ __workflow_loop_node_item.approval_node | default(omit, true) }}" workflow: "{{ __workflow_loop_item.name | mandatory }}" # Workflow job template name to associate with diff --git a/roles/workflow_job_templates/tasks/main.yml b/roles/workflow_job_templates/tasks/main.yml index 556175824..d2a05cd14 100644 --- a/roles/workflow_job_templates/tasks/main.yml +++ b/roles/workflow_job_templates/tasks/main.yml @@ -12,7 +12,7 @@ ask_variables_on_launch: "{{ __workflow_loop_item.ask_variables_on_launch | default(omit) }}" # only supported starting from Ansible 2.9 inventory: "{{ __workflow_loop_item.inventory.name | default(__workflow_loop_item.inventory | default(omit, true)) }}" limit: "{{ __workflow_loop_item.limit | default(omit, true) }}" - labels: "{{ __workflow_loop_item.labels | default(__workflow_loop_item.related.labels | default([]) | map(attribute='name') | list) | default(omit) }}" + labels: "{{ __workflow_loop_item.labels | default(__workflow_loop_item.related.labels | default([]) | map(attribute='name') | list if __workflow_loop_item.related.labels is defined else omit) }}" scm_branch: "{{ __workflow_loop_item.scm_branch | default(omit, true) }}" ask_inventory_on_launch: "{{ __workflow_loop_item.ask_inventory_on_launch | default(omit) }}" ask_scm_branch_on_launch: "{{ __workflow_loop_item.ask_scm_branch_on_launch | default(omit) }}" From 2aaf6e008e8e42da54884963fce38fc312876a1b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 16 Feb 2023 09:51:00 +0000 Subject: [PATCH 62/94] Update pre-commit (#502) Co-authored-by: sean-m-sullivan --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 92f1cc826..d1429aecc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: # types: # - yaml - repo: 'https://github.com/ansible-community/ansible-lint.git' - rev: v6.12.2 + rev: v6.13.0 hooks: # see discussions here about what arguments are used, and behavior # https://github.com/ansible/ansible-lint/issues/649 From 7b3ccf6ecf0e06959a8338fc23d00d6c1047404c Mon Sep 17 00:00:00 2001 From: Tom Page Date: Thu, 16 Feb 2023 15:56:12 +0000 Subject: [PATCH 63/94] Fix linting issues and set to warn on broken lint rule (#503) --- .ansible-lint | 4 ++++ .gitignore | 1 + roles/filetree_create/tests/filetree_create.yml | 3 ++- roles/filetree_read/tests/config-controller-filetree.yml | 3 ++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index b2eeee7f6..9029b269c 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -19,6 +19,10 @@ skip_list: - fqcn[action] - fqcn[keyword] - meta-runtime # This collection with the appropriate awx.awx or ansible.controller still works with older ansible. + - role-name[path] +warn_list: + - jinja[invalid] # Temporarily adding this due to https://github.com/ansible/ansible-lint/issues/3048 + - jinja[spacing] # Would be set to warn by default and the only flagged issues are fairly unfixable kinds: - playbooks: "**/examples/templates/*.{yml,yaml}" - playbooks: "**/examples/*.{yml,yaml}" diff --git a/.gitignore b/.gitignore index c15f1f7d9..6299c1d09 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ galaxy.yml *.tar.gz *.pyc id_rsa* +test diff --git a/roles/filetree_create/tests/filetree_create.yml b/roles/filetree_create/tests/filetree_create.yml index 398ee43c3..e54608a39 100644 --- a/roles/filetree_create/tests/filetree_create.yml +++ b/roles/filetree_create/tests/filetree_create.yml @@ -1,5 +1,6 @@ --- -- hosts: all +- name: Filetree Create Test + hosts: all connection: local gather_facts: false vars: diff --git a/roles/filetree_read/tests/config-controller-filetree.yml b/roles/filetree_read/tests/config-controller-filetree.yml index b3d10ac18..78cb7f172 100644 --- a/roles/filetree_read/tests/config-controller-filetree.yml +++ b/roles/filetree_read/tests/config-controller-filetree.yml @@ -1,5 +1,6 @@ --- -- hosts: all +- name: Filetree read test + hosts: all connection: local gather_facts: false vars: From def9aec2521132cd52c10458a4c5cb19321ba4ef Mon Sep 17 00:00:00 2001 From: adonisgarciac <71078987+adonisgarciac@users.noreply.github.com> Date: Thu, 16 Feb 2023 18:49:49 +0100 Subject: [PATCH 64/94] avoid to create orgs during drop_diff (#504) * avoid to create orgs during drop_diff * add changelog fragment --- changelogs/fragments/object_diff_role_and_plugin.yml | 1 + roles/object_diff/tasks/organizations.yml | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelogs/fragments/object_diff_role_and_plugin.yml b/changelogs/fragments/object_diff_role_and_plugin.yml index 4fbd39c17..44414e8cb 100644 --- a/changelogs/fragments/object_diff_role_and_plugin.yml +++ b/changelogs/fragments/object_diff_role_and_plugin.yml @@ -1,4 +1,5 @@ --- minor_changes: - "Add new type of objects for object_diff role: applications, execution environments, instance groups, notifications and schedules" + - "avoid to create orgs during drop_diff" ... diff --git a/roles/object_diff/tasks/organizations.yml b/roles/object_diff/tasks/organizations.yml index 79482b6c5..a3e987711 100644 --- a/roles/object_diff/tasks/organizations.yml +++ b/roles/object_diff/tasks/organizations.yml @@ -63,6 +63,5 @@ - name: "Set organization's list to be configured" ansible.builtin.set_fact: - controller_organizations: "{{ __controller_organizations }}" - when: __controller_organizations is defined + controller_organizations: "{{ __controller_organizations | default([]) }}" ... From 2f5136da815cc0c850b6dabc2a4ab4c33a5d9e82 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Mon, 20 Feb 2023 15:16:15 +0000 Subject: [PATCH 65/94] Fix linting issues and set to warn on broken lint rule (#508) * Fix linting issues and set to warn on broken lint rule * Remove global skip of jinja[spacing] rule and apply to tasks instead --- .ansible-lint | 1 - roles/filetree_create/tasks/users.yml | 2 +- roles/object_diff/tasks/roles.yml | 2 +- roles/object_diff/tasks/schedules.yml | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 9029b269c..7da1d96d3 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -22,7 +22,6 @@ skip_list: - role-name[path] warn_list: - jinja[invalid] # Temporarily adding this due to https://github.com/ansible/ansible-lint/issues/3048 - - jinja[spacing] # Would be set to warn by default and the only flagged issues are fairly unfixable kinds: - playbooks: "**/examples/templates/*.{yml,yaml}" - playbooks: "**/examples/*.{yml,yaml}" diff --git a/roles/filetree_create/tasks/users.yml b/roles/filetree_create/tasks/users.yml index bd3a0b8bd..e99566e2f 100644 --- a/roles/filetree_create/tasks/users.yml +++ b/roles/filetree_create/tasks/users.yml @@ -7,7 +7,7 @@ }}" no_log: "{{ controller_configuration_filetree_create_secure_logging }}" -- name: "Add the users the Organizations information" +- name: "Add the users the Organizations information" # noqa jinja[spacing] ansible.builtin.set_fact: current_users: "{{ (current_users | default([])) + [user_lookvar_item | combine({'organizations': user_lookvar_item_organizations})] }}" vars: diff --git a/roles/object_diff/tasks/roles.yml b/roles/object_diff/tasks/roles.yml index 8c10126ba..d17a5c6d6 100644 --- a/roles/object_diff/tasks/roles.yml +++ b/roles/object_diff/tasks/roles.yml @@ -12,7 +12,7 @@ - __controller_api_current_user_check_is_admin.is_superuser block: - - name: "Get the API list of all roles" + - name: "Get the API list of all roles" # noqa jinja[spacing] ansible.builtin.set_fact: __controller_api_roles: "{{ (__controller_api_roles | default([])) + [{ 'users': current_users, diff --git a/roles/object_diff/tasks/schedules.yml b/roles/object_diff/tasks/schedules.yml index a985251f3..110a3b77a 100644 --- a/roles/object_diff/tasks/schedules.yml +++ b/roles/object_diff/tasks/schedules.yml @@ -20,7 +20,7 @@ }}" -- name: "Get WF and JT IDs" +- name: "Get WF and JT IDs" # noqa jinja[spacing] ansible.builtin.set_fact: __controller_api_templates_ids: '{{ __controller_api_job_templates | selectattr("id", "defined") | map(attribute="id") | flatten | unique + __controller_api_workflow_job_templates | selectattr("id", "defined") | map(attribute="id") | flatten | unique }}' From ba0dd7e4878227800671bc96c441975c042f4257 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 24 Feb 2023 11:12:33 -0500 Subject: [PATCH 66/94] Update pre-commit (#514) Co-authored-by: sean-m-sullivan --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d1429aecc..8763053c4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: # types: # - yaml - repo: 'https://github.com/ansible-community/ansible-lint.git' - rev: v6.13.0 + rev: v6.14.0a0 hooks: # see discussions here about what arguments are used, and behavior # https://github.com/ansible/ansible-lint/issues/649 From 78ac33e6daf8d09bf0714fc445a593cf90a5a6ff Mon Sep 17 00:00:00 2001 From: Klaas Demter Date: Thu, 2 Mar 2023 18:09:43 +0100 Subject: [PATCH 67/94] Update inventory_source_update -- fix name of async status job (#520) * Update inventory_source_update -- fix name of async status job * Create i_s_u_title.yml --------- Co-authored-by: Tom Page --- changelogs/fragments/i_s_u_title.yml | 4 ++++ roles/inventory_source_update/tasks/main.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/i_s_u_title.yml diff --git a/changelogs/fragments/i_s_u_title.yml b/changelogs/fragments/i_s_u_title.yml new file mode 100644 index 000000000..fc631b35f --- /dev/null +++ b/changelogs/fragments/i_s_u_title.yml @@ -0,0 +1,4 @@ +--- +bugfixes: + - Fixed name of task for inventory source update +... diff --git a/roles/inventory_source_update/tasks/main.yml b/roles/inventory_source_update/tasks/main.yml index 66d11101e..dee6e34b2 100644 --- a/roles/inventory_source_update/tasks/main.yml +++ b/roles/inventory_source_update/tasks/main.yml @@ -30,7 +30,7 @@ vars: ansible_async_dir: '/tmp/.ansible_async' -- name: "Configure Inventory Source | Wait for finish the Inventory Source creation" +- name: "Controller inventory source update | Wait for finish of the inventory source update" ansible.builtin.async_status: jid: "{{ __inventory_source_update_async_results_item.ansible_job_id }}" register: __inventory_source_update_async_result From 08ccfd47612c7875e873494d0989c44cbe61699e Mon Sep 17 00:00:00 2001 From: David Danielsson Date: Fri, 3 Mar 2023 19:08:56 -0600 Subject: [PATCH 68/94] updating export readme (#522) * updating export readme * tweaking readme some more * fixing link --- EXPORT_README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EXPORT_README.md b/EXPORT_README.md index 407cce276..d02612d90 100644 --- a/EXPORT_README.md +++ b/EXPORT_README.md @@ -2,10 +2,12 @@ ## Description -This is documentation on how to use a the Automation Controller export commands in development. +This is documentation on how to use a the Automation Controller export commands in development. You can also look at the [filetree_create](roles/filetree_create/README.md) role as another method to export data. 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. + ## Installation ```console From 9239cf411d739f2669720e8d3aed5e1cb084f216 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 6 Mar 2023 13:40:38 +0000 Subject: [PATCH 69/94] Update pre-commit (#523) Co-authored-by: sean-m-sullivan --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8763053c4..9bc1614c9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: # types: # - yaml - repo: 'https://github.com/ansible-community/ansible-lint.git' - rev: v6.14.0a0 + rev: v6.14.0 hooks: # see discussions here about what arguments are used, and behavior # https://github.com/ansible/ansible-lint/issues/649 From 9630a78aa240969698649957b4bae403395251f4 Mon Sep 17 00:00:00 2001 From: Eric L Date: Wed, 8 Mar 2023 03:56:23 +0100 Subject: [PATCH 70/94] Fix title of dispatch role in readme (#524) --- roles/dispatch/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/dispatch/README.md b/roles/dispatch/README.md index 58e198111..03ba1d975 100644 --- a/roles/dispatch/README.md +++ b/roles/dispatch/README.md @@ -1,4 +1,4 @@ -# controller_configuration.projects +# controller_configuration.dispatch ## Description From d49b47840307cf069cece9d41f80623bb9a2a08f Mon Sep 17 00:00:00 2001 From: Eric L Date: Wed, 8 Mar 2023 04:00:32 +0100 Subject: [PATCH 71/94] Avoid double pipeline on PRs (#525) I got annoyed by unstable pipelines running twice on each PR. The changes should make sure that the pipeline only triggers on very specific pushes. The devel branch is anyway protected so that it can only be modified by pull requests --- .github/workflows/ci_testing.yaml | 10 +++++++++- .github/workflows/pre-commit.yml | 8 +++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_testing.yaml b/.github/workflows/ci_testing.yaml index c8665f897..6352e43f2 100644 --- a/.github/workflows/ci_testing.yaml +++ b/.github/workflows/ci_testing.yaml @@ -1,6 +1,14 @@ --- name: Run Test Playbooks on AWX workflow -on: [push, pull_request] +on: + push: + branches: ['*_'] + tags: + - '*_' # ending underscore for trying things + - 'v[0-9]+.[0-9]+.[0-9]+' # final version + - 'v[0-9]+.[0-9]+.[0-9]+[abrc]+[0-9]+' # alpha, beta, release candidate (rc) + - 'v[0-9]+.[0-9]+.[0-9]+.dev[0-9]+' # development versions + pull_request: jobs: Integration-test: diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 7a4449e6d..c7be37791 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -5,8 +5,14 @@ name: pre-commit tests on: - pull_request: push: + branches: ['*_'] + tags: + - '*_' # ending underscore for trying things + - 'v[0-9]+.[0-9]+.[0-9]+' # final version + - 'v[0-9]+.[0-9]+.[0-9]+[abrc]+[0-9]+' # alpha, beta, release candidate (rc) + - 'v[0-9]+.[0-9]+.[0-9]+.dev[0-9]+' # development versions + pull_request: schedule: - cron: "0 6 * * *" From 511a5664c7dbaf0cbe2b32aa0bd75739ed78d2a2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 7 Mar 2023 22:06:48 -0500 Subject: [PATCH 72/94] Update pre-commit (#527) Co-authored-by: sean-m-sullivan --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9bc1614c9..9e8252b4c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: # types: # - yaml - repo: 'https://github.com/ansible-community/ansible-lint.git' - rev: v6.14.0 + rev: v6.14.1 hooks: # see discussions here about what arguments are used, and behavior # https://github.com/ansible/ansible-lint/issues/649 From 020326ffa89fdfc8f8baae53e9f9ce8aaab10c35 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 8 Mar 2023 13:50:39 +0000 Subject: [PATCH 73/94] Add back in broken linting rule (#515) * Add back in broken linting rile * Add in undefined variable --- .ansible-lint | 2 -- roles/filetree_create/README.md | 9 +++++---- roles/filetree_create/defaults/main.yml | 3 +++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 7da1d96d3..506390966 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -20,8 +20,6 @@ skip_list: - fqcn[keyword] - meta-runtime # This collection with the appropriate awx.awx or ansible.controller still works with older ansible. - role-name[path] -warn_list: - - jinja[invalid] # Temporarily adding this due to https://github.com/ansible/ansible-lint/issues/3048 kinds: - playbooks: "**/examples/templates/*.{yml,yaml}" - playbooks: "**/examples/*.{yml,yaml}" diff --git a/roles/filetree_create/README.md b/roles/filetree_create/README.md index 74036fa10..293b225a9 100644 --- a/roles/filetree_create/README.md +++ b/roles/filetree_create/README.md @@ -12,10 +12,11 @@ That role requires the following: The following variables are required for that role to work properly: -| Variable Name | Default Value | Required | Description | -| :------------ | :-----------: | :------: | :---------- | -| `controller_api_plugin` | `ansible.controller` | yes | Full path for the controller_api_plugin to be used.
Can have two possible values:
  - awx.awx.controller_api # For the community Collection version
  - ansible.controller.controller_api # For the Red Hat Certified Collection version| -| `output_path` | `/tmp/filetree_output` | yes | The path to the output directory where all the generated `yaml` files with the corresponding Objects as code will be written to. | +| Variable Name | Default Value | Required | Type | Description | +| :------------ | :-----------: | :------: | :------: | :---------- | +| `controller_api_plugin` | `ansible.controller` | yes | str | Full path for the controller_api_plugin to be used.
Can have two possible values:
  - awx.awx.controller_api # For the community Collection version
  - ansible.controller.controller_api # For the Red Hat Certified Collection version| +| `output_path` | `/tmp/filetree_output` | yes | str | The path to the output directory where all the generated `yaml` files with the corresponding Objects as code will be written to. | +| `input_tag` | `['all']` | no | bool | The tags which are applied to the 'sub-roles'. If 'all' is in the list (the default value) then all roles will be called. | ## Dependencies diff --git a/roles/filetree_create/defaults/main.yml b/roles/filetree_create/defaults/main.yml index 87a192b92..1e13a6a36 100644 --- a/roles/filetree_create/defaults/main.yml +++ b/roles/filetree_create/defaults/main.yml @@ -25,4 +25,7 @@ query_controller_api_max_objects: 10000 controller_configuration_filetree_create_secure_logging: "{{ controller_configuration_secure_logging | default('false') }}" +input_tag: + - all + ... From a61220876668f442e050e11611b43ae225bc0f58 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 8 Mar 2023 14:01:22 +0000 Subject: [PATCH 74/94] Update pre-commit.yml (#528) * Update pre-commit.yml * Update pre-commit.yml --- .github/workflows/pre-commit.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index c7be37791..bbd006730 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -6,7 +6,9 @@ name: pre-commit tests on: push: - branches: ['*_'] + branches: + - '*_' # ending underscore for trying things + - devel tags: - '*_' # ending underscore for trying things - 'v[0-9]+.[0-9]+.[0-9]+' # final version From 1fddb3eac466212791ccc8fee1e17d5e50174761 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 8 Mar 2023 14:16:59 +0000 Subject: [PATCH 75/94] Precommit on main (#532) * Update pre-commit.yml * Update pre-commit.yml * Update ci_testing.yaml * Update pre-commit.yml --- .github/workflows/ci_testing.yaml | 4 +++- .github/workflows/pre-commit.yml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_testing.yaml b/.github/workflows/ci_testing.yaml index 6352e43f2..c186ce76a 100644 --- a/.github/workflows/ci_testing.yaml +++ b/.github/workflows/ci_testing.yaml @@ -2,7 +2,9 @@ name: Run Test Playbooks on AWX workflow on: push: - branches: ['*_'] + branches: + - '*_' + - devel tags: - '*_' # ending underscore for trying things - 'v[0-9]+.[0-9]+.[0-9]+' # final version diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index bbd006730..65d7309c2 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -8,7 +8,7 @@ on: push: branches: - '*_' # ending underscore for trying things - - devel + - devel tags: - '*_' # ending underscore for trying things - 'v[0-9]+.[0-9]+.[0-9]+' # final version From ebf7b631c4ef1f4dbd15b685158065dff91f01bc Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Wed, 8 Mar 2023 09:38:20 -0500 Subject: [PATCH 76/94] fix empty inventories (#529) --- .../tests/configs_export_model/workflows.yml | 54 +++---------------- 1 file changed, 7 insertions(+), 47 deletions(-) diff --git a/.github/tests/configs_export_model/workflows.yml b/.github/tests/configs_export_model/workflows.yml index 890bf2166..2ad0680d9 100644 --- a/.github/tests/configs_export_model/workflows.yml +++ b/.github/tests/configs_export_model/workflows.yml @@ -7,7 +7,6 @@ controller_workflows: survey_enabled: true allow_simultaneous: false ask_variables_on_launch: false - inventory: limit: scm_branch: ask_inventory_on_launch: false @@ -24,12 +23,7 @@ controller_workflows: name: Default type: organization workflow_nodes: - - inventory: - scm_branch: - job_tags: - skip_tags: - limit: - all_parents_must_converge: false + - all_parents_must_converge: false identifier: d9779889-cfdb-4a8c-8a11-1f54acf84aca workflow_job_template: organization: @@ -76,12 +70,7 @@ controller_workflows: type: workflow_job_template identifier: d9779889-cfdb-4a8c-8a11-1f54acf84aca type: workflow_job_template_node - - inventory: - scm_branch: - job_tags: - skip_tags: - limit: - all_parents_must_converge: false + - all_parents_must_converge: false identifier: f82f1c5f-c3b5-4bc4-9e1a-d8cd1ab44c44 workflow_job_template: organization: @@ -125,12 +114,7 @@ controller_workflows: type: workflow_job_template identifier: f82f1c5f-c3b5-4bc4-9e1a-d8cd1ab44c44 type: workflow_job_template_node - - inventory: - scm_branch: - job_tags: - skip_tags: - limit: - all_parents_must_converge: false + - all_parents_must_converge: false identifier: 28910097-e606-4252-8aa9-2c1a0b8b6c92 workflow_job_template: organization: @@ -158,12 +142,7 @@ controller_workflows: type: workflow_job_template identifier: 28910097-e606-4252-8aa9-2c1a0b8b6c92 type: workflow_job_template_node - - inventory: - scm_branch: - job_tags: - skip_tags: - limit: - all_parents_must_converge: true + - all_parents_must_converge: true identifier: ca7ffc3b-8401-4153-83bf-bb3dd918ca87 workflow_job_template: organization: @@ -191,12 +170,7 @@ controller_workflows: type: workflow_job_template identifier: ca7ffc3b-8401-4153-83bf-bb3dd918ca87 type: workflow_job_template_node - - inventory: - scm_branch: - job_tags: - skip_tags: - limit: - all_parents_must_converge: false + - all_parents_must_converge: false identifier: 046378e5-ff53-4168-afc2-a82d87327099 workflow_job_template: organization: @@ -295,9 +269,6 @@ controller_workflows: state: present allow_simultaneous: false ask_variables_on_launch: false - inventory: - limit: - scm_branch: ask_inventory_on_launch: false ask_scm_branch_on_launch: false ask_limit_on_launch: false @@ -308,12 +279,7 @@ controller_workflows: schedules: [] labels: [] workflow_nodes: - - inventory: - scm_branch: - job_tags: - skip_tags: - limit: - all_parents_must_converge: false + - all_parents_must_converge: false identifier: d9779889-cfdb-4a8c-8a11-1f54acf84aca workflow_job_template: organization: @@ -352,13 +318,7 @@ controller_workflows: type: workflow_job_template identifier: d9779889-cfdb-4a8c-8a11-1f54acf84aca type: workflow_job_template_node - - extra_data: {} - inventory: - scm_branch: - job_tags: - skip_tags: - limit: - all_parents_must_converge: false + - all_parents_must_converge: false identifier: f82f1c5f-c3b5-4bc4-9e1a-d8cd1ab44c44 workflow_job_template: organization: From 9b3170c3609c44c7d6ace987d410debe7be13ff6 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 8 Mar 2023 15:08:03 +0000 Subject: [PATCH 77/94] Add argument specs for roles, remove master template role and update readmes (#511) * Add argument specs for roles, remove master template role and update readmes * Fix arg_spec error * Fix arg specs * Fix settings argspec * remove default:None from argspec * Fix CI objects failing arg validation * fix inventories argspec * Add unused options * Add unused options * fix schedule argspec * Don't include extra illegal options in ad_hoc_cancel * Remove incorrect argspec * Remove options from each role's argspec so extra unused values can be provided * Fix filtering of vars --------- Co-authored-by: Sean Sullivan --- .github/tests/configs/projects.yml | 4 +- .github/tests/configure_controller.yml | 8 +- .github/tests/tasks/ad_hoc_cancel.yml | 2 +- changelogs/fragments/arg_spec.yml | 6 + roles/ad_hoc_command/README.md | 2 +- roles/ad_hoc_command/meta/argument_specs.yml | 120 ++++++ roles/ad_hoc_command_cancel/README.md | 10 +- .../meta/argument_specs.yml | 74 ++++ roles/applications/meta/argument_specs.yml | 110 ++++++ roles/credential_input_sources/README.md | 6 +- .../meta/argument_specs.yml | 99 +++++ .../credential_types/meta/argument_specs.yml | 107 ++++++ roles/credentials/meta/argument_specs.yml | 120 ++++++ roles/execution_environments/README.md | 2 +- .../meta/argument_specs.yml | 108 ++++++ roles/groups/README.md | 22 +- roles/groups/meta/argument_specs.yml | 119 ++++++ roles/hosts/meta/argument_specs.yml | 104 ++++++ roles/instance_groups/meta/argument_specs.yml | 128 +++++++ roles/instances/meta/argument_specs.yml | 104 ++++++ roles/inventories/README.md | 24 +- roles/inventories/meta/argument_specs.yml | 122 +++++++ .../meta/argument_specs.yml | 198 ++++++++++ .../inventory_sources/meta/argument_specs.yml | 198 ++++++++++ roles/job_launch/README.md | 2 +- roles/job_launch/meta/argument_specs.yml | 147 ++++++++ roles/job_templates/meta/argument_specs.yml | 313 ++++++++++++++++ roles/jobs_cancel/README.md | 2 +- roles/jobs_cancel/meta/argument_specs.yml | 64 ++++ roles/labels/README.md | 12 +- roles/labels/meta/argument_specs.yml | 91 +++++ roles/license/meta/argument_specs.yml | 93 +++++ roles/master_role_example/README.md | 113 ------ roles/master_role_example/defaults/main.yml | 5 - roles/master_role_example/meta/main.yml | 46 --- roles/master_role_example/tasks/main.yml | 43 --- .../tests/config/extra_vars.yml | 8 - roles/master_role_example/tests/test.yml | 23 -- .../meta/argument_specs.yml | 111 ++++++ roles/organizations/README.md | 32 +- roles/organizations/meta/argument_specs.yml | 139 +++++++ roles/project_update/README.md | 2 +- roles/project_update/meta/argument_specs.yml | 186 ++++++++++ roles/projects/README.md | 84 ++--- roles/projects/meta/argument_specs.yml | 195 ++++++++++ roles/roles/meta/argument_specs.yml | 158 ++++++++ roles/schedules/meta/argument_specs.yml | 180 +++++++++ roles/settings/meta/argument_specs.yml | 86 +++++ roles/teams/meta/argument_specs.yml | 95 +++++ roles/users/README.md | 4 +- roles/users/meta/argument_specs.yml | 124 +++++++ .../meta/argument_specs.yml | 341 ++++++++++++++++++ roles/workflow_launch/meta/argument_specs.yml | 110 ++++++ 53 files changed, 4263 insertions(+), 343 deletions(-) create mode 100644 changelogs/fragments/arg_spec.yml create mode 100644 roles/ad_hoc_command/meta/argument_specs.yml create mode 100644 roles/ad_hoc_command_cancel/meta/argument_specs.yml create mode 100644 roles/applications/meta/argument_specs.yml create mode 100644 roles/credential_input_sources/meta/argument_specs.yml create mode 100644 roles/credential_types/meta/argument_specs.yml create mode 100644 roles/credentials/meta/argument_specs.yml create mode 100644 roles/execution_environments/meta/argument_specs.yml create mode 100644 roles/groups/meta/argument_specs.yml create mode 100644 roles/hosts/meta/argument_specs.yml create mode 100644 roles/instance_groups/meta/argument_specs.yml create mode 100644 roles/instances/meta/argument_specs.yml create mode 100644 roles/inventories/meta/argument_specs.yml create mode 100644 roles/inventory_source_update/meta/argument_specs.yml create mode 100644 roles/inventory_sources/meta/argument_specs.yml create mode 100644 roles/job_launch/meta/argument_specs.yml create mode 100644 roles/job_templates/meta/argument_specs.yml create mode 100644 roles/jobs_cancel/meta/argument_specs.yml create mode 100644 roles/labels/meta/argument_specs.yml create mode 100644 roles/license/meta/argument_specs.yml delete mode 100644 roles/master_role_example/README.md delete mode 100644 roles/master_role_example/defaults/main.yml delete mode 100644 roles/master_role_example/meta/main.yml delete mode 100644 roles/master_role_example/tasks/main.yml delete mode 100644 roles/master_role_example/tests/config/extra_vars.yml delete mode 100644 roles/master_role_example/tests/test.yml create mode 100644 roles/notification_templates/meta/argument_specs.yml create mode 100644 roles/organizations/meta/argument_specs.yml create mode 100644 roles/project_update/meta/argument_specs.yml create mode 100644 roles/projects/meta/argument_specs.yml create mode 100644 roles/roles/meta/argument_specs.yml create mode 100644 roles/schedules/meta/argument_specs.yml create mode 100644 roles/settings/meta/argument_specs.yml create mode 100644 roles/teams/meta/argument_specs.yml create mode 100644 roles/users/meta/argument_specs.yml create mode 100644 roles/workflow_job_templates/meta/argument_specs.yml create mode 100644 roles/workflow_launch/meta/argument_specs.yml diff --git a/.github/tests/configs/projects.yml b/.github/tests/configs/projects.yml index bf1b37d9f..c4d0a730c 100644 --- a/.github/tests/configs/projects.yml +++ b/.github/tests/configs/projects.yml @@ -10,7 +10,7 @@ controller_projects: description: Test Project 1 organization: Default wait: true - update: true + update_project: true - name: Demo Project scm_type: git scm_url: https://github.com/ansible/tower-example.git @@ -19,7 +19,7 @@ controller_projects: description: Test Project 1 organization: Default wait: true - update: true + update_project: true - name: Test Project 2 scm_type: git scm_url: https://github.com/ansible/ansible-examples.git diff --git a/.github/tests/configure_controller.yml b/.github/tests/configure_controller.yml index d06709fa4..b7c990f5c 100644 --- a/.github/tests/configure_controller.yml +++ b/.github/tests/configure_controller.yml @@ -95,11 +95,17 @@ ansible.builtin.debug: var: launched_controller_jobs + - name: Combine id output with defaults temp + ansible.builtin.set_fact: + tmp_job: "{{ {'id': item.id} }}" + with_items: "{{ launched_controller_jobs.results }}" + register: tmp_jobs + - name: Cancel Controller Jobs ansible.builtin.include_role: name: jobs_cancel vars: - controller_cancel_jobs: "{{ launched_controller_jobs.results }}" + controller_cancel_jobs: "{{ tmp_jobs.results | map(attribute='ansible_facts.tmp_job') | list }}" when: launched_controller_jobs is defined - name: Launch Controller workflows diff --git a/.github/tests/tasks/ad_hoc_cancel.yml b/.github/tests/tasks/ad_hoc_cancel.yml index 47ec7916a..49a05f3bf 100644 --- a/.github/tests/tasks/ad_hoc_cancel.yml +++ b/.github/tests/tasks/ad_hoc_cancel.yml @@ -1,7 +1,7 @@ --- - name: Combine id output with defaults temp ansible.builtin.set_fact: - tmp_ad_hoc: "{{ item | combine(controller_ad_hoc_command_defaults) }}" + tmp_ad_hoc: "{{ {'id': item.id} | combine(controller_ad_hoc_command_defaults) }}" with_items: "{{ controller_ad_hoc_commands_output.results }}" register: tmp_ad_hocs diff --git a/changelogs/fragments/arg_spec.yml b/changelogs/fragments/arg_spec.yml new file mode 100644 index 000000000..39b7d144b --- /dev/null +++ b/changelogs/fragments/arg_spec.yml @@ -0,0 +1,6 @@ +--- +bugfixes: + - Removed master_role_example as no longer required (this wasn't a functional role) + - Added argument_spec for all roles + - Fixed variable definitions in readmes +... diff --git a/roles/ad_hoc_command/README.md b/roles/ad_hoc_command/README.md index e137ebe9c..1df306b23 100644 --- a/roles/ad_hoc_command/README.md +++ b/roles/ad_hoc_command/README.md @@ -45,7 +45,7 @@ controller_configuration_ad_hoc_command_secure_logging defaults to the value of |Variable Name|Default Value|Required|Type|Description| |:---:|:---:|:---:|:---:|:---:| |`job_type`|"run"|no|str|Job_type to use for the ad hoc command. Either run or check.| -|`inventory`|""|str|yes|Inventory to use for the ad hoc command.| +|`inventory`|""|yes|str|Inventory to use for the ad hoc command.| |`limit`|`False`|no|str|Limit to use for the ad hoc command.| |`credential`|""|yes|str|Credential to use for ad hoc command.| |`execution_environment`|""|no|str|Execution Environment to use for ad hoc command.| diff --git a/roles/ad_hoc_command/meta/argument_specs.yml b/roles/ad_hoc_command/meta/argument_specs.yml new file mode 100644 index 000000000..c2260a2d9 --- /dev/null +++ b/roles/ad_hoc_command/meta/argument_specs.yml @@ -0,0 +1,120 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to run a list of ad hoc commands on Ansible Controller. + options: + controller_ad_hoc_commands: + description: Data structure describing your ad hoc commands to run + type: list + elements: dict + # options: + # job_type: + # default: run + # required: false + # type: str + # description: Job_type to use for the ad hoc command. Either run or check. + # inventory: + # required: true + # type: str + # description: Inventory to use for the ad hoc command. + # limit: + # required: false + # type: str + # description: Limit to use for the ad hoc command. + # credential: + # required: true + # type: str + # description: Credential to use for ad hoc command. + # execution_environment: + # required: false + # type: str + # description: Execution Environment to use for ad hoc command. + # module_name: + # required: true + # type: str + # description: The Ansible module to execute. + # module_args: + # required: false + # type: str + # description: The arguments to pass to the module. + # forks: + # default: 0 + # required: false + # type: int + # description: The number of forks to use for this ad hoc execution. + # verbosity: + # default: 0 + # required: false + # type: int + # description: Verbosity level for this ad hoc command run + # extra_vars: + # required: false + # type: dict + # description: Extra variables to use for the ad hoc command. + # become_enabled: + # required: false + # type: bool + # description: If the become flag should be set. + # diff_mode: + # required: false + # type: bool + # description: Show the changes made by Ansible tasks where supported + # wait: + # default: false + # required: false + # type: bool + # description: Wait for the command to complete. + # interval: + # default: 2 + # required: false + # type: int + # description: The interval to request an update from controller. + # timeout: + # required: false + # type: int + # description: If waiting for the command to complete this will abort after this amount of seconds. + + # No_log variables + controller_configuration_ad_hoc_command_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or not to include the sensitive ad_hoc_command role tasks in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or not to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/ad_hoc_command_cancel/README.md b/roles/ad_hoc_command_cancel/README.md index 561b83298..a9f2fc94b 100644 --- a/roles/ad_hoc_command_cancel/README.md +++ b/roles/ad_hoc_command_cancel/README.md @@ -35,7 +35,7 @@ controller_configuration_ad_hoc_command_secure_logging defaults to the value of |Variable Name|Default Value|Required|Description| |:---:|:---:|:---:|:---:| -|`controller_configuration_ad_hoc_command_secure_logging`|`False`|no|Whether or not to include the sensitive ad_hoc_command role tasks in the log. Set this value to `True` if you will be providing your sensitive values from elsewhere.| +|`controller_configuration_ad_hoc_command_cancel_secure_logging`|`False`|no|Whether or not to include the sensitive ad_hoc_command_cancel role tasks in the log. Set this value to `True` if you will be providing your sensitive values from elsewhere.| |`controller_configuration_secure_logging`|`False`|no|This variable enables secure logging as well, but is shared across multiple roles, see above.| ## Data Structure @@ -44,10 +44,10 @@ controller_configuration_ad_hoc_command_secure_logging defaults to the value of |Variable Name|Default Value|Required|Type|Description| |:---:|:---:|:---:|:---:|:---:| -|`id`|""|no|int|ID of the command to cancel Recommended to be in a separate list of ID's see example, defaults to output of ad_hoc_command_role of controller_ad_hoc_commands_output.| -|`fail_if_not_running`|""|no|bool|Fail loudly if the I(command_id) can not be canceled.| -|`interval`|2|no|int|Limit to use for the ad hoc command.| -|`timeout`|""|yes|int|Credential to use for ad hoc command.| +|`id`|""|yes|int|ID of the command to cancel Recommended to be in a separate list of ID's see example, defaults to output of ad_hoc_command_role of controller_ad_hoc_commands_output.| +|`fail_if_not_running`|`False`|no|bool|Fail loudly if the I(command_id) can not be canceled.| +|`interval`|1|no|int|The interval in seconds, to request an update from.| +|`timeout`|0|no|int|Maximum time in seconds to wait for a job to finish, 0 means wait until it is finished regardless.| ### Standard Project Data Structure diff --git a/roles/ad_hoc_command_cancel/meta/argument_specs.yml b/roles/ad_hoc_command_cancel/meta/argument_specs.yml new file mode 100644 index 000000000..55d0d6abc --- /dev/null +++ b/roles/ad_hoc_command_cancel/meta/argument_specs.yml @@ -0,0 +1,74 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to cancel a list of ad hoc commands on Ansible Controller. + options: + controller_ad_hoc_commands_cancel: + description: Data structure describing your ad hoc jobs to cancel + type: list + elements: dict + # options: + # id: + # required: true + # type: int + # description: ID of the command to cancel + # fail_if_not_running: + # default: false + # required: false + # type: bool + # description: Fail loudly if the command can not be canceled. + # interval: + # default: 0 + # required: false + # type: int + # description: The interval in seconds, to request an update from. + # timeout: + # default: 0 + # required: false + # type: int + # description: Maximum time in seconds to wait for a job to finish, 0 means wait until it is finished regardless. + + # No_log variables + controller_configuration_ad_hoc_command_cancel_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or not to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/applications/meta/argument_specs.yml b/roles/applications/meta/argument_specs.yml new file mode 100644 index 000000000..9e8b5dd5a --- /dev/null +++ b/roles/applications/meta/argument_specs.yml @@ -0,0 +1,110 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create Applications on Ansible Controller. + options: + controller_applications: + description: Data structure describing your applications + type: list + elements: dict + # options: + # name: + # required: true + # type: str + # description: Name of application + # organization: + # required: true + # type: str + # description: Name of the organization for the application + # description: + # required: false + # type: str + # description: Description to use for the application. + # authorization_grant_type: + # default: password + # required: false + # type: str + # description: Grant type for tokens in this application, "password" or "authorization-code" + # client_type: + # default: public + # required: false + # type: str + # description: Application client type, "confidential" or "public" + # redirect_uris: + # required: false + # type: str + # description: Allowed urls list, space separated. Required with "authorization-code" grant type + # skip_authorization: + # default: false + # required: false + # type: bool + # description: Set True to skip authorization step for completely trusted applications. + # state: + # default: "{{ controller_state | default('present') }}" + # required: false + # type: str + # description: Desired state of the application. + + # Async variables + controller_configuration_applications_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_applications_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_applications_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/credential_input_sources/README.md b/roles/credential_input_sources/README.md index 110fa6da1..c77127f83 100644 --- a/roles/credential_input_sources/README.md +++ b/roles/credential_input_sources/README.md @@ -60,9 +60,9 @@ This also speeds up the overall role. |:---:|:---:|:---:|:---:|:---:| |`target_credential`|""|yes|str|Name of credential to have the input source applied| |`input_field_name`|""|yes|str|Name of field which will be written by the input source| -|`source_credential`|""|str|no|Name of the source credential which points to a credential source| -|`metadata`|""|str|no|The metadata applied to the source.| -|`description`|`False`|no|str|Description to use for the credential input source.| +|`source_credential`|""|no|str|Name of the source credential which points to a credential source| +|`metadata`|""|no|dict|The metadata applied to the source.| +|`description`|""|no|str|Description to use for the credential input source.| |`state`|`present`|no|str|Desired state of the resource.| For further details on fields see diff --git a/roles/credential_input_sources/meta/argument_specs.yml b/roles/credential_input_sources/meta/argument_specs.yml new file mode 100644 index 000000000..f268102f5 --- /dev/null +++ b/roles/credential_input_sources/meta/argument_specs.yml @@ -0,0 +1,99 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create Credential Input Sources on Ansible Controller. + options: + controller_credential_input_sources: + description: Data structure describing your credential_input_sources + type: list + elements: dict + # options: + # target_credential: + # required: true + # type: str + # description: Name of credential to have the input source applied + # input_field_name: + # required: true + # type: str + # description: Name of field which will be written by the input source + # source_credential: + # required: false + # type: str + # description: Name of the source credential which points to a credential source + # metadata: + # required: false + # type: dict + # description: The metadata applied to the source. + # description: + # required: false + # type: str + # description: Description to use for the credential input source. + # state: + # default: "{{ controller_state | default('present') }}" + # required: false + # type: str + # description: Desired state of the resource. + + # Async variables + controller_configuration_credential_input_sources_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_credential_input_sources_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_credential_input_sources_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/credential_types/meta/argument_specs.yml b/roles/credential_types/meta/argument_specs.yml new file mode 100644 index 000000000..72afa739d --- /dev/null +++ b/roles/credential_types/meta/argument_specs.yml @@ -0,0 +1,107 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create credential types on Ansible Controller. + options: + controller_credential_types: + description: Data structure describing your credential_types + type: list + elements: dict + # options: + # name: + # type: str + # required: true + # description: Name of Credential Type + # description: + # type: str + # required: false + # description: The description of the credential type to give more detail about it. + # injectors: + # type: dict + # required: false + # description: Enter injectors using either JSON or YAML syntax. Refer to the Ansible controller documentation for example syntax. See below on proper formatting. + # inputs: + # type: dict + # required: false + # description: Enter inputs using either JSON or YAML syntax. Refer to the Ansible controller documentation for example syntax. + # kind: + # default: cloud + # type: str + # required: false + # choices: + # - 'ssh' + # - 'vault' + # - 'net' + # - 'scm' + # - 'cloud' + # - 'insights' + # description: The type of credential type being added. Note that only cloud and net can be used for creating credential types. + # state: + # default: "{{ controller_state | default('present') }}" + # type: str + # required: false + # description: Desired state of the resource. + + # Async variables + controller_configuration_credential_types_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_credential_types_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_credential_types_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/credentials/meta/argument_specs.yml b/roles/credentials/meta/argument_specs.yml new file mode 100644 index 000000000..6ba3ba148 --- /dev/null +++ b/roles/credentials/meta/argument_specs.yml @@ -0,0 +1,120 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create credentials on Ansible Controller. + options: + controller_credentials: + description: Data structure describing your credentials + type: list + elements: dict + # options: + # name: + # type: str + # required: true + # description: Name of Credential + # description: + # type: str + # required: false + # description: The description of the credential to give more detail about it. + # new_name: + # type: str + # required: false + # description: Setting this option will change the existing name (looked up via the name field). + # copy_from: + # type: str + # required: false + # description: Name or id to copy the credential from. This will copy an existing credential and change any parameters supplied. + # organization: + # type: str + # required: false + # description: Organization this Credential belongs to. If provided on creation, do not give either user or team. + # credential_type: + # type: str + # required: false + # description: Name of credential type. See below for list of options. More information in Ansible controller documentation. + # inputs: + # type: dict + # required: false + # description: Credential inputs where the keys are var names used in templating. Refer to the Ansible controller documentation for example syntax. Individual examples can be found at /api/v2/credential_types/ on an controller. + # user: + # type: str + # required: false + # description: User that should own this credential. If provided, do not give either team or organization. + # team: + # type: str + # required: false + # description: Team that should own this credential. If provided, do not give either user or organization. + # update_secrets: + # default: true + # type: bool + # required: false + # description: True will always change password if user specifies password, even if API gives $encrypted$ for password. False will only set the password if other values change too. + # state: + # default: "{{ controller_state | default('present') }}" + # type: str + # required: false + # description: Desired state of the resource. + + # Async variables + controller_configuration_credentials_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_credentials_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_credentials_secure_logging: + default: "{{ controller_configuration_secure_logging | default(true) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_configuration_secure_logging: + default: true + required: false + type: bool + description: This variable enables secure logging across all roles as a default. + + # Generic across all roles + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/execution_environments/README.md b/roles/execution_environments/README.md index 95a182b55..ac44593f5 100644 --- a/roles/execution_environments/README.md +++ b/roles/execution_environments/README.md @@ -58,7 +58,7 @@ This also speeds up the overall role. |Variable Name|Default Value|Required|Type|Description| |:---:|:---:|:---:|:---:|:---:| -|`name`|""|yes|str|Name of Job Template| +|`name`|""|yes|str|Name of execution environment| |`description`|""|no|str|Description to use for the execution environment.| |`image`|""|yes|str|Container image to use for the execution environment| |`organization`|""|no|str|The organization the execution environment belongs to.| diff --git a/roles/execution_environments/meta/argument_specs.yml b/roles/execution_environments/meta/argument_specs.yml new file mode 100644 index 000000000..8ba6b47a7 --- /dev/null +++ b/roles/execution_environments/meta/argument_specs.yml @@ -0,0 +1,108 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create execution environment objects on Ansible Controller. + options: + controller_execution_environments: + description: Data structure describing your execution_environments + type: list + elements: dict + # options: + # name: + # required: true + # type: str + # description: Name of execution environment + # description: + # required: false + # type: str + # description: Description to use for the execution environment. + # image: + # required: true + # type: str + # description: Container image to use for the execution environment + # organization: + # required: false + # type: str + # description: The organization the execution environment belongs to. + # credential: + # required: false + # type: str + # description: Name of the credential to use for the execution environment. + # pull: + # default: missing + # required: false + # type: str + # choices: + # - always + # - missing + # - never + # description: Determine image pull behavior + # state: + # default: "{{ controller_state | default('present') }}" + # required: false + # type: str + # description: Desired state of the resource. + + # Async variables + controller_configuration_execution_environments_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_execution_environments_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_execution_environments_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/groups/README.md b/roles/groups/README.md index d0febfd50..d9e5b9b4b 100644 --- a/roles/groups/README.md +++ b/roles/groups/README.md @@ -76,16 +76,18 @@ The role will strip the double space between the curly bracket in order to provi ### Group Variables -|Variable Name|Default Value|Required|Description| -|:---:|:---:|:---:|:---:| -|`name`|""|yes|Name of Group| -|`new_name`|""|yes|Name of Group, used in updating a Group.| -|`description`|`False`|no|Description of of Group.| -|`inventory`|""|yes| Name of inventory| -|`variables`|{}|no| variables applicable to group.| -|`hosts`|""|no | hosts (list) in group| -|`children`|""|no| List of groups that should be nested inside in this group| -|`state`|`present`|no|Desired state of the resource.| +|Variable Name|Default Value|Required|Type|Description| +|:---:|:---:|:---:|:---:|:---:| +|`name`|""|yes|str|Name of Group| +|`new_name`|""|yes|str|Name of Group, used in updating a Group.| +|`description`|`False`|no|str|Description of the Group.| +|`inventory`|""|yes|str|Name of inventory the group should be made a member of.| +|`variables`|{}|no|dict|variables applicable to group.| +|`hosts`|""|no|list|hosts (list) in group| +|`children`|""|no|list|List of groups that should be nested inside in this group| +|`preserve_existing_hosts`|`False`|no|bool|Whether to preserve existing hosts in an existing group| +|`preserve_existing_children`|`False`|no|bool|Whether to preserve existing children in an existing group| +|`state`|`present`|no|str|Desired state of the resource.| ### Standard Organization Data Structure diff --git a/roles/groups/meta/argument_specs.yml b/roles/groups/meta/argument_specs.yml new file mode 100644 index 000000000..37a185fbd --- /dev/null +++ b/roles/groups/meta/argument_specs.yml @@ -0,0 +1,119 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create groups on Ansible Controller. + options: + controller_groups: + description: Data structure describing your groups + type: list + elements: dict + # options: + # name: + # required: true + # type: str + # description: Name of group + # new_name: + # required: false + # type: str + # description: Name of group, used in updating + # description: + # required: false + # type: str + # description: Description to use for the group. + # inventory: + # required: true + # type: str + # description: Name of inventory the group should be made a member of. + # variables: + # required: false + # type: dict + # description: variables applicable to group. + # hosts: + # required: false + # type: list + # elements: str + # description: hosts (list) in group + # children: + # required: false + # type: list + # elements: str + # description: List of groups that should be nested inside in this group + # preserve_existing_hosts: + # default: false + # required: false + # type: bool + # description: Whether to preserve existing hosts in an existing group + # preserve_existing_children: + # default: false + # required: false + # type: bool + # description: Whether to preserve existing children in an existing group + # state: + # default: "{{ controller_state | default('present') }}" + # required: false + # type: str + # description: Desired state of the resource. + + # Async variables + controller_configuration_groups_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_groups_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_groups_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/hosts/meta/argument_specs.yml b/roles/hosts/meta/argument_specs.yml new file mode 100644 index 000000000..2dcb0f6a4 --- /dev/null +++ b/roles/hosts/meta/argument_specs.yml @@ -0,0 +1,104 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create hosts on Ansible Controller. + options: + controller_hosts: + description: Data structure describing your hosts + type: list + elements: dict + # options: + # name: + # required: true + # type: str + # description: Name of host + # new_name: + # required: false + # type: str + # description: Name of host, used in updating + # description: + # required: false + # type: str + # description: Description to use for the host. + # inventory: + # required: true + # type: str + # description: Name of inventory the host should be made a member of. + # variables: + # required: false + # type: dict + # description: variables applicable to host. + # enabled: + # default: false + # required: false + # type: bool + # description: Whether the host is enabled + # state: + # default: "{{ controller_state | default('present') }}" + # required: false + # type: str + # description: Desired state of the resource. + + # Async variables + controller_configuration_hosts_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_hosts_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_hosts_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/instance_groups/meta/argument_specs.yml b/roles/instance_groups/meta/argument_specs.yml new file mode 100644 index 000000000..062f1892e --- /dev/null +++ b/roles/instance_groups/meta/argument_specs.yml @@ -0,0 +1,128 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create instance groups on Ansible Controller. + options: + controller_instance_groups: + description: Data structure describing your instance_groups + type: list + elements: dict + # options: + # name: + # required: true + # type: str + # description: Name of instance group + # new_name: + # required: false + # type: str + # description: Name of instance group, used in updating + # credential: + # required: false + # type: str + # description: Credential to authenticate with Kubernetes or OpenShift. Must be of type "Kubernetes/OpenShift API Bearer Token". Will make instance part of a Container Group. + # is_container_group: + # default: false + # required: false + # type: bool + # description: Signifies that this InstanceGroup should act as a ContainerGroup. If no credential is specified, the underlying Pod's ServiceAccount will be used. + # policy_instance_percentage: + # required: false + # type: int + # description: Minimum percentage of all instances that will be automatically assigned to this group when new instances come online. + # policy_instance_minimum: + # required: false + # type: int + # description: Static minimum number of Instances that will be automatically assign to this group when new instances come online. + # policy_instance_list: + # required: false + # type: list + # elements: str + # description: List of exact-match Instances that will be assigned to this group. + # max_concurrent_jobs: + # default: 0 + # required: false + # type: int + # description: Maximum number of concurrent jobs to run on this group. Zero means no limit. + # max_forks: + # default: 0 + # required: false + # type: int + # description: Max forks to execute on this group. Zero means no limit. + # pod_spec_override: + # required: false + # type: str + # description: A custom Kubernetes or OpenShift Pod specification. + # instances: + # required: false + # type: list + # elements: str + # description: The instances associated with this instance_group. + # state: + # default: "{{ controller_state | default('present') }}" + # required: false + # type: str + # description: Desired state of the resource. + + # Async variables + controller_configuration_instance_groups_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_instance_groups_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_instance_groups_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/instances/meta/argument_specs.yml b/roles/instances/meta/argument_specs.yml new file mode 100644 index 000000000..0eb4c528c --- /dev/null +++ b/roles/instances/meta/argument_specs.yml @@ -0,0 +1,104 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create instances on Ansible Controller. + options: + controller_instances: + description: Data structure describing your instances + type: list + elements: dict + # options: + # hostname: + # required: true + # type: str + # description: Hostname of this instance. + # capacity_adjustment: + # required: false + # type: float + # description: Capacity adjustment between 0 and 1. + # enabled: + # default: false + # required: false + # type: bool + # description: If true, the instance will be enabled and used. + # managed_by_policy: + # default: false + # required: false + # type: bool + # description: If true, will be managed by instance group policy. + # node_type: + # required: false + # type: str + # description: Role that this node plays in the mesh. Most likely Execution. Current options are 'execution'. + # node_state: + # required: false + # type: str + # description: Indicates the current life cycle stage of this instance. Current options are 'installed' and 'deprovisioning'. + # listener_port: + # required: false + # type: int + # description: Port that Receptor will listen for incoming connections on. + + # Async variables + controller_configuration_instances_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_instances_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_instances_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/inventories/README.md b/roles/inventories/README.md index 4fd2cfdfa..d574d9b16 100644 --- a/roles/inventories/README.md +++ b/roles/inventories/README.md @@ -76,18 +76,18 @@ The role will strip the double space between the curly bracket in order to provi ### Inventory Variables -|Variable Name|Default Value|Required|Description| -|:---:|:---:|:---:|:---:| -|`name`|""|yes|Name of this inventory.| -|`copy_from`|""|no|Name or id to copy the inventory from. This will copy an existing inventory and change any parameters supplied.| -|`description`|""|no|Description of this inventory.| -|`organization`|`False`|no|Organization this inventory belongs to.| -|`instance_groups`|""|no|list of Instance Groups for this Inventory to run on.| -|`variables`|`False`|no|Variables for the inventory.| -|`kind`|`False`|no|The kind of inventory. Currently choices are '' and 'smart'| -|`host_filter`|`False`|no|The host filter field, useful only when 'kind=smart'| -|`prevent_instance_group_fallback`|`False`|no|Prevent falling back to instance groups set on the organization| -|`state`|`present`|no|Desired state of the resource.| +|Variable Name|Default Value|Required|type|Description| +|:---:|:---:|:---:|:---:|:---:| +|`name`|""|yes|str|Name of this inventory.| +|`copy_from`|""|no|str|Name or id to copy the inventory from. This will copy an existing inventory and change any parameters supplied.| +|`description`|""|no|str|Description of this inventory.| +|`organization`|""|no|str|Organization this inventory belongs to.| +|`instance_groups`|""|no|list|list of Instance Groups for this Inventory to run on.| +|`variables`|`{}`|no|dict|Variables for the inventory.| +|`kind`|""|no|str|The kind of inventory. Currently choices are '' and 'smart'| +|`host_filter`|""|no|str|The host filter field, useful only when 'kind=smart'| +|`prevent_instance_group_fallback`|`False`|no|bool|Prevent falling back to instance groups set on the organization| +|`state`|`present`|no|str|Desired state of the resource.| ### Standard Inventory Data Structure diff --git a/roles/inventories/meta/argument_specs.yml b/roles/inventories/meta/argument_specs.yml new file mode 100644 index 000000000..7cc68334e --- /dev/null +++ b/roles/inventories/meta/argument_specs.yml @@ -0,0 +1,122 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create inventories on Ansible Controller. + options: + controller_inventories: + description: Data structure describing your inventories + type: list + elements: dict + # options: + # name: + # required: true + # type: str + # description: Name of inventory + # copy_from: + # required: false + # type: str + # description: Name or id to copy the inventory from. This will copy an existing inventory and change any parameters supplied. + # description: + # required: false + # type: str + # description: Description to use for the inventory. + # organization: + # required: false + # type: str + # description: Organization this inventory belongs to. + # instance_groups: + # required: false + # type: list + # elements: str + # description: list of Instance Groups for this Inventory to run on. + # variables: + # required: false + # type: dict + # description: Variables for the inventory. + # kind: + # default: "" + # required: false + # type: str + # choices: + # - "" + # - smart + # description: The kind of inventory. Currently choices are '' and 'smart' + # host_filter: + # default: false + # required: false + # type: str + # description: The host filter field, useful only when 'kind=smart' + # prevent_instance_group_fallback: + # default: false + # required: false + # type: bool + # description: Prevent falling back to instance groups set on the organization + # state: + # default: "{{ controller_state | default('present') }}" + # required: false + # type: str + # description: Desired state of the resource. + + # Async variables + controller_configuration_inventories_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_inventories_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_inventories_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/inventory_source_update/meta/argument_specs.yml b/roles/inventory_source_update/meta/argument_specs.yml new file mode 100644 index 000000000..dd3d155cf --- /dev/null +++ b/roles/inventory_source_update/meta/argument_specs.yml @@ -0,0 +1,198 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to update inventory sources on Ansible Controller. + options: + controller_inventory_sources: + description: Data structure describing your inventory_sources to update + type: list + elements: dict + # options: + # name: + # required: true + # type: str + # description: Name of inventory_source + # inventory: + # required: true + # type: str + # description: Name or id of the inventory that contains the inventory source(s) to update. + # organization: + # required: false + # type: str + # description: Name of the inventory source's inventory's organization. + # wait: + # required: false + # type: bool + # description: Wait for the job to complete. + # interval: + # default: "{{ controller_configuration_inventory_source_update_async_delay | default(controller_configuration_async_retries | default(30)) }}" + # required: false + # type: int + # description: The interval to request an update from controller. + # timeout: + # required: false + # type: int + # description: If waiting for the job to complete this will abort after this amount of seconds. + # new_name: + # required: false + # type: str + # description: Unused in this role + # description: + # required: false + # type: str + # description: Unused in this role + # source: + # required: false + # type: str + # choices: + # - scm + # - ec2 + # - gce + # - azure_rm + # - vmware + # - satellite6 + # - openstack + # - rhv + # - controller + # - insights + # description: Unused in this role + # source_path: + # required: false + # type: str + # description: Unused in this role + # source_vars: + # required: false + # type: dict + # description: Unused in this role + # enabled_var: + # required: false + # type: str + # description: Unused in this role + # enabled_value: + # required: false + # type: str + # description: Unused in this role + # host_filter: + # required: false + # type: str + # description: Unused in this role + # credential: + # required: false + # type: str + # description: Unused in this role + # execution_environment: + # required: false + # type: str + # description: Unused in this role + # overwrite: + # required: false + # type: bool + # description: Unused in this role + # overwrite_vars: + # required: false + # type: bool + # description: Unused in this role + # custom_virtualenv: + # required: false + # type: str + # description: Unused in this role + # verbosity: + # required: false + # type: int + # choices: + # - 0 + # - 1 + # - 2 + # description: Unused in this role + # update_on_launch: + # required: false + # type: bool + # description: Unused in this role + # update_cache_timeout: + # required: false + # type: bool + # description: Unused in this role + # source_project: + # required: false + # type: str + # description: Unused in this role + # notification_templates_started: + # required: false + # type: bool + # description: Unused in this role + # notification_templates_success: + # required: false + # type: str + # description: Unused in this role + # notification_templates_error: + # required: false + # type: str + # description: Unused in this role + # state: + # required: false + # type: str + # description: Unused in this role + + # Async variables + controller_configuration_inventory_source_updates_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_inventory_source_updates_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_inventory_source_updates_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/inventory_sources/meta/argument_specs.yml b/roles/inventory_sources/meta/argument_specs.yml new file mode 100644 index 000000000..802bff920 --- /dev/null +++ b/roles/inventory_sources/meta/argument_specs.yml @@ -0,0 +1,198 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create inventory sources on Ansible Controller. + options: + controller_inventory_sources: + description: Data structure describing your inventory_sources + type: list + elements: dict + # options: + # name: + # required: true + # type: str + # description: Name of inventory_source + # new_name: + # required: false + # type: str + # description: Name of inventory_source, used in updating + # description: + # required: false + # type: str + # description: Description to use for the inventory_source. + # inventory: + # required: true + # type: str + # description: Name of inventory the inventory_source should be made a member of. + # organization: + # required: false + # type: str + # description: Organization the inventory belongs to. + # source: + # required: false + # type: str + # choices: + # - scm + # - ec2 + # - gce + # - azure_rm + # - vmware + # - satellite6 + # - openstack + # - rhv + # - controller + # - insights + # description: The source to use for this group. + # source_path: + # required: false + # type: str + # description: For an SCM based inventory source, the source path points to the file within the repo to use as an inventory. + # source_vars: + # required: false + # type: dict + # description: The variables or environment fields to apply to this source type. + # enabled_var: + # required: false + # type: str + # description: The variable to use to determine enabled state e.g., "status.power_state". + # enabled_value: + # required: false + # type: str + # description: Value when the host is considered enabled, e.g., "powered_on". + # host_filter: + # required: false + # type: str + # description: If specified, controller will only import hosts that match this regular expression. + # credential: + # required: false + # type: str + # description: Credential to use for the source. + # execution_environment: + # required: false + # type: str + # description: Execution Environment to use for the source. + # overwrite: + # required: false + # type: bool + # description: Delete child groups and hosts not found in source. + # overwrite_vars: + # required: false + # type: bool + # description: Override vars in child groups and hosts with those from external source. + # custom_virtualenv: + # required: false + # type: str + # description: Local absolute file path containing a custom Python virtualenv to use. + # timeout: + # required: false + # type: int + # description: The amount of time (in seconds) to run before the task is canceled. + # verbosity: + # required: false + # type: int + # choices: + # - 0 + # - 1 + # - 2 + # description: The verbosity level to run this inventory source under. + # update_on_launch: + # required: false + # type: bool + # description: Refresh inventory data from its source each time a job is run. + # update_cache_timeout: + # required: false + # type: bool + # description: Time in seconds to consider an inventory sync to be current. + # source_project: + # required: false + # type: str + # description: Project to use as source with scm option + # notification_templates_started: + # required: false + # type: bool + # description: The notifications on started to use for this inventory source in a list. + # notification_templates_success: + # required: false + # type: str + # description: The notifications on success to use for this inventory source in a list. + # notification_templates_error: + # required: false + # type: str + # description: The notifications on error to use for this inventory source in a list. + # wait: + # required: false + # type: bool + # description: Unused for this role + # interval: + # required: false + # type: int + # description: Unused for this role + # state: + # default: "{{ controller_state | default('present') }}" + # required: false + # type: str + # description: Desired state of the resource. + + # Async variables + controller_configuration_inventory_sources_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_inventory_sources_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_inventory_sources_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/job_launch/README.md b/roles/job_launch/README.md index 7655434fc..e9c0e8e3b 100644 --- a/roles/job_launch/README.md +++ b/roles/job_launch/README.md @@ -44,7 +44,7 @@ controller_configuration_job_launch_secure_logging defaults to the value of cont |Variable Name|Default Value|Required|Type|Description| |:---:|:---:|:---:|:---:|:---:| -|`name`|""|yes|str|The name or id of the project to update.| +|`name`|""|yes|str|The name or id of the job to launch.| |`job_type`|""|no|str|Job_type to use for the job, only used if prompt for job_type is set. Run or Check are the options.| |`inventory`|""|no|str|Inventory to use for the job, only used if prompt for inventory is set.| |`organization`|""|no|str|Organization the inventory belongs to.| diff --git a/roles/job_launch/meta/argument_specs.yml b/roles/job_launch/meta/argument_specs.yml new file mode 100644 index 000000000..895287998 --- /dev/null +++ b/roles/job_launch/meta/argument_specs.yml @@ -0,0 +1,147 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to launch jobs on Ansible Controller. + options: + controller_launch_jobs: + description: Data structure describing your job_launches + type: list + elements: dict + # options: + # name: + # required: true + # type: str + # description: Name or ID of job to launch + # job_type: + # required: false + # type: str + # description: Job_type to use for the job, only used if prompt for job_type is set. Run or Check are the options. + # choices: + # - run + # - check + # inventory: + # required: false + # type: str + # description: Inventory to use for the job, only used if prompt for inventory is set. + # organization: + # required: false + # type: str + # description: Organization the inventory belongs to. + # credentials: + # required: false + # type: list + # description: TCredential to use for job, only used if prompt for credential is set. + # extra_vars: + # required: false + # type: dict + # description: extra_vars to use for the Job Template. ask_extra_vars needs to be set to True via controller_job_template module. + # limit: + # required: false + # type: str + # description: Limit to use for the job_template. + # tags: + # required: false + # type: str + # description: Specific tags to use for from playbook. + # scm_branch: + # required: false + # type: str + # description: A specific of the SCM project to run the template on. + # skip_tags: + # required: false + # type: str + # description: Specific tags to skip from the playbook. + # verbosity: + # required: false + # type: int + # description: Verbosity level for this job run. + # diff_mode: + # required: false + # type: bool + # description: Show the changes made by Ansible tasks where supported. + # credential_passwords: + # required: false + # type: str + # description: Passwords for credentials which are set to prompt on launch. + # execution_environment: + # required: false + # type: str + # description: Execution Environment applied as a prompt. Job Template default used if not set. Only allowed if `ask_execution_environment_on_launch` set to true on Job Template + # forks: + # required: false + # type: int + # description: 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: + # required: false + # type: str + # description: 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: + # required: false + # type: int + # description: 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: + # required: false + # type: list + # description: 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 + # job_timeout: + # required: false + # type: int + # description: 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 + # wait: + # required: false + # type: bool + # description: Wait for the job to complete. + # interval: + # default: 2 + # required: false + # type: float + # description: The interval to request an update from controller. + # timeout: + # required: false + # type: int + # description: If waiting for the job to complete this will abort after this amount of seconds. + + # No_log variables + controller_configuration_groups_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/job_templates/meta/argument_specs.yml b/roles/job_templates/meta/argument_specs.yml new file mode 100644 index 000000000..45f658a24 --- /dev/null +++ b/roles/job_templates/meta/argument_specs.yml @@ -0,0 +1,313 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create job templates on Ansible Controller. + options: + controller_job_templates: + description: Data structure describing your job_templates + type: list + elements: dict + # options: + # name: + # required: true + # type: str + # description: Name of job_template + # new_name: + # type: str + # required: false + # description: Setting this option will change the existing name (looked up via the name field). + # copy_from: + # required: false + # type: str + # description: Name or id to copy the job_template from. This will copy an existing job_template and change any parameters supplied. + # description: + # required: false + # type: str + # description: Description to use for the job_template. + # organization: + # required: false + # type: str + # description: Organization this job_template belongs to. + # execution_environment: + # required: false + # type: str + # description: Execution Environment to use for the job template. + # job_type: + # default: run + # required: false + # type: str + # description: The job type to use for the job template(run, check). + # inventory: + # required: false + # type: str + # description: Name of the inventory to use for the job template. + # project: + # required: false + # type: str + # description: Name of the project to use for the job template. + # playbook: + # required: false + # type: str + # description: Path to the playbook to use for the job template within the project provided. + # credentials: + # required: false + # type: list + # elements: str + # description: List of credentials to use for the job template. + # forks: + # required: false + # type: int + # description: The number of parallel or simultaneous processes to use while executing the playbook. + # limit: + # required: false + # type: str + # description: A host pattern to further constrain the list of hosts managed or affected by the playbook + # verbosity: + # required: false + # type: int + # description: Control the output level Ansible produces as the playbook runs. + # choices: + # - 0 + # - 1 + # - 2 + # - 3 + # - 4 + # - 5 + # extra_vars: + # required: false + # type: dict + # description: Specify extra_vars for the template. + # job_tags: + # required: false + # type: str + # description: Comma separated list of the tags to use for the job template. + # force_handlers: + # required: false + # type: bool + # description: Enable forcing playbook handlers to run even if a task fails. + # skip_tags: + # required: false + # type: str + # description: Comma separated list of the tags to skip for the job template. + # start_at_task: + # required: false + # type: str + # description: Start the playbook at the task matching this name. + # diff_mode: + # required: false + # type: bool + # description: Enable diff mode for the job template + # use_fact_cache: + # required: false + # type: bool + # description: Enable use of fact caching for the job template. + # host_config_key: + # required: false + # type: str + # description: Allow provisioning callbacks using this host config key. + # ask_scm_branch_on_launch: + # required: false + # type: bool + # description: Prompt user for scm branch on launch. + # ask_diff_mode_on_launch: + # required: false + # type: bool + # description: Prompt user to enable diff mode show changes to files when supported by modules. + # ask_variables_on_launch: + # required: false + # type: bool + # description: Prompt user for extra_vars on launch. + # ask_limit_on_launch: + # required: false + # type: bool + # description: Prompt user for a limit on launch. + # ask_tags_on_launch: + # required: false + # type: bool + # description: Prompt user for job tags on launch. + # ask_skip_tags_on_launch: + # required: false + # type: bool + # description: Prompt user for job tags to skip on launch. + # ask_job_type_on_launch: + # required: false + # type: bool + # description: Prompt user for job type on launch. + # ask_verbosity_on_launch: + # required: false + # type: bool + # description: Prompt user to choose a verbosity level on launch. + # ask_inventory_on_launch: + # required: false + # type: bool + # description: Prompt user for inventory on launch. + # ask_credential_on_launch: + # required: false + # type: bool + # description: Prompt user for credential on launch. + # ask_execution_environment_on_launch: + # required: false + # type: bool + # description: Prompt user for execution environment on launch. + # ask_forks_on_launch: + # required: false + # type: bool + # description: Prompt user for forks on launch. + # ask_instance_groups_on_launch: + # required: false + # type: bool + # description: Prompt user for instance groups on launch. + # ask_job_slice_count_on_launch: + # required: false + # type: bool + # description: Prompt user for job slice count on launch. + # ask_labels_on_launch: + # required: false + # type: bool + # description: Prompt user for labels on launch. + # ask_timeout_on_launch: + # required: false + # type: bool + # description: Prompt user for timeout on launch. + # prevent_instance_group_fallback: + # required: false + # type: bool + # description: Prevent falling back to instance groups set on the associated inventory or organization. + # survey_enabled: + # required: false + # type: bool + # description: Enable a survey on the job template. + # survey_spec: + # required: false + # type: dict + # description: JSON/YAML dict formatted survey definition. + # survey: + # required: false + # type: dict + # description: JSON/YAML dict formatted survey definition. Alias of survey_spec + # become_enabled: + # required: false + # type: bool + # description: Activate privilege escalation. + # allow_simultaneous: + # required: false + # type: bool + # description: Allow simultaneous runs of the job template. + # timeout: + # required: false + # type: int + # description: Maximum time in seconds to wait for a job to finish (server-side). + # instance_groups: + # required: false + # type: list + # elements: str + # description: list of Instance Groups for this Job Template to run on. + # job_slice_count: + # required: false + # type: int + # description: The number of jobs to slice into at runtime. Will cause the Job Template to launch a workflow if value is greater than 1. + # webhook_service: + # required: false + # type: str + # description: Service that webhook requests will be accepted from (github, gitlab) + # webhook_credential: + # required: false + # type: str + # description: Personal Access Token for posting back the status to the service API + # scm_branch: + # required: false + # type: str + # description: Branch to use in job run. Project default used if blank. Only allowed if project allow_override field is set to true. + # labels: + # required: false + # type: list + # elements: str + # description: The labels applied to this job template. + # custom_virtualenv: + # required: false + # type: str + # description: Local absolute file path containing a custom Python virtualenv to use. + # notification_templates_started: + # required: false + # type: list + # elements: str + # description: The notifications on started to use for this organization in a list. + # notification_templates_success: + # required: false + # type: list + # elements: str + # description: The notifications on success to use for this organization in a list. + # notification_templates_error: + # required: false + # type: list + # elements: str + # description: The notifications on error to use for this organization in a list. + # state: + # default: "{{ controller_state | default('present') }}" + # required: false + # type: str + # description: Desired state of the resource. + + # Async variables + controller_configuration_job_templates_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_job_templates_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_job_templates_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/jobs_cancel/README.md b/roles/jobs_cancel/README.md index ece21d3e5..64a61875b 100644 --- a/roles/jobs_cancel/README.md +++ b/roles/jobs_cancel/README.md @@ -45,7 +45,7 @@ controller_configuration_jobs_cancel_secure_logging defaults to the value of con |Variable Name|Default Value|Required|Type|Description| |:---:|:---:|:---:|:---:|:---:| |`id`|""|yes|int|ID of the job to cancel.| -|`fail_if_not_running`|""|no|bool|Fail loudly if the job can not be canceled.| +|`fail_if_not_running`|`False`|no|bool|Fail loudly if the job can not be canceled.| ### Standard Project Data Structure diff --git a/roles/jobs_cancel/meta/argument_specs.yml b/roles/jobs_cancel/meta/argument_specs.yml new file mode 100644 index 000000000..6fa4c903b --- /dev/null +++ b/roles/jobs_cancel/meta/argument_specs.yml @@ -0,0 +1,64 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to cancel a list of jobs on Ansible Controller. + options: + controller_ad_hoc_commands_cancel: + description: Data structure describing your jobs to cancel + type: list + elements: dict + # options: + # id: + # required: true + # type: int + # description: ID of the job to cancel + # fail_if_not_running: + # default: false + # required: false + # type: bool + # description: Fail loudly if the job can not be canceled. + + # No_log variables + controller_configuration_ad_hoc_command_cancel_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or not to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/labels/README.md b/roles/labels/README.md index ef76a4c70..efd4bd943 100644 --- a/roles/labels/README.md +++ b/roles/labels/README.md @@ -54,12 +54,12 @@ This also speeds up the overall role. ### Labels Variables -|Variable Name|Default Value|Required|Description| -|:---:|:---:|:---:|:---:| -|`name`|""|yes|Name of this label.| -|`new_name`|""|no|Setting this option will change the existing name (looked up via the name field).| -|`organization`|`False`|no|Organization this label belongs to.| -|`state`|`present`|no|Desired state of the resource.| +|Variable Name|Default Value|Required|type|Description| +|:---:|:---:|:---:|:---:|:---:| +|`name`|""|yes|str|Name of this label.| +|`new_name`|""|no|str|Setting this option will change the existing name (looked up via the name field).| +|`organization`|`False`|no|str|Organization this label belongs to.| +|`state`|`present`|no|str|Desired state of the resource.| ### Standard Label Data Structure diff --git a/roles/labels/meta/argument_specs.yml b/roles/labels/meta/argument_specs.yml new file mode 100644 index 000000000..b037b0d77 --- /dev/null +++ b/roles/labels/meta/argument_specs.yml @@ -0,0 +1,91 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create labels on Ansible Controller. + options: + controller_labels: + description: Data structure describing your labels + type: list + elements: dict + # options: + # name: + # type: str + # required: true + # description: Name of label + # new_name: + # type: str + # required: false + # description: Setting this option will change the existing name (looked up via the name field). + # organization: + # type: str + # required: false + # description: Organization this label belongs to. + # state: + # default: "{{ controller_state | default('present') }}" + # type: str + # required: false + # description: Desired state of the resource. + + # Async variables + controller_configuration_labels_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_labels_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_labels_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/license/meta/argument_specs.yml b/roles/license/meta/argument_specs.yml new file mode 100644 index 000000000..a4c23357e --- /dev/null +++ b/roles/license/meta/argument_specs.yml @@ -0,0 +1,93 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to deploy a license on Ansible Controller. + + options: + controller_labels: + description: Data structure describing your license for Controller + type: list + elements: dict + # options: + # manifest_file: + # required: false + # type: str + # description: File path to a Red Hat subscription manifest (a .zip file) + # manifest_url: + # required: false + # type: str + # description: URL containing a Red Hat subscription manifest (a .zip file) + # manifest_content: + # required: false + # type: str + # description: Base64 encoded content of Red Hat subscription manifest + # manifest: + # required: false + # type: str + # description: DEPRECATED - changed to `manifest_file` (still works as an alias) + # manifest_username: + # required: false + # type: str + # description: Optional username for access to `manifest_url` + # manifest_password: + # required: false + # type: str + # description: Optional password for access to `manifest_url` + # pool_id: + # required: false + # type: str + # description: Red Hat or Red Hat Satellite pool_id to attach to + # eula_accepted: + # required: true + # type: bool + # description: DEPRECATED since Tower 3.8 - Whether to accept the End User License Agreement for Ansible controller + # force: + # default: false + # required: false + # type: bool + # description: By default, the license manifest will only be applied if controller is currently unlicensed or trial licensed. When force=true, the license is always applied. + + # No_log variables + controller_configuration_labels_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/master_role_example/README.md b/roles/master_role_example/README.md deleted file mode 100644 index 2e4d5e5db..000000000 --- a/roles/master_role_example/README.md +++ /dev/null @@ -1,113 +0,0 @@ -# controller_configuration.*********** - -## Description - -An Ansible Role to create******* on Ansible Controller. - -## Requirements - -ansible-galaxy collection install -r tests/collections/requirements.yml to be installed -Currently: - awx.awx - or - ansible.controller - -## Variables - -### Authentication - -|Variable Name|Default Value|Required|Description|Example| -|:---|:---:|:---:|:---|:---| -|`controller_state`|"present"|no|The state all objects will take unless overridden by object default|'absent'| -|`controller_hostname`|""|yes|URL to the Ansible Controller Server.|127.0.0.1| -|`controller_validate_certs`|`True`|no|Whether or not to validate the Ansible Controller Server's SSL certificate.|| -|`controller_username`|""|no|Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified.|| -|`controller_password`|""|no|Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified.|| -|`controller_oauthtoken`|""|no|Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified.||| -|`controller_************`|`see below`|yes|Data structure describing your organization or organizations Described below.|| - -### Secure Logging Variables - -The following Variables compliment each other. -If Both variables are not set, secure logging defaults to false. -The role defaults to False as normally the add ******* task does not include sensitive information. -controller_configuration_*******_secure_logging defaults to the value of controller_configuration_secure_logging if it is not explicitly called. This allows for secure logging to be toggled for the entire suite of controller configuration roles with a single variable, or for the user to selectively use it. - -|Variable Name|Default Value|Required|Description| -|:---:|:---:|:---:|:---:| -|`controller_configuration_*******_secure_logging`|`False`|no|Whether or not to include the sensitive ******* role tasks in the log. Set this value to `True` if you will be providing your sensitive values from elsewhere.| -|`controller_configuration_secure_logging`|`False`|no|This variable enables secure logging as well, but is shared across multiple roles, see above.| - -### Asynchronous Retry Variables - -The following Variables set asynchronous retries for the role. -If neither of the retries or delay or retries are set, they will default to their respective defaults. -This allows for all items to be created, then checked that the task finishes successfully. -This also speeds up the overall role. - -|Variable Name|Default Value|Required|Description| -|:---:|:---:|:---:|:---:| -|`controller_configuration_async_retries`|30|no|This variable sets the number of retries to attempt for the role globally.| -|`controller_configuration_*******_async_retries`|`{{ controller_configuration_async_retries }}`|no|This variable sets the number of retries to attempt for the role.| -|`controller_configuration_async_delay`|1|no|This sets the delay between retries for the role globally.| -|`controller_configuration_*******_async_delay`|`controller_configuration_async_delay`|no|This sets the delay between retries for the role.| - -## Data Structure - -### ************ Variables - -|Variable Name|Default Value|Required|Type|Description| -|:---:|:---:|:---:|:---:|:---:| -|`name`|""|yes|str|Name of Job Template| -|`new_name`|""|str|no|Setting this option will change the existing name (looked up via the name field).| -|`description`|`False`|no|str|Description to use for the job template.| - -|`state`|`present`|no|str|Desired state of the resource.| - -### Standard Project Data Structure - -#### Json Example - -```json -{ -} - -``` - -#### Yaml Example - -```yaml ---- - -``` - -## Playbook Examples - -### Standard Role Usage - -```yaml ---- -- name: Playbook to configure ansible controller post installation - hosts: localhost - connection: local - # Define following vars here, or in controller_configs/controller_auth.yml - # controller_hostname: ansible-controller-web-svc-test-project.example.com - # controller_username: admin - # controller_password: changeme - pre_tasks: - - name: Include vars from controller_configs directory - ansible.builtin.include_vars: - dir: ./yaml - ignore_files: [controller_config.yml.template] - extensions: ["yml"] - roles: - - {role: redhat_cop.controller_configuration.license, when: controller_license is defined} -``` - -## License - -[MIT](https://github.com/redhat-cop/controller_configuration#licensing) - -## Author - -[username](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/about-your-profile/) diff --git a/roles/master_role_example/defaults/main.yml b/roles/master_role_example/defaults/main.yml deleted file mode 100644 index 485ba84ba..000000000 --- a/roles/master_role_example/defaults/main.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -controller_configuration_*******_secure_logging: "{{controller_configuration_secure_logging | default('false')}}" -controller_configuration_***********_async_retries: "{{ controller_configuration_async_retries | default(30) }}" -controller_configuration_***********_async_delay: "{{ controller_configuration_async_delay | default(1) }}" -... diff --git a/roles/master_role_example/meta/main.yml b/roles/master_role_example/meta/main.yml deleted file mode 100644 index a7b559add..000000000 --- a/roles/master_role_example/meta/main.yml +++ /dev/null @@ -1,46 +0,0 @@ ---- -galaxy_info: - role_name: "**************" - author: "************" - description: "An Ansible Role to create ************ in Ansible Controller." - 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: "MIT" - - min_ansible_version: "2.8" - - # 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" - - "aap" - - "awx" - - "***************" - - "***************s" - -collections: - - ansible.controller - - awx.awx - -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/master_role_example/tasks/main.yml b/roles/master_role_example/tasks/main.yml deleted file mode 100644 index 541c28b07..000000000 --- a/roles/master_role_example/tasks/main.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -# Create Job Template -- name: Add Controller *********** - controller_***********: - name: "{{ ***********_item.name }}" - new_name: "{{ ***********_item.new_name | default(omit, true) }}" - description: "{{ ***********_item.description | default('') }}" - - # Role specific options - state: "{{ ***********_item.state | default(controller_state | default('present')) }}" - controller_username: "{{ controller_username | default(omit, true) }}" - controller_password: "{{ controller_password | default(omit, true) }}" - controller_oauthtoken: "{{ controller_oauthtoken | default(omit, true) }}" - controller_host: "{{ controller_hostname | default(omit, true) }}" - controller_config_file: "{{ controller_config_file | default(omit, true) }}" - validate_certs: "{{ controller_validate_certs | default(omit) }}" - loop: "{{ controller_************ }}" - loop_control: - loop_var: "__controller_***********_item" - no_log: "{{ controller_configuration_*******_secure_logging }}" - when: controller_************ is defined - async: 1000 - poll: 0 - register: __controller_***********_job_async - changed_when: not __controller_***********_job_async.changed - vars: - ansible_async_dir: '/tmp/.ansible_async' - -- name: "Configure *********** | Wait for finish the *********** creation" - async_status: - jid: "{{ __controller_***********_job_async_results_item.ansible_job_id }}" - register: __controller_***********_job_async_result - until: __controller_***********_job_async_result.finished - retries: "{{ controller_configuration_***********_async_retries }}" - delay: "{{ controller_configuration_***********_async_delay }}" - loop: "{{ __controller_***********_job_async.results }}" - loop_control: - loop_var: __controller_***********_job_async_results_item - when: __controller_***********_job_async_results_item.ansible_job_id is defined - no_log: "{{ controller_configuration_*******_secure_logging }}" - vars: - ansible_async_dir: '/tmp/.ansible_async' -... diff --git a/roles/master_role_example/tests/config/extra_vars.yml b/roles/master_role_example/tests/config/extra_vars.yml deleted file mode 100644 index 17f4894ac..000000000 --- a/roles/master_role_example/tests/config/extra_vars.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -empty_master_vars: - empty_var: "nothing" - -survey_extra_vars: - example_a: 127.0.0.1 - example_b: "text" -... diff --git a/roles/master_role_example/tests/test.yml b/roles/master_role_example/tests/test.yml deleted file mode 100644 index ae745ffd5..000000000 --- a/roles/master_role_example/tests/test.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -- name: Add *********** 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"] - - roles: - - {role: ../.., when: role_*********** is defined} -... diff --git a/roles/notification_templates/meta/argument_specs.yml b/roles/notification_templates/meta/argument_specs.yml new file mode 100644 index 000000000..51cfe66de --- /dev/null +++ b/roles/notification_templates/meta/argument_specs.yml @@ -0,0 +1,111 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create notification templates on Ansible Controller. + options: + controller_notification_templates: + description: Data structure describing your notification_templates + type: list + elements: dict + # options: + # name: + # required: true + # type: str + # description: Name of notification_template + # new_name: + # required: false + # type: str + # description: Name of notification_template, used in updating + # copy_from: + # required: false + # type: str + # description: Name or id to copy the notification_template from. This will copy an existing notification_template and change any parameters supplied. + # description: + # required: false + # type: str + # description: Description to use for the notification_template. + # organization: + # required: false + # type: str + # description: Organization this notification_template belongs to. + # notification_type: + # required: false + # type: str + # description: The type of notification to be sent. + # notification_configuration: + # required: false + # type: str + # description: The notification configuration file. Note providing this field would disable all depreciated notification-configuration-related fields. + # messages: + # required: false + # type: list + # elements: str + # description: Optional custom messages for notification template. Assumes any instance of two space __ are used for adding variables and removes them. Does not effect single space. + # state: + # default: "{{ controller_state | default('present') }}" + # required: false + # type: str + # description: Desired state of the resource. + + # Async variables + controller_configuration_notification_templates_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_notification_templates_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + # No_log variables + controller_configuration_notification_templates_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/organizations/README.md b/roles/organizations/README.md index 4cf6b880d..e5b31f4fd 100644 --- a/roles/organizations/README.md +++ b/roles/organizations/README.md @@ -58,22 +58,22 @@ This role accepts two data models. A simple straightforward easy to maintain mod ### Organization Variables -|Variable Name|Default Value|Required|Description| -|:---:|:---:|:---:|:---:| -|`name`|""|yes|Name of Organization| -|`description`|`False`|no|Description of of Organization.| -|`custom_virtualenv`|""|no|Local absolute file path containing a custom Python virtualenv to use.| -|`max_hosts`|""|no|The max hosts allowed in this organization.| -|`instance_groups`|""|no|list of Instance Groups for this Organization to run on.| -|`galaxy_credentials`|""|no|The credentials to use with private automationhub.| -|`default_environment`|""|no|Default Execution Environment to use for jobs owned by the Organization.| -|`notification_templates_started`|""|no|The notifications on started to use for this organization in a list.| -|`notification_templates_success`|""|no|The notifications on success to use for this organization in a list.| -|`notification_templates_error`|""|no|The notifications on error to use for this organization in a list.| -|`notification_templates_approvals`|""|no|The notifications for approval to use for this organization in a list.| -|`state`|`present`|no|Desired state of the resource.| -|`assign_galaxy_credentials_to_org`|`True`|no|Boolean to indicate whether credentials should be assigned or not. It should be noted that credentials must exist before adding it. | -|`assign_default_ee_to_org`|`True`|no|Boolean to indicate whether default execution environment should be assigned or not. It should be noted that execution environment must exist before adding it. | +|Variable Name|Default Value|Required|Type|Description| +|:---:|:---:|:---:|:---:|:---:| +|`name`|""|yes|str|Name of Organization| +|`description`|`False`|no|str|Description of of Organization.| +|`custom_virtualenv`|""|no|str|Local absolute file path containing a custom Python virtualenv to use.| +|`max_hosts`|""|no|int|The max hosts allowed in this organization.| +|`instance_groups`|""|no|list|list of Instance Groups for this Organization to run on.| +|`galaxy_credentials`|""|no|list|The credentials to use with private automationhub.| +|`default_environment`|""|no|str|Default Execution Environment to use for jobs owned by the Organization.| +|`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.| +|`notification_templates_error`|""|no|list|The notifications on error to use for this organization in a list.| +|`notification_templates_approvals`|""|no|list|The notifications for approval to use for this organization in a list.| +|`state`|`present`|no|str|Desired state of the resource.| +|`assign_galaxy_credentials_to_org`|`True`|no|bool|Boolean to indicate whether credentials should be assigned or not. It should be noted that credentials must exist before adding it. | +|`assign_default_ee_to_org`|`True`|no|bool|Boolean to indicate whether default execution environment should be assigned or not. It should be noted that execution environment must exist before adding it. | ### Standard Organization Data Structure model diff --git a/roles/organizations/meta/argument_specs.yml b/roles/organizations/meta/argument_specs.yml new file mode 100644 index 000000000..8b610229b --- /dev/null +++ b/roles/organizations/meta/argument_specs.yml @@ -0,0 +1,139 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create organizations on Ansible Controller. + options: + controller_organizations: + description: Data structure describing your organizations + type: list + elements: dict + # options: + # name: + # required: true + # type: str + # description: Name of organization + # description: + # required: false + # type: str + # description: Description to use for the organization. + # custom_virtualenv: + # required: false + # type: str + # description: Local absolute file path containing a custom Python virtualenv to use. + # max_hosts: + # required: false + # type: int + # description: The max hosts allowed in this organization. + # instance_groups: + # required: false + # type: list + # elements: str + # description: list of Instance Groups for this Organization to run on. + # galaxy_credentials: + # required: false + # type: list + # elements: str + # description: The credentials to use with private automationhub. + # default_environment: + # required: false + # type: str + # description: Default Execution Environment to use for jobs owned by the Organization. + # notification_templates_started: + # required: false + # type: list + # elements: str + # description: The notifications on started to use for this organization in a list. + # notification_templates_success: + # required: false + # type: list + # elements: str + # description: The notifications on success to use for this organization in a list. + # notification_templates_error: + # required: false + # type: list + # elements: str + # description: The notifications on error to use for this organization in a list. + # notification_templates_approvals: + # required: false + # type: list + # elements: str + # description: The notifications for approval to use for this organization in a list. + # assign_galaxy_credentials_to_org: + # default: true + # required: false + # type: bool + # description: Boolean to indicate whether credentials should be assigned or not. It should be noted that credentials must exist before adding it. + # assign_default_ee_to_org: + # default: true + # required: false + # type: bool + # description: Boolean to indicate whether default execution environment should be assigned or not. It should be noted that execution environment must exist before adding it. + # state: + # default: "{{ controller_state | default('present') }}" + # required: false + # type: str + # description: Desired state of the resource. + + # Async variables + controller_configuration_organizations_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_organizations_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_organizations_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/project_update/README.md b/roles/project_update/README.md index 5dc89c806..16cab2796 100644 --- a/roles/project_update/README.md +++ b/roles/project_update/README.md @@ -63,7 +63,7 @@ This also speeds up the overall role. |`wait`|""|no|str|Wait for the project to complete.| |`interval`|`controller_configuration_project_update_async_delay`|no|str|The interval to request an update from controller.| |`timeout`|""|no|str|If waiting for the job to complete this will abort after this amount of seconds.| -|`update_project`|false|no|bool|If defined and true, the project update will be executed, otherwise it won't.| +|`update_project`|`False`|no|bool|If defined and true, the project update will be executed, otherwise it won't.| ### Standard Project Data Structure diff --git a/roles/project_update/meta/argument_specs.yml b/roles/project_update/meta/argument_specs.yml new file mode 100644 index 000000000..d036234d6 --- /dev/null +++ b/roles/project_update/meta/argument_specs.yml @@ -0,0 +1,186 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to update projects on Ansible Controller. + options: + controller_projects: + description: Data structure describing your project_updates + type: list + elements: dict + # options: + # name: + # required: true + # type: str + # description: Name of group + # organization: + # required: false + # type: str + # description: Organization the project belongs to. + # wait: + # required: false + # type: bool + # description: Wait for the job to complete. + # interval: + # default: "{{ controller_configuration_project_update_async_delay }}" + # required: false + # type: float + # description: The interval to request an update from controller. + # timeout: + # required: false + # type: int + # description: If waiting for the update to complete this will abort after this amount of seconds. + # update_project: + # default: false + # required: false + # type: bool + # description: If defined and true, the project update will be executed, otherwise it won't. + # copy_from: + # required: false + # type: str + # description: Unused in this role + # description: + # required: false + # type: str + # description: Unused in this role + # scm_type: + # required: false + # type: str + # description: Unused in this role + # scm_url: + # required: false + # type: str + # description: Unused in this role + # default_environment: + # required: false + # type: str + # description: Unused in this role + # local_path: + # required: false + # type: str + # description: Unused in this role + # scm_branch: + # required: false + # type: str + # description: Unused in this role + # scm_refspec: + # required: false + # type: str + # description: Unused in this role + # credential: + # required: false + # type: str + # description: Unused in this role + # signature_validation_credential: + # required: false + # type: str + # description: Unused in this role + # scm_clean: + # required: false + # type: bool + # description: Unused in this role + # scm_delete_on_update: + # required: false + # type: bool + # description: Unused in this role + # scm_track_submodules: + # required: false + # type: bool + # description: Unused in this role + # scm_update_on_launch: + # required: false + # type: bool + # description: Unused in this role + # scm_update_cache_timeout: + # required: false + # type: int + # description: Unused in this role + # allow_override: + # required: false + # type: bool + # description: Unused in this role + # custom_virtualenv: + # required: false + # type: str + # description: Unused in this role + # notification_templates_started: + # required: false + # type: list + # elements: str + # description: Unused in this role + # notification_templates_success: + # required: false + # type: list + # elements: str + # description: Unused in this role + # notification_templates_error: + # required: false + # type: list + # elements: str + # description: Unused in this role + # state: + # required: false + # type: str + # description: Unused in this role + + # Async variables + controller_configuration_project_update_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_project_update_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + # No_log variables + controller_configuration_groups_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/projects/README.md b/roles/projects/README.md index 453b2bd71..4b13dd92f 100644 --- a/roles/projects/README.md +++ b/roles/projects/README.md @@ -18,13 +18,13 @@ Currently: |Variable Name|Default Value|Required|Description|Example| |:---|:---:|:---:|:---|:---| -|`controller_state`|"present"|no|The state all objects will take unless overridden by object default|'absent'| -|`controller_hostname`|""|yes|URL to the Ansible Controller Server.|127.0.0.1| -|`controller_validate_certs`|`True`|no|Whether or not to validate the Ansible Controller Server's SSL certificate.|| -|`controller_username`|""|no|Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified.|| -|`controller_password`|""|no|Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified.|| -|`controller_oauthtoken`|""|no|Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified.||| -|`controller_projects`|`see below`|yes|Data structure describing your project or projects Described below.|| +|`controller_state`|"present"|no|str|The state all objects will take unless overridden by object default|'absent'| +|`controller_hostname`|""|yes|str|URL to the Ansible Controller Server.|127.0.0.1| +|`controller_validate_certs`|`True`|no|str|Whether or not to validate the Ansible Controller Server's SSL certificate.|| +|`controller_username`|""|no|str|Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified.|| +|`controller_password`|""|no|str|Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified.|| +|`controller_oauthtoken`|""|no|str|Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified.||| +|`controller_projects`|`see below`|yes|str|Data structure describing your project or projects Described below.|| ### Secure Logging Variables @@ -35,8 +35,8 @@ controller_configuration_projects_secure_logging defaults to the value of contro |Variable Name|Default Value|Required|Description| |:---:|:---:|:---:|:---:| -|`controller_configuration_projects_secure_logging`|`False`|no|Whether or not to include the sensitive Project role tasks in the log. Set this value to `True` if you will be providing your sensitive values from elsewhere.| -|`controller_configuration_secure_logging`|`False`|no|This variable enables secure logging as well, but is shared across multiple roles, see above.| +|`controller_configuration_projects_secure_logging`|`False`|no|str|Whether or not to include the sensitive Project role tasks in the log. Set this value to `True` if you will be providing your sensitive values from elsewhere.| +|`controller_configuration_secure_logging`|`False`|no|str|This variable enables secure logging as well, but is shared across multiple roles, see above.| ### Asynchronous Retry Variables @@ -47,44 +47,44 @@ This also speeds up the overall role. |Variable Name|Default Value|Required|Description| |:---:|:---:|:---:|:---:| -|`controller_configuration_async_retries`|30|no|This variable sets the number of retries to attempt for the role globally.| -|`controller_configuration_projects_async_retries`|`{{ controller_configuration_async_retries }}`|no|This variable sets the number of retries to attempt for the role.| -|`controller_configuration_async_delay`|1|no|This sets the delay between retries for the role globally.| -|`controller_configuration_projects_async_delay`|`controller_configuration_async_delay`|no|This sets the delay between retries for the role.| +|`controller_configuration_async_retries`|30|no|str|This variable sets the number of retries to attempt for the role globally.| +|`controller_configuration_projects_async_retries`|`{{ controller_configuration_async_retries }}`|no|str|This variable sets the number of retries to attempt for the role.| +|`controller_configuration_async_delay`|1|no|str|This sets the delay between retries for the role globally.| +|`controller_configuration_projects_async_delay`|`controller_configuration_async_delay`|no|str|This sets the delay between retries for the role.| ## Data Structure ### Project Variables -|Variable Name|Default Value|Required|Description| -|:---:|:---:|:---:|:---:| -|`name`|""|yes|Name of Project| -|`copy_from`|""|no|Name or id to copy the project from. This will copy an existing project and change any parameters supplied.| -|`description`|`False`|no|Description of the Project.| -|`organization`|`False`|yes|Name of organization for project.| -|`scm_type`|""|no|Type of SCM resource.| -|`scm_url`|""|no|URL of SCM resource.| -|`default_environment`|""|no|Default Execution Environment to use for jobs relating to the project.| -|`local_path`|""|no|The server playbook directory for manual projects.| -|`scm_branch`|""|no|The branch to use for the SCM resource.| -|`scm_refspec`|""|no|The refspec to use for the SCM resource.| -|`credential`|""|no|Name of the credential to use with this SCM resource.| -|`signature_validation_credential`|""|no|Name of the credential to use for signature validation. If signature validation credential is provided, signature validation will be enabled.| -|`scm_clean`|""|no|Remove local modifications before updating.| -|`scm_delete_on_update`|""|no|Remove the repository completely before updating.| -|`scm_track_submodules`|""|no|Track submodules latest commit on specified branch.| -|`scm_update_on_launch`|""|no|Before an update to the local repository before launching a job with this project.| -|`scm_update_cache_timeout`|""|no|Cache Timeout to cache prior project syncs for a certain number of seconds. Only valid if scm_update_on_launch is to True, otherwise ignored.| -|`allow_override`|""|no|Allow changing the SCM branch or revision in a job template that uses this project.| -|`timeout`|""|no|The amount of time (in seconds) to run before the SCM Update is canceled. A value of 0 means no timeout.| -|`custom_virtualenv`|""|no|Local absolute file path containing a custom Python virtualenv to use.| -|`notification_templates_started`|""|no|The notifications on started to use for this organization in a list.| -|`notification_templates_success`|""|no|The notifications on success to use for this organization in a list.| -|`notification_templates_error`|""|no|The notifications on error to use for this organization in a list.| -|`state`|`present`|no|Desired state of the resource.| -|`wait`|""|no|Provides option to wait for completed project sync before returning.| -|`update_project`|""|no|Force project to update after changes.Used in conjunction with wait, interval, and timeout.| -|`interval`|`controller_configuration_projects_async_delay`|no|The interval to request an update from controller. Requires wait.| +|Variable Name|Default Value|Required|Type|Description| +|:---:|:---:|:---:|:---:|:---:| +|`name`|""|yes|str|Name of Project| +|`copy_from`|""|no|str|Name or id to copy the project from. This will copy an existing project and change any parameters supplied.| +|`description`|`False`|no|str|Description of the Project.| +|`organization`|`False`|yes|str|Name of organization for project.| +|`scm_type`|""|no|str|Type of SCM resource.| +|`scm_url`|""|no|str|URL of SCM resource.| +|`default_environment`|""|no|str|Default Execution Environment to use for jobs relating to the project.| +|`local_path`|""|no|str|The server playbook directory for manual projects.| +|`scm_branch`|""|no|str|The branch to use for the SCM resource.| +|`scm_refspec`|""|no|str|The refspec to use for the SCM resource.| +|`credential`|""|no|str|Name of the credential to use with this SCM resource.| +|`signature_validation_credential`|""|no|str|Name of the credential to use for signature validation. If signature validation credential is provided, signature validation will be enabled.| +|`scm_clean`|""|no|bool|Remove local modifications before updating.| +|`scm_delete_on_update`|""|no|bool|Remove the repository completely before updating.| +|`scm_track_submodules`|""|no|bool|Track submodules latest commit on specified branch.| +|`scm_update_on_launch`|""|no|bool|Before an update to the local repository before launching a job with this project.| +|`scm_update_cache_timeout`|""|no|str|Cache Timeout to cache prior project syncs for a certain number of seconds. Only valid if scm_update_on_launch is to True, otherwise ignored.| +|`allow_override`|""|no|str|Allow changing the SCM branch or revision in a job template that uses this project.| +|`timeout`|""|no|int|The amount of time (in seconds) to run before the SCM Update is canceled. A value of 0 means no timeout.| +|`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.| +|`notification_templates_error`|""|no|list|The notifications on error to use for this organization in a list.| +|`state`|`present`|no|str|Desired state of the resource.| +|`wait`|""|no|bool|Provides option to wait for completed project sync before returning.| +|`update_project`|`False`|no|bool|Force project to update after changes.Used in conjunction with wait, interval, and timeout.| +|`interval`|`controller_configuration_projects_async_delay`|no|float|The interval to request an update from controller. Requires wait.| ### Standard Project Data Structure diff --git a/roles/projects/meta/argument_specs.yml b/roles/projects/meta/argument_specs.yml new file mode 100644 index 000000000..fd94030d4 --- /dev/null +++ b/roles/projects/meta/argument_specs.yml @@ -0,0 +1,195 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create projects on Ansible Controller. + options: + controller_projects: + description: Data structure describing your projects + type: list + elements: dict + # options: + # name: + # required: true + # type: str + # description: Name of project + # copy_from: + # required: false + # type: str + # description: Name or id to copy the project from. This will copy an existing project and change any parameters supplied. + # description: + # required: false + # type: str + # description: Description to use for the project. + # organization: + # required: false + # type: str + # description: Organization this project belongs to. + # scm_type: + # required: false + # type: str + # choices: + # - manual + # - git + # - svn + # - insights + # - archive + # description: Type of SCM resource. + # scm_url: + # required: false + # type: str + # description: URL of SCM resource. + # default_environment: + # required: false + # type: str + # description: Default Execution Environment to use for jobs relating to the project. + # local_path: + # required: false + # type: str + # description: The server playbook directory for manual projects. + # scm_branch: + # required: false + # type: str + # description: The branch to use for the SCM resource. + # scm_refspec: + # required: false + # type: str + # description: The refspec to use for the SCM resource. + # credential: + # required: false + # type: str + # description: Name of the credential to use with this SCM resource. + # signature_validation_credential: + # required: false + # type: str + # description: Name of the credential to use for signature validation. If signature validation credential is provided, signature validation will be enabled. + # scm_clean: + # required: false + # type: bool + # description: Remove local modifications before updating. + # scm_delete_on_update: + # required: false + # type: bool + # description: Remove the repository completely before updating. + # scm_track_submodules: + # required: false + # type: bool + # description: Track submodules latest commit on specified branch. + # scm_update_on_launch: + # required: false + # type: bool + # description: Before an update to the local repository before launching a job with this project. + # scm_update_cache_timeout: + # required: false + # type: int + # description: Cache Timeout to cache prior project syncs for a certain number of seconds. Only valid if scm_update_on_launch is to True, otherwise ignored. + # allow_override: + # required: false + # type: bool + # description: Allow changing the SCM branch or revision in a job template that uses this project. + # timeout: + # required: false + # type: int + # description: The amount of time (in seconds) to run before the SCM Update is canceled. A value of 0 means no timeout. + # custom_virtualenv: + # required: false + # type: str + # description: Local absolute file path containing a custom Python virtualenv to use. + # notification_templates_started: + # required: false + # type: list + # elements: str + # description: The notifications on started to use for this organization in a list. + # notification_templates_success: + # required: false + # type: list + # elements: str + # description: The notifications on success to use for this organization in a list. + # notification_templates_error: + # required: false + # type: list + # elements: str + # description: The notifications on error to use for this organization in a list. + # wait: + # default: true + # required: false + # type: bool + # description: Provides option to wait for completed project sync before returning. + # update_project: + # default: false + # required: false + # type: str + # description: Force project to update after changes.Used in conjunction with wait, interval, and timeout. + # interval: + # default: "{{ controller_configuration_projects_async_delay }}" + # required: false + # type: float + # description: The interval to request an update from controller. Requires wait. + # state: + # default: "{{ controller_state | default('present') }}" + # required: false + # type: str + # description: Desired state of the resource. + + # Async variables + controller_configuration_projects_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_projects_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_projects_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/roles/meta/argument_specs.yml b/roles/roles/meta/argument_specs.yml new file mode 100644 index 000000000..df4209f5d --- /dev/null +++ b/roles/roles/meta/argument_specs.yml @@ -0,0 +1,158 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create roles on Ansible Controller. + options: + controller_roles: + description: Data structure describing your roles + type: list + elements: dict + # options: + # user: + # required: false + # type: str + # description: The user for which the role applies + # team: + # required: false + # type: str + # description: The team for which the role applies + # role: + # required: false + # type: str + # description: The role which is applied to one of {`target_team`, `inventory`, `job_template`, `target_team`, `inventory`, `job_template`} for either `user` or `team` + # target_team: + # required: false + # type: str + # description: The team the role applies against + # target_teams: + # required: false + # type: list + # elements: str + # description: The teams the role applies against + # inventory: + # required: false + # type: str + # description: The inventory the role applies against + # inventories: + # required: false + # type: list + # elements: str + # description: The inventories the role applies against + # job_template: + # required: false + # type: str + # description: The job template the role applies against + # job_templates: + # required: false + # type: list + # elements: str + # description: The job templates the role applies against + # workflow: + # required: false + # type: str + # description: The workflow the role applies against + # workflows: + # required: false + # type: list + # elements: str + # description: The workflows the role applies against + # credential: + # required: false + # type: str + # description: The credential the role applies against + # credentials: + # required: false + # type: list + # elements: str + # description: The credentials the role applies against + # organization: + # required: false + # type: str + # description: The organization the role applies against + # organizations: + # required: false + # type: list + # elements: str + # description: The organizations the role applies against + # lookup_organization: + # required: false + # type: str + # description: Organization the inventories, job templates, projects, or workflows the items exists in. Used to help lookup the object, for organization roles see organization. If not provided, will lookup by name only, which does not work with duplicates. + # project: + # required: false + # type: str + # description: The project the role applies against + # projects: + # required: false + # type: list + # elements: str + # description: The project the role applies against + # state: + # default: "{{ controller_state | default('present') }}" + # required: false + # type: str + # description: Desired state of the resource. + + # Async variables + controller_configuration_roles_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_roles_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_roles_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/schedules/meta/argument_specs.yml b/roles/schedules/meta/argument_specs.yml new file mode 100644 index 000000000..bfaa049b7 --- /dev/null +++ b/roles/schedules/meta/argument_specs.yml @@ -0,0 +1,180 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create schedules on Ansible Controller. + options: + controller_schedules: + description: Data structure describing your schedules + type: list + elements: dict + # options: + # name: + # required: true + # type: str + # description: Name of schedule + # new_name: + # type: str + # required: false + # description: Setting this option will change the existing name (looked up via the name field). + # description: + # required: false + # type: str + # description: Description to use for the schedule. + # rrule: + # required: true + # type: str + # description: A value representing the schedules iCal recurrence rule. See the awx.awx.schedule plugin for help constructing this value + # extra_data: + # required: false + # type: dict + # description: Extra vars for the job template. Only allowed if prompt on launch + # inventory: + # required: false + # type: str + # description: Inventory applied to job template, assuming the job template prompts for an inventory. + # credentials: + # required: false + # type: list + # description: List of credentials applied as a prompt, assuming job template prompts for credentials + # scm_branch: + # default: + # required: false + # type: str + # description: Branch to use in the job run. Project default used if not set. Only allowed if `allow_override` set to true on project + # execution_environment: + # required: false + # type: str + # description: Execution Environment applied as a prompt. used if not set. Only allowed if `ask_execution_environment_on_launch` set to true on Job Template + # forks: + # required: false + # type: str + # description: Forks applied as a prompt. used if not set. Only allowed if `ask_forks_on_launch` set to true on Job Template + # instance_groups: + # required: false + # type: str + # description: List of Instance Groups applied as a prompt. used if not set. Only allowed if `ask_instance_groups_on_launch` set to true on Job Template + # job_slice_count: + # required: false + # type: str + # description: Job Slice Count to use in the job run. used if not set. Only allowed if `ask_job_slice_count_on_launch` set to true on Job Template + # labels: + # required: false + # type: list + # description: List of labels to use in the job run. used if not set. Only allowed if `ask_labels_on_launch` set to true on Job Template + # timeout: + # required: false + # type: str + # description: Timeout to use in the job run. used if not set. Only allowed if `ask_timeout_on_launch` set to true on Job Template + # job_type: + # required: false + # type: str + # description: The job type used for the job template. + # job_tags: + # required: false + # type: str + # description: Comma separated list of tags to apply to the job + # skip_tags: + # required: false + # type: str + # description: Comma separated list of tags to skip for the job + # limit: + # required: false + # type: str + # description: A host pattern to constrain the list of hosts managed or affected by the playbook + # diff_mode: + # required: false + # type: bool + # description: Enable diff mode for the job template. + # verbosity: + # required: false + # type: int + # choices: + # - 0 + # - 1 + # - 2 + # - 3 + # - 4 + # - 5 + # description: Level of verbosity for the job. Only allowed if configured to prompt on launch + # unified_job_template: + # required: false + # type: str + # description: The name of object that is being targeted by the schedule. Example objects include projects, inventory sources, and templates. Required if state='present. + # organization: + # required: false + # type: str + # description: The organization the unified job template exists in. Used for looking up the unified job template, not a direct model field. + # enabled: + # default: true + # required: false + # type: bool + # description: Enabled processing of this job template + # state: + # default: "{{ controller_state | default('present') }}" + # required: false + # type: str + # description: Desired state of the resource. + + # Async variables + controller_configuration_schedules_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_schedules_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_schedules_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/settings/meta/argument_specs.yml b/roles/settings/meta/argument_specs.yml new file mode 100644 index 000000000..7435b956b --- /dev/null +++ b/roles/settings/meta/argument_specs.yml @@ -0,0 +1,86 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create settings on Ansible Controller. + options: + controller_settings: + description: Data structure describing your settings. Type is list if providing name/value and type dict if providing settings. + type: raw + # options: + # settings: + # required: false + # type: dict + # description: Dict of multiple settings to set (This is the preferable method) + # name: + # required: false + # type: str + # description: Name of setting + # value: + # required: false + # type: str + # description: Value of the setting + + + # Async variables + controller_configuration_settings_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_settings_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_settings_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/teams/meta/argument_specs.yml b/roles/teams/meta/argument_specs.yml new file mode 100644 index 000000000..514e6e0ea --- /dev/null +++ b/roles/teams/meta/argument_specs.yml @@ -0,0 +1,95 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create teams on Ansible Controller. + options: + controller_teams: + description: Data structure describing your teams + type: list + elements: dict + # options: + # name: + # required: true + # type: str + # description: Name of team + # new_name: + # type: str + # required: false + # description: Setting this option will change the existing name (looked up via the name field). + # description: + # required: false + # type: str + # description: Description to use for the team. + # organization: + # required: false + # type: str + # description: Organization this team belongs to. + # state: + # default: "{{ controller_state | default('present') }}" + # required: false + # type: str + # description: Desired state of the resource. + + # Async variables + controller_configuration_teams_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_teams_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_teams_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/users/README.md b/roles/users/README.md index 26688c109..5d5ad6d69 100644 --- a/roles/users/README.md +++ b/roles/users/README.md @@ -25,6 +25,7 @@ Currently: |`controller_password`|""|no|Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified.|| |`controller_oauthtoken`|""|no|Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified.||| |`controller_user_accounts`|`see below`|yes|Data structure describing your user entries described below.|| +|`controller_user_default_password`|""|no|Global variable to set the password for all users.|| ### Secure Logging Variables @@ -59,8 +60,7 @@ This also speeds up the overall role. |Variable Name|Default Value|Required|Type|Description| |:---:|:---:|:---:|:---:|:---:| |`username`|""|yes|str|The username of the user| -|`password`|""|no|str|The password of the user| -|`controller_user_default_password`|""|no|str|Global variable to set the password for all users.| +|`password`|"{{ controller_user_default_password }}"|no|str|The password of the user| |`email`|""|yes|str|The email of the user| |`first_name`|""|no|str|The first name of the user| |`last_name`|""|no|str|The last name of the user| diff --git a/roles/users/meta/argument_specs.yml b/roles/users/meta/argument_specs.yml new file mode 100644 index 000000000..21f35615a --- /dev/null +++ b/roles/users/meta/argument_specs.yml @@ -0,0 +1,124 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create users on Ansible Controller. + options: + controller_users: + description: Data structure describing your users + type: list + elements: dict + # options: + # username: + # required: true + # type: str + # description: Username of user + # password: + # required: true + # type: str + # description: Password of user, defaults to "{{ controller_user_default_password }}" if not set + # email: + # required: false + # type: str + # description: email of the user + # first_name: + # required: false + # type: str + # description: first_name of the user + # last_name: + # required: false + # type: str + # description: last_name of the user + # is_superuser: + # default: false + # required: false + # type: bool + # description: Whether the user is a superuser + # is_system_auditor: + # default: false + # required: false + # type: bool + # description: Whether the user is an auditor + # update_secrets: + # default: true + # required: false + # type: bool + # description: True will always change password if user specifies password, even if API gives $encrypted$ for password. False will only set the password if other values change too. + # organization: + # required: false + # type: str + # description: Organization this user belongs to. + # state: + # default: "{{ controller_state | default('present') }}" + # required: false + # type: str + # description: Desired state of the resource. + + controller_user_default_password: + default: None + required: false + type: str + description: Global variable to set the password for all users. + + # Async variables + controller_configuration_users_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_users_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_users_secure_logging: + default: "{{ controller_configuration_secure_logging | default(true) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_configuration_secure_logging: + default: true + required: false + type: bool + description: This variable enables secure logging across all roles as a default. + + # Generic across all roles + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/workflow_job_templates/meta/argument_specs.yml b/roles/workflow_job_templates/meta/argument_specs.yml new file mode 100644 index 000000000..9c3980d8f --- /dev/null +++ b/roles/workflow_job_templates/meta/argument_specs.yml @@ -0,0 +1,341 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create workflow job templates on Ansible Controller. + options: + controller_workflow_job_templates: + description: Data structure describing your workflow_job_templates + type: list + elements: dict + # options: + # name: + # required: true + # type: str + # description: Name of workflow_job_template + # new_name: + # type: str + # required: false + # description: Setting this option will change the existing name (looked up via the name field). + # copy_from: + # required: false + # type: str + # description: Name or id to copy the workflow_job_template from. This will copy an existing workflow_job_template and change any parameters supplied. + # description: + # required: false + # type: str + # description: Description to use for the workflow_job_template. + # organization: + # required: false + # type: str + # description: Organization this workflow_job_template belongs to. + # inventory: + # required: false + # type: str + # description: Name of the inventory to use for the job template. + # limit: + # required: false + # type: str + # description: A host pattern to further constrain the list of hosts managed or affected by the playbook + # extra_vars: + # required: false + # type: dict + # description: Specify extra_vars for the template. + # job_tags: + # required: false + # type: str + # description: Comma separated list of the tags to use for the job template. + # ask_variables_on_launch: + # required: false + # type: bool + # description: Prompt user for extra_vars on launch. + # ask_limit_on_launch: + # required: false + # type: bool + # description: Prompt user for a limit on launch. + # ask_tags_on_launch: + # required: false + # type: bool + # description: Prompt user for job tags on launch. + # ask_skip_tags_on_launch: + # required: false + # type: bool + # description: Prompt user for job tags to skip on launch. + # ask_inventory_on_launch: + # required: false + # type: bool + # description: Prompt user for inventory on launch. + # ask_labels_on_launch: + # required: false + # type: bool + # description: Prompt user for labels on launch. + # ask_scm_branch_on_launch: + # required: false + # type: bool + # description: Prompt user for scm branch on launch. + # survey_enabled: + # required: false + # type: bool + # description: Enable a survey on the job template. + # survey_spec: + # required: false + # type: dict + # description: JSON/YAML dict formatted survey definition. + # survey: + # required: false + # type: dict + # description: JSON/YAML dict formatted survey definition. Alias of survey_spec + # allow_simultaneous: + # required: false + # type: bool + # description: Allow simultaneous runs of the job template. + # webhook_service: + # required: false + # type: str + # description: Service that webhook requests will be accepted from (github, gitlab) + # webhook_credential: + # required: false + # type: str + # description: Personal Access Token for posting back the status to the service API + # scm_branch: + # required: false + # type: str + # description: Branch to use in job run. Project default used if blank. Only allowed if project allow_override field is set to true. + # labels: + # required: false + # type: list + # elements: str + # description: The labels applied to this job template. + # notification_templates_approvals: + # required: false + # type: list + # elements: str + # description: The notifications on approval to use for this organization in a list. + # notification_templates_started: + # required: false + # type: list + # elements: str + # description: The notifications on started to use for this organization in a list. + # notification_templates_success: + # required: false + # type: list + # elements: str + # description: The notifications on success to use for this organization in a list. + # notification_templates_error: + # required: false + # type: list + # elements: str + # description: The notifications on error to use for this organization in a list. + # state: + # default: "{{ controller_state | default('present') }}" + # required: false + # type: str + # description: Desired state of the resource. + # simplified_workflow_nodes: + # required: false + # type: list + # elements: dict + # description: List of workflow nodes to apply + # options: + # workflow_job_template: + # default: None + # required: true + # type: str + # description: The workflow job template the node exists in. Used for looking up the node, cannot be modified after creation. + # identifier: + # default: None + # required: true + # type: str + # description: An identifier for this node that is unique within its workflow. It is copied to workflow job nodes corresponding to this node. This functions the same as the name field for other resources, however if it is not set, it will be set to a random UUID4 value. Recommended to use Column and row numbers for identifiers such as Node401. [Refer to this documentation for more](https://github.com/ansible/awx/blob/devel/docs/workflow.md) + # unified_job_template: + # default: None + # required: false + # type: str + # description: Name of unified job template to run in the workflow. Can be a job template, project, inventory source, etc. This parameter is mutually exclusive with approval_node. + # lookup_organization: + # default: None + # required: false + # type: str + # description: Organization the inventories, job templates, projects, or workflows the items exists in. Used to help lookup the object, for organization roles see organization. If not provided, will lookup by name only, which does not work with duplicates. + # execution_environment: + # default: job_template_default + # required: false + # type: str + # description: Execution Environment applied as a prompt. Job Template default used if not set. Only allowed if `ask_execution_environment_on_launch` set to true on Job Template + # forks: + # default: job_template_default + # required: false + # type: str + # description: 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: + # default: job_template_default + # required: false + # type: str + # description: 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: + # default: job_template_default + # required: false + # type: str + # description: 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: + # default: job_template_default + # required: false + # type: list + # elements: str + # description: 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. + # timeout: + # default: job_template_default + # required: false + # type: str + # description: 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: + # default: None + # required: false + # type: str + # description: A dictionary of Name, description, and timeout values for the approval node. This parameter is mutually exclusive with unified_job_template. + # organization: + # default: None + # required: false + # type: str + # description: The organization of the workflow job template the node exists in. Used for looking up the workflow, not a direct model field. + # all_parents_must_converge: + # default: None + # required: false + # type: bool + # description: If enabled then the node will only run if all of the parent nodes have met the criteria to reach this node + # always_nodes: + # default: None + # required: false + # type: list + # elements: str + # description: Nodes that will run after this node completes. + # failure_nodes: + # default: None + # required: false + # type: list + # elements: str + # description: Nodes that will run after this node completes. + # success_nodes: + # default: None + # required: false + # type: list + # elements: str + # description: Nodes that will run after this node completes. + # verbosity: + # default: None + # required: false + # type: str + # description: Verbosity applied as a prompt, if job template prompts for verbosity + # state: + # default: "{{ controller_state | default('present') }}" + # required: false + # type: str + # description: Desired state of the resource + # credentials: + # default: None + # required: false + # type: list + # description: Credentials to be applied to job as launch-time prompts. + # diff_mode: + # default: None + # required: false + # type: bool + # description: Run diff mode, applied as a prompt, if job template prompts for diff mode + # extra_data: + # default: None + # required: false + # type: dict + # description: Variables to apply at launch time. Will only be accepted if job template prompts for vars or has a survey asking for those vars. extra_data are extra_vars at the node level and named so to match the module and the API. These are only for "ask extra vars on prompt" on a given job template. + # inventory: + # default: None + # required: false + # type: str + # description: Inventory applied as a prompt, if job template prompts for inventory + # job_tags: + # default: None + # required: false + # type: str + # description: NJob tags applied as a prompt, if job template prompts for job tags + # job_type: + # default: None + # required: false + # type: str + # description: Job type applied as a prompt, if job template prompts for job type + # limit: + # default: None + # required: false + # type: str + # description: Limit to act on, applied as a prompt, if job template prompts for limit + # scm_branch: + # default: None + # required: false + # type: str + # description: SCM branch applied as a prompt, if job template prompts for SCM branch + # skip_tags: + # default: None + # required: false + # type: str + # description: Tags to skip, applied as a prompt, if job template prompts for job tags + + # Async variables + controller_configuration_workflow_job_templates_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_workflow_job_templates_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_workflow_job_templates_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/workflow_launch/meta/argument_specs.yml b/roles/workflow_launch/meta/argument_specs.yml new file mode 100644 index 000000000..e0a164543 --- /dev/null +++ b/roles/workflow_launch/meta/argument_specs.yml @@ -0,0 +1,110 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to launch workflows on Ansible Controller. + options: + controller_projects: + description: Data structure describing your workflow_launch + type: list + elements: dict + # options: + # name: + # required: true + # type: str + # description: Name of group + # organization: + # required: false + # type: str + # description: Organization the project belongs to. + # inventory: + # required: false + # type: str + # description: Inventory to use for the job ran with this workflow, only used if prompt for inventory is set. + # limit: + # required: false + # type: str + # description: Limit to use for the job_template. + # scm_branch: + # required: false + # type: str + # description: A specific of the SCM project to run the template on. + # extra_vars: + # required: false + # type: dict + # description: Any extra vars required to launch the job. ask_extra_vars needs to be set to True via controller_job_template module. + # wait: + # required: false + # type: bool + # description: Wait for the job to complete. + # interval: + # default: "{{ controller_configuration_workflow_launch_async_delay }}" + # required: false + # type: float + # description: The interval to request an update from controller. + # timeout: + # required: false + # type: int + # description: If waiting for the update to complete this will abort after this amount of seconds. + + # Async variables + controller_configuration_workflow_launch_async_retries: + default: "{{ controller_configuration_async_retries | default(30) }}" + required: false + description: This variable sets the number of retries to attempt for the role. + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_workflow_launch_async_delay: + default: "{{ controller_configuration_async_delay | default(1) }}" + required: false + description: This variable sets delay between retries for the role. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + # No_log variables + controller_configuration_groups_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... From 71624df532f187c3bf189f1ddd8cd43ba3e2f69e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 11 Mar 2023 11:14:14 -0500 Subject: [PATCH 78/94] Update pre-commit (#533) Co-authored-by: sean-m-sullivan --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9e8252b4c..344225b2d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: # types: # - yaml - repo: 'https://github.com/ansible-community/ansible-lint.git' - rev: v6.14.1 + rev: v6.14.2 hooks: # see discussions here about what arguments are used, and behavior # https://github.com/ansible/ansible-lint/issues/649 From e4e4747b500eb056fbdb33f7ab9a601f619419b5 Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Sun, 12 Mar 2023 17:58:19 -0400 Subject: [PATCH 79/94] update testing (#534) --- .github/tests/configs/instances.yml | 6 +- .github/tests/configs/projects.yml | 2 +- .github/tests/configure_controller.yml | 36 +++++--- .../configure_controller_export_model.yml | 26 ++++-- .github/workflows/ci_standalone.yml | 27 ++++++ .github/workflows/ci_standalone_versioned.yml | 77 +++++++++++++++++ .github/workflows/ci_testing.yaml | 18 ---- .github/workflows/ci_workflow.yaml | 85 ------------------- 8 files changed, 151 insertions(+), 126 deletions(-) create mode 100644 .github/workflows/ci_standalone.yml create mode 100644 .github/workflows/ci_standalone_versioned.yml delete mode 100644 .github/workflows/ci_testing.yaml delete mode 100644 .github/workflows/ci_workflow.yaml diff --git a/.github/tests/configs/instances.yml b/.github/tests/configs/instances.yml index dc0f39617..ac562fff6 100644 --- a/.github/tests/configs/instances.yml +++ b/.github/tests/configs/instances.yml @@ -1,5 +1,5 @@ --- -controller_instances: - - hostname: my-instance.prod.example.com - capacity_adjustment: 0.4 +# controller_instances: +# - hostname: my-instance.prod.example.com +# capacity_adjustment: 0.4 ... diff --git a/.github/tests/configs/projects.yml b/.github/tests/configs/projects.yml index c4d0a730c..7a6e6418c 100644 --- a/.github/tests/configs/projects.yml +++ b/.github/tests/configs/projects.yml @@ -1,6 +1,6 @@ --- controller_configuration_projects_async_retries: 60 -controller_configuration_projects_async_delay: 2 +controller_configuration_projects_async_delay: 3 controller_projects: - name: Test Project scm_type: git diff --git a/.github/tests/configure_controller.yml b/.github/tests/configure_controller.yml index b7c990f5c..f56146e51 100644 --- a/.github/tests/configure_controller.yml +++ b/.github/tests/configure_controller.yml @@ -38,6 +38,14 @@ ansible.builtin.debug: msg: "Using the 'controller_api' plugin from: {{ controller_api_plugin }}" + - name: Include vars from configs directory + ansible.builtin.include_vars: + dir: ./configs + ignore_files: [controller_config.yml.template] + extensions: ["yml"] + tags: + - always + - name: Wait for Controller to come up ansible.builtin.uri: url: "https://{{ controller_hostname }}/api/v2/ping" @@ -49,23 +57,31 @@ delay: 30 ignore_errors: true - - name: "Show result of ping" + - name: Wait for the controller node to be up + uri: + url: "https://{{ controller_hostname }}/api/v2/mesh_visualizer/" + user: "{{ controller_username }}" + password: "{{ controller_password }}" + method: GET + validate_certs: false + force_basic_auth: true + status_code: 200 + body_format: json + register: mesh_data + until: mesh_data.json is defined + retries: 80 + delay: 5 + ignore_errors: true + + - name: "Show result of mesh_visualizer" ansible.builtin.debug: - var: result + var: mesh_data - name: Sleep for 60 seconds and allow awx to come up. ansible.builtin.wait_for: timeout: 60 delegate_to: localhost - - name: Include vars from configs directory - ansible.builtin.include_vars: - dir: ./configs - ignore_files: [controller_config.yml.template] - extensions: ["yml"] - tags: - - always - roles: - dispatch # The dispatch role calls all of the other roles. diff --git a/.github/tests/configure_controller_export_model.yml b/.github/tests/configure_controller_export_model.yml index eb1d003f6..eeb288071 100644 --- a/.github/tests/configure_controller_export_model.yml +++ b/.github/tests/configure_controller_export_model.yml @@ -37,21 +37,29 @@ ansible.builtin.debug: msg: "Using the 'controller_api' plugin from: {{ controller_api_plugin }}" - - name: Wait for Controller to come up - ansible.builtin.uri: - url: "{{ controller_hostname }}/api/v2/ping" - status_code: 200 - register: result - until: result.status == 200 - retries: 20 - delay: 30 - - name: Include vars from controller_configs directory ansible.builtin.include_vars: dir: ./configs_export_model ignore_files: [README.md] extensions: ["yml"] + - name: Wait for the controller to be up + uri: + url: "https://{{ controller_hostname }}/api/v2/mesh_visualizer/" + user: "{{ controller_username }}" + password: "{{ controller_password }}" + method: GET + validate_certs: false + force_basic_auth: true + status_code: 200 + body_format: json + register: mesh_data + until: mesh_data.json.nodes[0].enabled + retries: 120 + delay: 5 + + + roles: - {role: organizations, when: controller_organizations is defined, tags: organizations} - {role: users, when: controller_user_accounts is defined, tags: users} diff --git a/.github/workflows/ci_standalone.yml b/.github/workflows/ci_standalone.yml new file mode 100644 index 000000000..46e054e66 --- /dev/null +++ b/.github/workflows/ci_standalone.yml @@ -0,0 +1,27 @@ +--- +name: Test collection with AWX matrix +on: + push: + branches: + - '*_' + - devel + tags: + - '*_' # ending underscore for trying things + - 'v[0-9]+.[0-9]+.[0-9]+' # final version + - 'v[0-9]+.[0-9]+.[0-9]+[abrc]+[0-9]+' # alpha, beta, release candidate (rc) + - 'v[0-9]+.[0-9]+.[0-9]+.dev[0-9]+' # development versions + pull_request: + +jobs: + ci_standalone: + strategy: + fail-fast: false + matrix: + awx_version: + - 21.11.0 + - 21.12.0 + - 21.13.0 + # - devel Disabled for now + uses: "./.github/workflows/ci_standalone_versioned.yml" + with: + awx_version: ${{ matrix.awx_version }} diff --git a/.github/workflows/ci_standalone_versioned.yml b/.github/workflows/ci_standalone_versioned.yml new file mode 100644 index 000000000..c29c3a167 --- /dev/null +++ b/.github/workflows/ci_standalone_versioned.yml @@ -0,0 +1,77 @@ +--- +name: Test collection with AWX + +on: + workflow_call: + inputs: + awx_version: + description: The version to pull of awx + required: true + type: string +env: + # Run docker-compose up in the background + COMPOSE_UP_OPTS: -d + +jobs: + integration: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: "Checkout galaxy_ng" + uses: actions/checkout@v2 + with: + repository: ansible/awx + path: awx + ref: ${{ inputs.awx_version }} + + - uses: actions/setup-python@v2 + with: + python-version: "3.8" + + - name: Update apt + run: sudo apt -y update + + - name: Install requirements + run: sudo apt-get install -y libsasl2-dev python3-dev libldap2-dev libssl-dev build-essential + + - name: Install docker-compose + run: pip3 install --upgrade docker-compose + + - name: collect system info + run: whoami; id; pwd; ls -al; uname -a ; df -h .; mount ; cat /etc/issue; docker --version ; ps aux | fgrep -i docker; ls -al /var/run/containerd/containerd.sock + + - name: set the awx password in the inventory + run: echo "admin_password='password'" >> awx/tools/docker-compose/inventory + + - name: build images + working-directory: awx + run: make docker-compose-build + + - name: build stack + working-directory: awx + run: make docker-compose up + continue-on-error: true + + - name: give some time to spin up + run: sleep 200 + + - name: Preload data + working-directory: awx + run: docker exec tools_awx_1 awx-manage create_preload_data + + - name: set the awx password in the inventory + run: ls awx/tools/docker-compose/_sources/secrets + + - name: Display Versions + run: which python && pip --version && ansible --version + + - name: "Install Galaxy dependencies" + run: ansible-galaxy collection install -r .github/collections/requirements.yml + + - name: "Perform playbook tests" + run: ansible-playbook .github/tests/configure_controller.yml -e controller_hostname=localhost:8043 -v + + - name: "Perform export model playbook tests" + run: ansible-playbook .github/tests/configure_controller_export_model.yml -e controller_hostname=localhost:8043 -v +... diff --git a/.github/workflows/ci_testing.yaml b/.github/workflows/ci_testing.yaml deleted file mode 100644 index c186ce76a..000000000 --- a/.github/workflows/ci_testing.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Run Test Playbooks on AWX workflow -on: - push: - branches: - - '*_' - - devel - tags: - - '*_' # ending underscore for trying things - - 'v[0-9]+.[0-9]+.[0-9]+' # final version - - 'v[0-9]+.[0-9]+.[0-9]+[abrc]+[0-9]+' # alpha, beta, release candidate (rc) - - 'v[0-9]+.[0-9]+.[0-9]+.dev[0-9]+' # development versions - pull_request: - -jobs: - Integration-test: - uses: "./.github/workflows/ci_workflow.yaml" -... diff --git a/.github/workflows/ci_workflow.yaml b/.github/workflows/ci_workflow.yaml deleted file mode 100644 index eaed1a930..000000000 --- a/.github/workflows/ci_workflow.yaml +++ /dev/null @@ -1,85 +0,0 @@ ---- -name: Run Test Playbooks on AWX - -on: - workflow_call - -jobs: - Integration-test: - name: Deploy AWX to Minikube and run tests - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v2 - - - name: "Install dependencies" - run: pip install -r .github/requirements.txt - - - name: Setup Minikube - uses: manusa/actions-setup-minikube@v2.7.2 - with: - minikube version: 'v1.28.0' - kubernetes version: 'v1.25.4' - github token: ${{ secrets.GITHUB_TOKEN }} - start args: '--addons=ingress' - - - name: Wait / Sleep - uses: jakejarvis/wait-action@v0.1.0 - with: - time: '20s' - - - name: Setup awx operator - run: | - minikube kubectl create secret generic awx-admin-password -- --from-literal=password=password - minikube addons enable ingress - alias kubectl="minikube kubectl --" - - - name: kustomize awx operator - working-directory: .github/workflow-config - run: kustomize build . | kubectl apply -f - - - - name: Wait / Sleep - uses: jakejarvis/wait-action@v0.1.0 - with: - time: '30s' - - - name: kustomize awx - working-directory: .github/workflow-config/kube - run: kustomize build . | kubectl apply -f - - - - name: Wait / Sleep - uses: jakejarvis/wait-action@v0.1.0 - with: - time: '30s' - - - name: Check service URL - uses: nick-invision/retry@v2 - with: - timeout_minutes: 10 - max_attempts: 25 - retry_wait_seconds: 30 - command: minikube service awx-service --url - - - name: minikube kubectl get pods - run: minikube kubectl get pods - - - name: Set service url - run: echo '::set-output name=SERVICEURL::$(minikube service awx-service --url)' - id: service-url - - - name: Display service url - run: echo "Service URL is ${{ steps.service-url.outputs.SERVICEURL }}" - - - name: Display Versions - run: which python && pip --version && ansible --version - - - name: "Install Galaxy dependencies" - run: ansible-galaxy collection install -r .github/collections/requirements.yml - - - name: "Perform playbook tests" - run: ansible-playbook .github/tests/configure_controller.yml -e controller_hostname=${{ steps.service-url.outputs.SERVICEURL }} - - - name: "Perform export model playbook tests" - run: ansible-playbook .github/tests/configure_controller_export_model.yml -e controller_hostname=${{ steps.service-url.outputs.SERVICEURL }} -... From b87ed8c8c9ad2b04f6ac45303cc4b63952afb203 Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Mon, 13 Mar 2023 12:40:14 -0400 Subject: [PATCH 80/94] update devel test (#535) --- .github/tests/configure_controller.yml | 1 - .github/tests/configure_controller_export_model.yml | 2 +- .github/workflows/ci_standalone.yml | 8 +++++--- .github/workflows/ci_standalone_versioned.yml | 9 +-------- .github/workflows/release.yml | 2 +- 5 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/tests/configure_controller.yml b/.github/tests/configure_controller.yml index f56146e51..49b6713d1 100644 --- a/.github/tests/configure_controller.yml +++ b/.github/tests/configure_controller.yml @@ -71,7 +71,6 @@ until: mesh_data.json is defined retries: 80 delay: 5 - ignore_errors: true - name: "Show result of mesh_visualizer" ansible.builtin.debug: diff --git a/.github/tests/configure_controller_export_model.yml b/.github/tests/configure_controller_export_model.yml index eeb288071..cddfc3d75 100644 --- a/.github/tests/configure_controller_export_model.yml +++ b/.github/tests/configure_controller_export_model.yml @@ -54,7 +54,7 @@ status_code: 200 body_format: json register: mesh_data - until: mesh_data.json.nodes[0].enabled + until: mesh_data.json is defined retries: 120 delay: 5 diff --git a/.github/workflows/ci_standalone.yml b/.github/workflows/ci_standalone.yml index 46e054e66..a3722811b 100644 --- a/.github/workflows/ci_standalone.yml +++ b/.github/workflows/ci_standalone.yml @@ -18,10 +18,12 @@ jobs: fail-fast: false matrix: awx_version: - - 21.11.0 - - 21.12.0 + - devel - 21.13.0 - # - devel Disabled for now + - 21.12.0 + - 21.11.0 + # - 20.1.0 Diabled until working + # - 19.5.1 Diabled until working uses: "./.github/workflows/ci_standalone_versioned.yml" with: awx_version: ${{ matrix.awx_version }} diff --git a/.github/workflows/ci_standalone_versioned.yml b/.github/workflows/ci_standalone_versioned.yml index c29c3a167..27b337c97 100644 --- a/.github/workflows/ci_standalone_versioned.yml +++ b/.github/workflows/ci_standalone_versioned.yml @@ -54,14 +54,7 @@ jobs: continue-on-error: true - name: give some time to spin up - run: sleep 200 - - - name: Preload data - working-directory: awx - run: docker exec tools_awx_1 awx-manage create_preload_data - - - name: set the awx password in the inventory - run: ls awx/tools/docker-compose/_sources/secrets + run: sleep 30 - name: Display Versions run: which python && pip --version && ansible --version diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 09355cad8..ef0f399cd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ on: jobs: integration-test: - uses: "./.github/workflows/ci_workflow.yaml" + uses: "./.github/workflows/ci_standalone.yaml" release: needs: - integration-test From 0726d4dfd75778bf29da35cdb8905643bc50f4d3 Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Mon, 13 Mar 2023 18:46:14 -0400 Subject: [PATCH 81/94] Linting fix (#536) * Fix incorrect required from no to yes inventory organization * fix linting --------- Co-authored-by: Tony Kay --- roles/filetree_read/tests/config-controller-filetree.yml | 4 ++-- roles/inventories/README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/filetree_read/tests/config-controller-filetree.yml b/roles/filetree_read/tests/config-controller-filetree.yml index 9a8fd5a85..94992f6fe 100644 --- a/roles/filetree_read/tests/config-controller-filetree.yml +++ b/roles/filetree_read/tests/config-controller-filetree.yml @@ -33,8 +33,8 @@ controller_oauthtoken: "{{ authtoken_res.json.token }}" controller_oauthtoken_url: "{{ authtoken_res.json.url }}" roles: - - redhat_cop.controller_configuration.filetree_read - - redhat_cop.controller_configuration.dispatch + - infra.controller_configuration.filetree_read + - infra.controller_configuration.dispatch post_tasks: - name: "Delete the Authentication Token used" diff --git a/roles/inventories/README.md b/roles/inventories/README.md index d574d9b16..e19151b5c 100644 --- a/roles/inventories/README.md +++ b/roles/inventories/README.md @@ -81,7 +81,7 @@ The role will strip the double space between the curly bracket in order to provi |`name`|""|yes|str|Name of this inventory.| |`copy_from`|""|no|str|Name or id to copy the inventory from. This will copy an existing inventory and change any parameters supplied.| |`description`|""|no|str|Description of this inventory.| -|`organization`|""|no|str|Organization this inventory belongs to.| +|`organization`|""|yes|str|Organization this inventory belongs to.| |`instance_groups`|""|no|list|list of Instance Groups for this Inventory to run on.| |`variables`|`{}`|no|dict|Variables for the inventory.| |`kind`|""|no|str|The kind of inventory. Currently choices are '' and 'smart'| From 44d5ccd477dc19c433e551c44431f0a42b6e5e82 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 15 Mar 2023 15:37:12 +0000 Subject: [PATCH 82/94] Add GCal invite for community meeting (#541) * Add GCal invite for community meeting * Update README.md * Ignore linting for a couple lines * Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 97bf21456..1493b0037 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ ![pre-commit tests](https://github.com/redhat-cop/controller_configuration/actions/workflows/pre-commit.yml/badge.svg) ![Galaxy Release](https://github.com/redhat-cop/controller_configuration/workflows/galaxy-release/badge.svg) + This Ansible collection allows for easy interaction with an AWX or Ansible Controller server via Ansible roles using the AWX/Controller collection modules. @@ -172,6 +173,11 @@ Adding the ability to use direct output from the awx export command in the roles 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 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: + + + + ## Code of Conduct This collection follows the Ansible project's From 11125e1d4b5a8e059e53a315c65552404a09f20a Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 15 Mar 2023 16:24:40 +0000 Subject: [PATCH 83/94] Add arg specs for remaining roles (#540) * Add arg spec for dispatch * Add arg_spec and fix typos * fix typo * fix missing info --- roles/applications/meta/argument_specs.yml | 4 +- .../meta/argument_specs.yml | 4 +- .../credential_types/meta/argument_specs.yml | 4 +- roles/credentials/meta/argument_specs.yml | 4 +- roles/dispatch/meta/argument_specs.yml | 99 ++++++++++ .../meta/argument_specs.yml | 4 +- roles/filetree_create/meta/argument_specs.yml | 79 ++++++++ roles/filetree_read/meta/argument_specs.yml | 186 ++++++++++++++++++ roles/groups/meta/argument_specs.yml | 4 +- roles/hosts/meta/argument_specs.yml | 4 +- roles/instance_groups/meta/argument_specs.yml | 4 +- roles/instances/meta/argument_specs.yml | 4 +- roles/inventories/meta/argument_specs.yml | 4 +- .../meta/argument_specs.yml | 4 +- .../inventory_sources/meta/argument_specs.yml | 4 +- roles/job_launch/meta/argument_specs.yml | 4 +- roles/job_templates/meta/argument_specs.yml | 4 +- roles/labels/meta/argument_specs.yml | 4 +- roles/license/meta/argument_specs.yml | 4 +- .../meta/argument_specs.yml | 4 +- roles/object_diff/meta/argument_specs.yml | 75 +++++++ roles/organizations/meta/argument_specs.yml | 4 +- roles/project_update/meta/argument_specs.yml | 4 +- roles/projects/meta/argument_specs.yml | 4 +- roles/roles/meta/argument_specs.yml | 4 +- roles/schedules/meta/argument_specs.yml | 4 +- roles/settings/meta/argument_specs.yml | 4 +- roles/teams/meta/argument_specs.yml | 4 +- roles/users/meta/argument_specs.yml | 4 +- .../meta/argument_specs.yml | 4 +- roles/workflow_launch/meta/argument_specs.yml | 4 +- 31 files changed, 493 insertions(+), 54 deletions(-) create mode 100644 roles/dispatch/meta/argument_specs.yml create mode 100644 roles/filetree_create/meta/argument_specs.yml create mode 100644 roles/filetree_read/meta/argument_specs.yml create mode 100644 roles/object_diff/meta/argument_specs.yml diff --git a/roles/applications/meta/argument_specs.yml b/roles/applications/meta/argument_specs.yml index 9e8b5dd5a..bc2524c7b 100644 --- a/roles/applications/meta/argument_specs.yml +++ b/roles/applications/meta/argument_specs.yml @@ -69,7 +69,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -90,7 +90,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/credential_input_sources/meta/argument_specs.yml b/roles/credential_input_sources/meta/argument_specs.yml index f268102f5..ed3ec9e5e 100644 --- a/roles/credential_input_sources/meta/argument_specs.yml +++ b/roles/credential_input_sources/meta/argument_specs.yml @@ -58,7 +58,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -79,7 +79,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/credential_types/meta/argument_specs.yml b/roles/credential_types/meta/argument_specs.yml index 72afa739d..01bb2400a 100644 --- a/roles/credential_types/meta/argument_specs.yml +++ b/roles/credential_types/meta/argument_specs.yml @@ -66,7 +66,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -87,7 +87,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/credentials/meta/argument_specs.yml b/roles/credentials/meta/argument_specs.yml index 6ba3ba148..a9c171c14 100644 --- a/roles/credentials/meta/argument_specs.yml +++ b/roles/credentials/meta/argument_specs.yml @@ -79,7 +79,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(true) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: true required: false @@ -100,7 +100,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/dispatch/meta/argument_specs.yml b/roles/dispatch/meta/argument_specs.yml new file mode 100644 index 000000000..ade0c93f7 --- /dev/null +++ b/roles/dispatch/meta/argument_specs.yml @@ -0,0 +1,99 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to call other roles to create objects on Ansible Controller. + options: + controller_configuration_dispatcher_roles: + default: + - {role: settings, var: controller_settings, tags: settings} + - {role: organizations, var: controller_organizations, tags: organizations} + - {role: labels, var: controller_labels, tags: labels} + - {role: users, var: controller_user_accounts, tags: users} + - {role: teams, var: controller_teams, tags: teams} + - {role: credential_types, var: controller_credential_types, tags: credential_types} + - {role: credentials, var: controller_credentials, tags: credentials} + - {role: credential_input_sources, var: controller_credential_input_sources, tags: credential_input_sources} + - {role: notification_templates, var: controller_notifications, tags: notification_templates} + - {role: projects, var: controller_projects, tags: projects} + - {role: inventories, var: controller_inventories, tags: inventories} + - {role: inventory_sources, var: controller_inventory_sources, tags: inventory_sources} + - {role: inventory_source_update, var: controller_inventory_sources, tags: inventory_sources} + - {role: execution_environments, var: controller_execution_environments, tags: execution_environments} + - {role: applications, var: controller_applications, tags: applications} + - {role: instances, var: controller_instances, tags: instances} + - {role: instance_groups, var: controller_instance_groups, tags: instance_groups} + - {role: project_update, var: controller_projects, tags: projects} + - {role: hosts, var: controller_hosts, tags: hosts} + - {role: groups, var: controller_groups, tags: inventories} + - {role: job_templates, var: controller_templates, tags: job_templates} + - {role: workflow_job_templates, var: controller_workflows, tags: workflow_job_templates} + - {role: schedules, var: controller_schedules, tags: schedules} + - {role: roles, var: controller_roles, tags: roles} + required: false + description: List of roles, variables and tags to run through + type: list + elements: dict + options: + role: + required: true + description: Name of role from this collection to call + type: str + var: + required: true + description: Name of variable to be passed to the role + type: str + tags: + required: false + description: Tags to be applied to the role so tagging can be used to run only part of a playbook + + + # Async variables + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or not to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/execution_environments/meta/argument_specs.yml b/roles/execution_environments/meta/argument_specs.yml index 8ba6b47a7..e8415a45f 100644 --- a/roles/execution_environments/meta/argument_specs.yml +++ b/roles/execution_environments/meta/argument_specs.yml @@ -67,7 +67,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -88,7 +88,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/filetree_create/meta/argument_specs.yml b/roles/filetree_create/meta/argument_specs.yml new file mode 100644 index 000000000..f3d6ec748 --- /dev/null +++ b/roles/filetree_create/meta/argument_specs.yml @@ -0,0 +1,79 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to create a local file tree of objects existing in Controller + options: + output_path: + default: "/tmp/filetree_output" + required: false + type: str + description: The path to the output directory where all the generated `yaml` files with the corresponding Objects as code will be written to. + input_tag: + default: + - all + required: false + type: list + elements: str + description: The tags which are applied to the 'sub-roles'. If 'all' is in the list (the default value) then all roles will be called. + query_controller_api_max_objects: + default: 10000 + required: false + type: int + description: Maximum number of objects to return from the list. If a list view returns more an max_objects an exception will be raised + + + # Async variables + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_filetree_create_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or not to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/filetree_read/meta/argument_specs.yml b/roles/filetree_read/meta/argument_specs.yml new file mode 100644 index 000000000..bc3a17a0d --- /dev/null +++ b/roles/filetree_read/meta/argument_specs.yml @@ -0,0 +1,186 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to read from a local file tree and create objects in Controller + options: + orgs: + type: str + default: Acme + required: true + description: This variable sets the organization where should be applied the configuration. + dir_orgs_vars: + type: str + default: orgs_vars + required: true + description: This variable sets the directory path where the variables will be store. + env: + type: str + default: dev + required: false + description: This variable sets the life-cycle environment to use. + controller_location: + type: str + default: '' + required: false + description: This variable sets object location. It is useful when the configuration need to be replicated in an active/passive sites architecture + filetree_controller_settings: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_settings.d/" + required: false + description: Directory path to load controller object variables + filetree_controller_organizations: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_organizations.d/" + required: false + description: Directory path to load controller object variables + filetree_controller_labels: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_labels.d/" + required: false + description: Directory path to load controller object variables + filetree_controller_user_accounts: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_users.d/" + required: false + description: Directory path to load controller object variables + filetree_controller_teams: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_teams.d/" + required: false + description: Directory path to load controller object variables + filetree_controller_credential_types: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_credential_types.d/" + required: false + description: Directory path to load controller object variables + filetree_controller_credentials: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_credentials.d/" + required: false + description: Directory path to load controller object variables + filetree_controller_credential_input_sources: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_credential_input_sources.d/" + required: false + description: Directory path to load controller object variables + filetree_controller_notifications: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_notification_templates.d/" + required: false + description: Directory path to load controller object variables + filetree_controller_projects: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_projects.d/" + required: false + description: Directory path to load controller object variables + filetree_controller_execution_environments: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_execution_environments.d/" + required: false + description: Directory path to load controller object variables + filetree_controller_applications: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_applications.d/" + required: false + description: Directory path to load controller object variables + filetree_controller_inventories: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_inventories.d/" + required: false + description: Directory path to load controller object variables + filetree_controller_inventory_sources: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_inventory_sources.d/" + required: false + description: Directory path to load controller object variables + filetree_controller_instance_groups: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_instance_groups.d/" + required: false + description: Directory path to load controller object variables + filetree_controller_hosts: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_hosts.d/" + required: false + description: Directory path to load controller object variables + filetree_controller_groups: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_groups.d/" + required: false + description: Directory path to load controller object variables + filetree_controller_templates: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_job_templates.d/" + required: false + description: Directory path to load controller object variables + filetree_controller_workflow_job_templates: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_workflow_job_templates.d/" + required: false + description: Directory path to load controller object variables + filetree_controller_schedules: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_schedules.d/" + required: false + description: Directory path to load controller object variables + filetree_controller_roles: + type: raw + default: "{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_roles.d/" + required: false + description: Directory path to load controller object variables + + # Async variables + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_filetree_create_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or not to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/groups/meta/argument_specs.yml b/roles/groups/meta/argument_specs.yml index 37a185fbd..8b0b2a0a9 100644 --- a/roles/groups/meta/argument_specs.yml +++ b/roles/groups/meta/argument_specs.yml @@ -78,7 +78,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -99,7 +99,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/hosts/meta/argument_specs.yml b/roles/hosts/meta/argument_specs.yml index 2dcb0f6a4..234dba67d 100644 --- a/roles/hosts/meta/argument_specs.yml +++ b/roles/hosts/meta/argument_specs.yml @@ -63,7 +63,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -84,7 +84,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/instance_groups/meta/argument_specs.yml b/roles/instance_groups/meta/argument_specs.yml index 062f1892e..a1a52dfc0 100644 --- a/roles/instance_groups/meta/argument_specs.yml +++ b/roles/instance_groups/meta/argument_specs.yml @@ -87,7 +87,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -108,7 +108,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/instances/meta/argument_specs.yml b/roles/instances/meta/argument_specs.yml index 0eb4c528c..a68f53934 100644 --- a/roles/instances/meta/argument_specs.yml +++ b/roles/instances/meta/argument_specs.yml @@ -63,7 +63,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -84,7 +84,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/inventories/meta/argument_specs.yml b/roles/inventories/meta/argument_specs.yml index 7cc68334e..72446a2e9 100644 --- a/roles/inventories/meta/argument_specs.yml +++ b/roles/inventories/meta/argument_specs.yml @@ -81,7 +81,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -102,7 +102,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/inventory_source_update/meta/argument_specs.yml b/roles/inventory_source_update/meta/argument_specs.yml index dd3d155cf..dd07fada4 100644 --- a/roles/inventory_source_update/meta/argument_specs.yml +++ b/roles/inventory_source_update/meta/argument_specs.yml @@ -157,7 +157,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -178,7 +178,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/inventory_sources/meta/argument_specs.yml b/roles/inventory_sources/meta/argument_specs.yml index 802bff920..8d584c5e7 100644 --- a/roles/inventory_sources/meta/argument_specs.yml +++ b/roles/inventory_sources/meta/argument_specs.yml @@ -157,7 +157,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -178,7 +178,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/job_launch/meta/argument_specs.yml b/roles/job_launch/meta/argument_specs.yml index 895287998..182c528a5 100644 --- a/roles/job_launch/meta/argument_specs.yml +++ b/roles/job_launch/meta/argument_specs.yml @@ -106,7 +106,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -127,7 +127,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/job_templates/meta/argument_specs.yml b/roles/job_templates/meta/argument_specs.yml index 45f658a24..d28f7b6fe 100644 --- a/roles/job_templates/meta/argument_specs.yml +++ b/roles/job_templates/meta/argument_specs.yml @@ -272,7 +272,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -293,7 +293,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/labels/meta/argument_specs.yml b/roles/labels/meta/argument_specs.yml index b037b0d77..16b7033e3 100644 --- a/roles/labels/meta/argument_specs.yml +++ b/roles/labels/meta/argument_specs.yml @@ -50,7 +50,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -71,7 +71,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/license/meta/argument_specs.yml b/roles/license/meta/argument_specs.yml index a4c23357e..f0851624b 100644 --- a/roles/license/meta/argument_specs.yml +++ b/roles/license/meta/argument_specs.yml @@ -52,7 +52,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -73,7 +73,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/notification_templates/meta/argument_specs.yml b/roles/notification_templates/meta/argument_specs.yml index 51cfe66de..9950fc4db 100644 --- a/roles/notification_templates/meta/argument_specs.yml +++ b/roles/notification_templates/meta/argument_specs.yml @@ -70,7 +70,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -91,7 +91,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/object_diff/meta/argument_specs.yml b/roles/object_diff/meta/argument_specs.yml new file mode 100644 index 000000000..6cdad4780 --- /dev/null +++ b/roles/object_diff/meta/argument_specs.yml @@ -0,0 +1,75 @@ +--- +argument_specs: + main: + short_description: An Ansible Role to read from a local file tree and create objects in Controller + options: + drop_user_external_accounts: + default: false + required: false + type: bool + description: When is true, all users will be taken to compare with SCM configuration as code + query_controller_api_max_objects: + default: 10000 + required: false + type: int + description: Sets the maximum number of objects to be returned from the API + protect_not_empty_orgs: + required: false + type: bool + description: When is true, orgs which are not empty, will not be removed + + # Async variables + controller_configuration_async_retries: + default: 30 + required: false + description: This variable sets number of retries across all roles as a default. + controller_configuration_async_delay: + default: 1 + required: false + description: This variable sets delay between retries across all roles as a default. + + + # No_log variables + controller_configuration_filetree_create_secure_logging: + default: "{{ controller_configuration_secure_logging | default(false) }}" + required: false + type: bool + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + controller_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 + controller_state: + default: present + required: false + description: The state all objects will take unless overridden by object default + type: str + controller_hostname: + default: None + required: false + description: URL to the Ansible Controller Server. + type: str + controller_validate_certs: + default: true + required: false + description: Whether or not to validate the Ansible Controller Server's SSL certificate. + type: str + controller_username: + default: None + required: false + description: Admin User on the Ansible Controller Server. Either username / password or oauthtoken need to be specified. + type: str + controller_password: + default: None + required: false + description: Controller Admin User's password on the Ansible Controller Server. This should be stored in an Ansible Vault at vars/controller-secrets.yml or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str + controller_oauthtoken: + default: None + required: false + description: Controller Admin User's token on the Ansible Controller Server. This should be stored in an Ansible Vault at or elsewhere and called from a parent playbook. Either username / password or oauthtoken need to be specified. + type: str +... diff --git a/roles/organizations/meta/argument_specs.yml b/roles/organizations/meta/argument_specs.yml index 8b610229b..c3e91de82 100644 --- a/roles/organizations/meta/argument_specs.yml +++ b/roles/organizations/meta/argument_specs.yml @@ -98,7 +98,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -119,7 +119,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/project_update/meta/argument_specs.yml b/roles/project_update/meta/argument_specs.yml index d036234d6..cf2a6ad90 100644 --- a/roles/project_update/meta/argument_specs.yml +++ b/roles/project_update/meta/argument_specs.yml @@ -145,7 +145,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -166,7 +166,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/projects/meta/argument_specs.yml b/roles/projects/meta/argument_specs.yml index fd94030d4..67ec7bec2 100644 --- a/roles/projects/meta/argument_specs.yml +++ b/roles/projects/meta/argument_specs.yml @@ -154,7 +154,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -175,7 +175,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/roles/meta/argument_specs.yml b/roles/roles/meta/argument_specs.yml index df4209f5d..62edc84c6 100644 --- a/roles/roles/meta/argument_specs.yml +++ b/roles/roles/meta/argument_specs.yml @@ -117,7 +117,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -138,7 +138,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/schedules/meta/argument_specs.yml b/roles/schedules/meta/argument_specs.yml index bfaa049b7..39131cb00 100644 --- a/roles/schedules/meta/argument_specs.yml +++ b/roles/schedules/meta/argument_specs.yml @@ -139,7 +139,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -160,7 +160,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/settings/meta/argument_specs.yml b/roles/settings/meta/argument_specs.yml index 7435b956b..d0a7738af 100644 --- a/roles/settings/meta/argument_specs.yml +++ b/roles/settings/meta/argument_specs.yml @@ -45,7 +45,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -66,7 +66,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/teams/meta/argument_specs.yml b/roles/teams/meta/argument_specs.yml index 514e6e0ea..8758eb7ce 100644 --- a/roles/teams/meta/argument_specs.yml +++ b/roles/teams/meta/argument_specs.yml @@ -54,7 +54,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -75,7 +75,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/users/meta/argument_specs.yml b/roles/users/meta/argument_specs.yml index 21f35615a..8ca2d3cf5 100644 --- a/roles/users/meta/argument_specs.yml +++ b/roles/users/meta/argument_specs.yml @@ -83,7 +83,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(true) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: true required: false @@ -104,7 +104,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/workflow_job_templates/meta/argument_specs.yml b/roles/workflow_job_templates/meta/argument_specs.yml index 9c3980d8f..f302d9ea6 100644 --- a/roles/workflow_job_templates/meta/argument_specs.yml +++ b/roles/workflow_job_templates/meta/argument_specs.yml @@ -300,7 +300,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -321,7 +321,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None diff --git a/roles/workflow_launch/meta/argument_specs.yml b/roles/workflow_launch/meta/argument_specs.yml index e0a164543..7c0444990 100644 --- a/roles/workflow_launch/meta/argument_specs.yml +++ b/roles/workflow_launch/meta/argument_specs.yml @@ -69,7 +69,7 @@ argument_specs: default: "{{ controller_configuration_secure_logging | default(false) }}" required: false type: bool - description: Whether or falset to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. + description: Whether or not to include the sensitive tasks from this role in the log. Set this value to `true` if you will be providing your sensitive values from elsewhere. controller_configuration_secure_logging: default: false required: false @@ -90,7 +90,7 @@ argument_specs: controller_validate_certs: default: true required: false - description: Whether or falset to validate the Ansible Controller Server's SSL certificate. + description: Whether or not to validate the Ansible Controller Server's SSL certificate. type: str controller_username: default: None From fddeeffcefa0089e7c9aec5ebfb73cd761dc97df Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Wed, 15 Mar 2023 17:36:13 -0400 Subject: [PATCH 84/94] Infra update (#537) * Fix incorrect required from no to yes inventory organization * update references from redhat_cop to infra --------- Co-authored-by: Tony Kay --- .github/tests/configure_controller.yml | 2 +- .../configure_controller_export_model.yml | 2 +- .github/tests/playbooks/README.md | 8 +----- .../playbooks/cd_gitlab_webhook_trigger.yml | 4 +-- .github/tests/playbooks/configure_awx.yml | 2 +- .../tests/playbooks/configure_controller.yml | 2 +- .../templates/collections/requirements.yml | 2 +- .github/tests/templates/controller_config.yml | 2 +- .../tasks/manage_controller_settings.yml | 4 +-- .../tasks/manage_credential_types.yml | 2 +- .../templates/tasks/manage_credentials.yml | 2 +- .../tasks/manage_execution_environments.yml | 2 +- .../tests/templates/tasks/manage_groups.yml | 2 +- .../tests/templates/tasks/manage_hosts.yml | 2 +- .../tasks/manage_instance_groups.yml | 2 +- .../templates/tasks/manage_inventories.yml | 2 +- .../tasks/manage_inventory_sources.yml | 2 +- .../templates/tasks/manage_job_templates.yml | 2 +- .../tests/templates/tasks/manage_labels.yml | 2 +- .../tasks/manage_notification_templates.yml | 2 +- .../templates/tasks/manage_organizations.yml | 2 +- .../tests/templates/tasks/manage_projects.yml | 2 +- .../tests/templates/tasks/manage_roles.yml | 2 +- .../templates/tasks/manage_schedules.yml | 2 +- .../tests/templates/tasks/manage_teams.yml | 2 +- .../tests/templates/tasks/manage_users.yml | 2 +- .../tasks/manage_workflow_templates.yml | 2 +- CHANGELOG.rst | 2 +- README.md | 16 ++++-------- changelogs/config.yaml | 2 +- .../fragments/redhat_to_infra_conversion.yml | 6 +++++ docs/CONVERSION_GUIDE.md | 2 +- plugins/lookup/controller_object_diff.py | 4 +-- roles/ad_hoc_command/README.md | 2 +- roles/ad_hoc_command_cancel/README.md | 2 +- roles/applications/README.md | 2 +- roles/credential_input_sources/README.md | 2 +- roles/credential_types/README.md | 2 +- roles/credentials/README.md | 2 +- roles/dispatch/README.md | 4 +-- roles/dispatch/tasks/main.yml | 2 +- roles/execution_environments/README.md | 2 +- roles/filetree_create/README.md | 2 +- .../filetree_create/automatetheautomation.md | 2 +- roles/filetree_read/README.md | 14 +++++------ roles/groups/README.md | 2 +- roles/hosts/README.md | 2 +- roles/instance_groups/README.md | 2 +- roles/instances/README.md | 2 +- roles/inventories/README.md | 2 +- roles/inventory_source_update/README.md | 2 +- roles/inventory_sources/README.md | 2 +- roles/job_launch/README.md | 2 +- roles/job_templates/README.md | 2 +- roles/jobs_cancel/README.md | 2 +- roles/labels/README.md | 2 +- roles/license/README.md | 2 +- roles/notification_templates/README.md | 2 +- roles/object_diff/README.md | 10 ++++---- roles/object_diff/tasks/applications.yml | 2 +- roles/object_diff/tasks/credential_types.yml | 2 +- roles/object_diff/tasks/credentials.yml | 2 +- .../tasks/execution_environments.yml | 2 +- roles/object_diff/tasks/groups.yml | 2 +- roles/object_diff/tasks/hosts.yml | 2 +- roles/object_diff/tasks/instance_groups.yml | 2 +- roles/object_diff/tasks/inventories.yml | 2 +- roles/object_diff/tasks/inventory_sources.yml | 2 +- roles/object_diff/tasks/job_templates.yml | 2 +- roles/object_diff/tasks/main.yml | 25 ++++++++++++++++++- .../tasks/notification_templates.yml | 2 +- roles/object_diff/tasks/organizations.yml | 2 +- roles/object_diff/tasks/projects.yml | 2 +- roles/object_diff/tasks/roles.yml | 2 +- roles/object_diff/tasks/schedules.yml | 2 +- roles/object_diff/tasks/teams.yml | 2 +- roles/object_diff/tasks/user_accounts.yml | 2 +- .../tasks/workflow_job_templates.yml | 2 +- roles/organizations/README.md | 2 +- roles/project_update/README.md | 2 +- roles/projects/README.md | 2 +- roles/roles/README.md | 2 +- roles/schedules/README.md | 2 +- roles/settings/README.md | 2 +- roles/teams/README.md | 2 +- roles/users/README.md | 2 +- roles/workflow_job_templates/README.md | 2 +- roles/workflow_launch/README.md | 2 +- 88 files changed, 134 insertions(+), 117 deletions(-) create mode 100644 changelogs/fragments/redhat_to_infra_conversion.yml diff --git a/.github/tests/configure_controller.yml b/.github/tests/configure_controller.yml index 49b6713d1..b5ee4fec7 100644 --- a/.github/tests/configure_controller.yml +++ b/.github/tests/configure_controller.yml @@ -11,7 +11,7 @@ # controller_password: changeme collections: - awx.awx - - redhat_cop.controller_configuration + - infra.controller_configuration pre_tasks: diff --git a/.github/tests/configure_controller_export_model.yml b/.github/tests/configure_controller_export_model.yml index cddfc3d75..f33bdcac7 100644 --- a/.github/tests/configure_controller_export_model.yml +++ b/.github/tests/configure_controller_export_model.yml @@ -7,7 +7,7 @@ controller_validate_certs: false collections: - awx.awx - - redhat_cop.controller_configuration + - infra.controller_configuration # Define following vars here, or in configs/controller_auth.yml # controller_hostname: controller.example.com # controller_username: admin diff --git a/.github/tests/playbooks/README.md b/.github/tests/playbooks/README.md index a0030a244..f94a0d8f6 100644 --- a/.github/tests/playbooks/README.md +++ b/.github/tests/playbooks/README.md @@ -14,16 +14,10 @@ Currently: ## Usage -The following command will invoke the playbook with the awx collection - -```console -ansible-playbook redhat_cop.controller_configuration.configure_awx.yml -``` - The following command will invoke the playbook with the ansible.controller collection ```console -ansible-playbook redhat_cop.controller_configuration.configure_controller.yml +ansible-playbook infra.controller_configuration.configure_controller.yml ``` ## Examples diff --git a/.github/tests/playbooks/cd_gitlab_webhook_trigger.yml b/.github/tests/playbooks/cd_gitlab_webhook_trigger.yml index 8dd3bc993..824cf231c 100644 --- a/.github/tests/playbooks/cd_gitlab_webhook_trigger.yml +++ b/.github/tests/playbooks/cd_gitlab_webhook_trigger.yml @@ -27,7 +27,7 @@ - name: Configure Controller Job Launch | Launch launch_jobs Drop Diff (Delete) ansible.builtin.include_role: - name: redhat_cop.controller_configuration.job_launch + name: infra.controller_configuration.job_launch vars: controller_launch_jobs: - name: "{{ org_tags.key }} CasC_JobTemplates_AAP_Drop_Diff" @@ -48,7 +48,7 @@ - name: Configure Controller Job Launch | Launch launch_jobs creation ansible.builtin.include_role: - name: redhat_cop.controller_configuration.job_launch + name: infra.controller_configuration.job_launch vars: controller_launch_jobs: - name: "{{ org_tags.key }} CasC_JobTemplates_AAP_CD_Config_Controller" diff --git a/.github/tests/playbooks/configure_awx.yml b/.github/tests/playbooks/configure_awx.yml index 852a2379f..31bbae543 100644 --- a/.github/tests/playbooks/configure_awx.yml +++ b/.github/tests/playbooks/configure_awx.yml @@ -36,7 +36,7 @@ connection: local collections: - awx.awx - - redhat_cop.controller_configuration + - infra.controller_configuration pre_tasks: - name: Include vars from configs directory diff --git a/.github/tests/playbooks/configure_controller.yml b/.github/tests/playbooks/configure_controller.yml index 5e65ce508..a41ed4e64 100644 --- a/.github/tests/playbooks/configure_controller.yml +++ b/.github/tests/playbooks/configure_controller.yml @@ -36,7 +36,7 @@ connection: local collections: - ansible.controller - - redhat_cop.controller_configuration + - infra.controller_configuration pre_tasks: - name: Include vars from configs directory diff --git a/.github/tests/templates/collections/requirements.yml b/.github/tests/templates/collections/requirements.yml index d6273c44a..e5ca4903d 100644 --- a/.github/tests/templates/collections/requirements.yml +++ b/.github/tests/templates/collections/requirements.yml @@ -3,5 +3,5 @@ collections: - name: awx.awx - name: ansible.tower - name: ansible.controller - - name: redhat_cop.controller_configuration + - name: infra.controller_configuration ... diff --git a/.github/tests/templates/controller_config.yml b/.github/tests/templates/controller_config.yml index 98bb683f3..07564d3ff 100644 --- a/.github/tests/templates/controller_config.yml +++ b/.github/tests/templates/controller_config.yml @@ -29,7 +29,7 @@ gather_facts: false collections: - ansible.controller - - redhat_cop.controller_configuration + - infra.controller_configuration vars: absent_present: "present" diff --git a/.github/tests/templates/tasks/manage_controller_settings.yml b/.github/tests/templates/tasks/manage_controller_settings.yml index be2b91501..0b541fa29 100644 --- a/.github/tests/templates/tasks/manage_controller_settings.yml +++ b/.github/tests/templates/tasks/manage_controller_settings.yml @@ -6,7 +6,7 @@ - alltags - import_role: - name: redhat_cop.controller_configuration.settings + name: infra.controller_configuration.settings tags: - settings - alltags @@ -18,7 +18,7 @@ - alltags - import_role: - name: redhat_cop.controller_configuration.settings + name: infra.controller_configuration.settings tags: - settings - alltags diff --git a/.github/tests/templates/tasks/manage_credential_types.yml b/.github/tests/templates/tasks/manage_credential_types.yml index 527b0570e..a83c7e363 100644 --- a/.github/tests/templates/tasks/manage_credential_types.yml +++ b/.github/tests/templates/tasks/manage_credential_types.yml @@ -6,7 +6,7 @@ - alltags - import_role: - name: redhat_cop.controller_configuration.credential_types + name: infra.controller_configuration.credential_types tags: - credtypes - alltags diff --git a/.github/tests/templates/tasks/manage_credentials.yml b/.github/tests/templates/tasks/manage_credentials.yml index 8ebaa58dc..0dcc41282 100644 --- a/.github/tests/templates/tasks/manage_credentials.yml +++ b/.github/tests/templates/tasks/manage_credentials.yml @@ -6,7 +6,7 @@ - alltags - import_role: - name: redhat_cop.controller_configuration.credentials + name: infra.controller_configuration.credentials tags: - credentials - alltags diff --git a/.github/tests/templates/tasks/manage_execution_environments.yml b/.github/tests/templates/tasks/manage_execution_environments.yml index 49d7ae315..aa68c734e 100644 --- a/.github/tests/templates/tasks/manage_execution_environments.yml +++ b/.github/tests/templates/tasks/manage_execution_environments.yml @@ -6,7 +6,7 @@ - alltags - import_role: - name: redhat_cop.controller_configuration.execution_environments + name: infra.controller_configuration.execution_environments tags: - ees - alltags diff --git a/.github/tests/templates/tasks/manage_groups.yml b/.github/tests/templates/tasks/manage_groups.yml index f7eeb412b..f6faa34f3 100644 --- a/.github/tests/templates/tasks/manage_groups.yml +++ b/.github/tests/templates/tasks/manage_groups.yml @@ -6,7 +6,7 @@ - alltags - import_role: - name: redhat_cop.controller_configuration.groups + name: infra.controller_configuration.groups tags: - groups - alltags diff --git a/.github/tests/templates/tasks/manage_hosts.yml b/.github/tests/templates/tasks/manage_hosts.yml index a3c12e0db..a4f6ea2de 100644 --- a/.github/tests/templates/tasks/manage_hosts.yml +++ b/.github/tests/templates/tasks/manage_hosts.yml @@ -6,7 +6,7 @@ - alltags - import_role: - name: redhat_cop.controller_configuration.hosts + name: infra.controller_configuration.hosts tags: - hosts - alltags diff --git a/.github/tests/templates/tasks/manage_instance_groups.yml b/.github/tests/templates/tasks/manage_instance_groups.yml index 0c37afa29..6669ef073 100644 --- a/.github/tests/templates/tasks/manage_instance_groups.yml +++ b/.github/tests/templates/tasks/manage_instance_groups.yml @@ -6,7 +6,7 @@ - alltags - import_role: - name: redhat_cop.controller_configuration.instance_groups + name: infra.controller_configuration.instance_groups tags: - instancegroups - alltags diff --git a/.github/tests/templates/tasks/manage_inventories.yml b/.github/tests/templates/tasks/manage_inventories.yml index 1d22e81e1..46c8bf43d 100644 --- a/.github/tests/templates/tasks/manage_inventories.yml +++ b/.github/tests/templates/tasks/manage_inventories.yml @@ -6,7 +6,7 @@ - alltags - import_role: - name: redhat_cop.controller_configuration.inventories + name: infra.controller_configuration.inventories tags: - inventory - alltags diff --git a/.github/tests/templates/tasks/manage_inventory_sources.yml b/.github/tests/templates/tasks/manage_inventory_sources.yml index 1da724aa5..acafea87c 100644 --- a/.github/tests/templates/tasks/manage_inventory_sources.yml +++ b/.github/tests/templates/tasks/manage_inventory_sources.yml @@ -6,7 +6,7 @@ - alltags - include_role: - name: redhat_cop.controller_configuration.inventory_sources + name: infra.controller_configuration.inventory_sources tags: - inventorysources - alltags diff --git a/.github/tests/templates/tasks/manage_job_templates.yml b/.github/tests/templates/tasks/manage_job_templates.yml index 808dedf78..5939a9ca4 100644 --- a/.github/tests/templates/tasks/manage_job_templates.yml +++ b/.github/tests/templates/tasks/manage_job_templates.yml @@ -6,7 +6,7 @@ - alltags - import_role: - name: redhat_cop.controller_configuration.job_templates + name: infra.controller_configuration.job_templates tags: - jobtemplates - alltags diff --git a/.github/tests/templates/tasks/manage_labels.yml b/.github/tests/templates/tasks/manage_labels.yml index 1ae2821fb..bbbcfabf6 100644 --- a/.github/tests/templates/tasks/manage_labels.yml +++ b/.github/tests/templates/tasks/manage_labels.yml @@ -6,7 +6,7 @@ - alltags - import_role: - name: redhat_cop.controller_configuration.labels + name: infra.controller_configuration.labels tags: - labels - alltags diff --git a/.github/tests/templates/tasks/manage_notification_templates.yml b/.github/tests/templates/tasks/manage_notification_templates.yml index 1c2007c84..b85a865ba 100644 --- a/.github/tests/templates/tasks/manage_notification_templates.yml +++ b/.github/tests/templates/tasks/manage_notification_templates.yml @@ -6,7 +6,7 @@ - alltags - import_role: - name: redhat_cop.controller_configuration.notification_templates + name: infra.controller_configuration.notification_templates tags: - notifications - alltags diff --git a/.github/tests/templates/tasks/manage_organizations.yml b/.github/tests/templates/tasks/manage_organizations.yml index 640e05347..b46d79289 100644 --- a/.github/tests/templates/tasks/manage_organizations.yml +++ b/.github/tests/templates/tasks/manage_organizations.yml @@ -42,7 +42,7 @@ - alltags - include_role: - name: redhat_cop.controller_configuration.organizations + name: infra.controller_configuration.organizations tags: - orgs - alltags diff --git a/.github/tests/templates/tasks/manage_projects.yml b/.github/tests/templates/tasks/manage_projects.yml index 453c10bef..bc80ebb0a 100644 --- a/.github/tests/templates/tasks/manage_projects.yml +++ b/.github/tests/templates/tasks/manage_projects.yml @@ -6,7 +6,7 @@ - alltags - import_role: - name: redhat_cop.controller_configuration.projects + name: infra.controller_configuration.projects tags: - projects - alltags diff --git a/.github/tests/templates/tasks/manage_roles.yml b/.github/tests/templates/tasks/manage_roles.yml index a9f255282..431fcde06 100644 --- a/.github/tests/templates/tasks/manage_roles.yml +++ b/.github/tests/templates/tasks/manage_roles.yml @@ -6,7 +6,7 @@ - alltags - import_role: - name: redhat_cop.controller_configuration.roles + name: infra.controller_configuration.roles tags: - roles - alltags diff --git a/.github/tests/templates/tasks/manage_schedules.yml b/.github/tests/templates/tasks/manage_schedules.yml index 55112271d..7b813feae 100644 --- a/.github/tests/templates/tasks/manage_schedules.yml +++ b/.github/tests/templates/tasks/manage_schedules.yml @@ -6,7 +6,7 @@ - alltags - import_role: - name: redhat_cop.controller_configuration.schedules + name: infra.controller_configuration.schedules tags: - schedules - alltags diff --git a/.github/tests/templates/tasks/manage_teams.yml b/.github/tests/templates/tasks/manage_teams.yml index 754c41bdb..aafa45dc4 100644 --- a/.github/tests/templates/tasks/manage_teams.yml +++ b/.github/tests/templates/tasks/manage_teams.yml @@ -6,7 +6,7 @@ - alltags - import_role: - name: redhat_cop.controller_configuration.teams + name: infra.controller_configuration.teams tags: - teams - alltags diff --git a/.github/tests/templates/tasks/manage_users.yml b/.github/tests/templates/tasks/manage_users.yml index d289cd4bc..ef806c48b 100644 --- a/.github/tests/templates/tasks/manage_users.yml +++ b/.github/tests/templates/tasks/manage_users.yml @@ -6,7 +6,7 @@ - alltags - import_role: - name: redhat_cop.controller_configuration.users + name: infra.controller_configuration.users tags: - users - alltags diff --git a/.github/tests/templates/tasks/manage_workflow_templates.yml b/.github/tests/templates/tasks/manage_workflow_templates.yml index 1431308e1..dc1648dbc 100644 --- a/.github/tests/templates/tasks/manage_workflow_templates.yml +++ b/.github/tests/templates/tasks/manage_workflow_templates.yml @@ -6,7 +6,7 @@ - alltags - import_role: - name: redhat_cop.controller_configuration.workflow_job_templates + name: infra.controller_configuration.workflow_job_templates tags: - workflows - alltags diff --git a/CHANGELOG.rst b/CHANGELOG.rst index de79e5cc0..380dc3fb8 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,5 +1,5 @@ ================================================= -redhat_cop.controller_configuration Release Notes +infra.controller_configuration Release Notes ================================================= .. contents:: Topics diff --git a/README.md b/README.md index 1493b0037..eb062b1b2 100644 --- a/README.md +++ b/README.md @@ -38,10 +38,10 @@ Click the `Content` button to see the list of content included in this collectio ## Installing this collection -You can install the redhat_cop.controller_configuration collection with the Ansible Galaxy CLI: +You can install the infra.controller_configuration.collection with the Ansible Galaxy CLI: ```console -ansible-galaxy collection install redhat_cop.controller_configuration +ansible-galaxy collection install infra.controller_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: @@ -49,7 +49,7 @@ You can also include it in a `requirements.yml` file and install it with `ansibl ```yaml --- collections: - - name: redhat_cop.controller_configuration + - name: infra.controller_configuration # If you need a specific version of the collection, you can specify like this: # version: ... ``` @@ -62,16 +62,10 @@ If you were using a version of redhat_cop.tower_configuration, please refer to o The awx.awx or ansible.controller collection must be invoked in the playbook in order for Ansible to pick up the correct modules to use. -The following command will invoke the playbook with the awx collection +The following command will invoke the collection playbook. This is considered a starting point for the collection. ```console -ansible-playbook redhat_cop.controller_configuration.configure_awx.yml -``` - -The following command will invoke the playbook with the ansible.controller collection - -```console -ansible-playbook redhat_cop.controller_configuration.configure_controller.yml +ansible-playbook infra.controller_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. diff --git a/changelogs/config.yaml b/changelogs/config.yaml index 936f16f05..01acf451b 100644 --- a/changelogs/config.yaml +++ b/changelogs/config.yaml @@ -28,7 +28,7 @@ sections: - Bugfixes - - known_issues - Known Issues -title: redhat_cop.controller_configuration +title: infra.controller_configuration trivial_section_name: trivial use_fqcn: true ... diff --git a/changelogs/fragments/redhat_to_infra_conversion.yml b/changelogs/fragments/redhat_to_infra_conversion.yml new file mode 100644 index 000000000..d192b0504 --- /dev/null +++ b/changelogs/fragments/redhat_to_infra_conversion.yml @@ -0,0 +1,6 @@ +--- +minor_changes: + - removed references to redhat_cop as a collection namespace in the readme files. +breaking_changes: + - updated object_diff role to use the infra namespace, that means to use the role it requires the infra version of the collection. Previous version required the redhat_cop +... diff --git a/docs/CONVERSION_GUIDE.md b/docs/CONVERSION_GUIDE.md index 3e82e6727..166f12eb4 100644 --- a/docs/CONVERSION_GUIDE.md +++ b/docs/CONVERSION_GUIDE.md @@ -18,7 +18,7 @@ Otherwise it will look for the modules only in your base installation. If there controller_validate_certs: false collections: - awx.awx - - redhat_cop.controller_configuration + - infra.controller_configuration ``` ## Variable name changes diff --git a/plugins/lookup/controller_object_diff.py b/plugins/lookup/controller_object_diff.py index 1ccbf4b41..33e1a0b66 100644 --- a/plugins/lookup/controller_object_diff.py +++ b/plugins/lookup/controller_object_diff.py @@ -67,13 +67,13 @@ - name: "Find the difference of Project between what is on the Controller versus curated list." set_fact: - project_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + project_difference: "{{ lookup('infra.controller_configuration.controller_object_diff', api_list=controller_api_results, compare_list=differential_item.differential_test_items, with_present=true, set_absent=true ) }}" - name: Add Projects include_role: - name: redhat_cop.controller_configuration.projects + name: infra.controller_configuration.projects vars: controller_projects: "{{ project_difference }}" diff --git a/roles/ad_hoc_command/README.md b/roles/ad_hoc_command/README.md index 1df306b23..6b703cf87 100644 --- a/roles/ad_hoc_command/README.md +++ b/roles/ad_hoc_command/README.md @@ -95,7 +95,7 @@ controller_ad_hoc_commands: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.ad_hoc_command, when: controller_ad_hoc_commands is defined} + - {role: infra.controller_configuration.ad_hoc_command, when: controller_ad_hoc_commands is defined} ``` diff --git a/roles/ad_hoc_command_cancel/README.md b/roles/ad_hoc_command_cancel/README.md index a9f2fc94b..c6e706543 100644 --- a/roles/ad_hoc_command_cancel/README.md +++ b/roles/ad_hoc_command_cancel/README.md @@ -87,7 +87,7 @@ controller_ad_hoc_commands_cancel: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.ad_hoc_command_cancel, when: controller_ad_hoc_commands is defined} + - {role: infra.controller_configuration.ad_hoc_command_cancel, when: controller_ad_hoc_commands is defined} ``` ## License diff --git a/roles/applications/README.md b/roles/applications/README.md index a738306b1..9ec9c71fd 100644 --- a/roles/applications/README.md +++ b/roles/applications/README.md @@ -118,7 +118,7 @@ controller_applications: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.applications, when: controller_applications is defined} + - {role: infra.controller_configuration.applications, when: controller_applications is defined} ``` ## License diff --git a/roles/credential_input_sources/README.md b/roles/credential_input_sources/README.md index c77127f83..cb76c5d45 100644 --- a/roles/credential_input_sources/README.md +++ b/roles/credential_input_sources/README.md @@ -122,7 +122,7 @@ controller_credential_input_sources: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.credential_input_sources, when: controller_credential_input_sources is defined} + - {role: infra.controller_configuration.credential_input_sources, when: controller_credential_input_sources is defined} ``` ## License diff --git a/roles/credential_types/README.md b/roles/credential_types/README.md index ce80547b8..29b85821b 100644 --- a/roles/credential_types/README.md +++ b/roles/credential_types/README.md @@ -219,7 +219,7 @@ controller_credential_types: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.credential_types, when: controller_credential_types is defined} + - {role: infra.controller_configuration.credential_types, when: controller_credential_types is defined} ``` ## License diff --git a/roles/credentials/README.md b/roles/credentials/README.md index 66f52a12a..c320bf656 100644 --- a/roles/credentials/README.md +++ b/roles/credentials/README.md @@ -155,7 +155,7 @@ controller_credentials: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.credentials, when: controller_credentials is defined} + - {role: infra.controller_configuration.credentials, when: controller_credentials is defined} ``` ## License diff --git a/roles/dispatch/README.md b/roles/dispatch/README.md index 03ba1d975..699755812 100644 --- a/roles/dispatch/README.md +++ b/roles/dispatch/README.md @@ -45,7 +45,7 @@ controller_configuration_dispatcher_roles: Note that each item has three elements: -- `role` which is the name of the role within redhat_cop.controller_configuration +- `role` which is the name of the role within infra.controller_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. @@ -103,7 +103,7 @@ This also speeds up the overall role. Each individual role has its own variable ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - redhat_cop.controller_configuration.dispatch + - infra.controller_configuration.dispatch ``` ## License diff --git a/roles/dispatch/tasks/main.yml b/roles/dispatch/tasks/main.yml index e3ec23410..c2a4c0778 100644 --- a/roles/dispatch/tasks/main.yml +++ b/roles/dispatch/tasks/main.yml @@ -1,5 +1,5 @@ --- -- name: "Run redhat_cop.controller_configuration.{{ __role.role }}" +- name: "Run infra.controller_configuration.{{ __role.role }}" ansible.builtin.include_role: name: "{{ __role.role }}" apply: diff --git a/roles/execution_environments/README.md b/roles/execution_environments/README.md index ac44593f5..704a0ad7c 100644 --- a/roles/execution_environments/README.md +++ b/roles/execution_environments/README.md @@ -108,7 +108,7 @@ controller_execution_environments: tasks: - name: Add Execution Environments include_role: - name: redhat_cop.controller_configuration.execution_environments + name: infra.controller_configuration.execution_environments ``` ## License diff --git a/roles/filetree_create/README.md b/roles/filetree_create/README.md index 293b225a9..f84c5f150 100644 --- a/roles/filetree_create/README.md +++ b/roles/filetree_create/README.md @@ -60,7 +60,7 @@ A list of other roles hosted on Galaxy should go here, plus any details in regar roles: - - redhat_cop.controller_configuration.filetree_create + - infra.controller_configuration.filetree_create post_tasks: - name: "Delete the Authentication Token used" diff --git a/roles/filetree_create/automatetheautomation.md b/roles/filetree_create/automatetheautomation.md index 47aaf49a3..92e109dff 100644 --- a/roles/filetree_create/automatetheautomation.md +++ b/roles/filetree_create/automatetheautomation.md @@ -10,7 +10,7 @@ Now that some concepts are clear, let's summarize what the collection will do. B - **filetree_read**: An ansible role which reads variables from a hierarchical and scalable directory structure which is grouped based on the configuration code life-cycle. It could be used to run the role filetree_read to load variables followed by dispatch role to apply the configuration. - **filetree_create**: The role filetree_create is intended to be used as the first step to begin using the Configuration as Code on Ansible Tower or Ansible Automation Controller, when you already have a running instance of any of them. Obviously, you also could start to write your objects as code from scratch, but the idea behind the creation of that role is to simplify your lives and make that task a little bit easier. -- **object_diff**: An ansible role to manage the object diff of the AWX or Automation Controller configuration. This role leverage the controller_object_diff.py lookup plugin of the redhat_cop.controller_configuration, comparing two lists, one taken directly from the API and the other one from the git repository, and it could be used to delete objects in the AWX or Automation Controller that are not defined in the git repository list. +- **object_diff**: An ansible role to manage the object diff of the AWX or Automation Controller configuration. This role leverage the controller_object_diff.py lookup plugin of the infra.controller_configuration, comparing two lists, one taken directly from the API and the other one from the git repository, and it could be used to delete objects in the AWX or Automation Controller that are not defined in the git repository list. - **dispatch**: An Ansible Role to run all roles on Ansible Controller. Automation Webhook can be used to link a Git repository and Ansible automation natively. Once a repo link is setup, Ansible catches events (commits: push, merge, jobs, etc) from the Git system (GitHub, GitHub Enterprise, GitLab) and uses them to automatically trigger automation jobs to update projects, inventories, and perform deployments, all without requiring yet another third-party tool such as Jenkins. diff --git a/roles/filetree_read/README.md b/roles/filetree_read/README.md index 356cd9691..253ad8870 100644 --- a/roles/filetree_read/README.md +++ b/roles/filetree_read/README.md @@ -4,7 +4,7 @@ An ansible role which reads variables from a hierarchical and scalable directory ## Requirements -ansible-galaxy collection install -r tests/collections/requirements.yml to be installed Currently: awx.awx or ansible.controller and redhat_cop.controller_configuration. +ansible-galaxy collection install -r tests/collections/requirements.yml to be installed Currently: awx.awx or ansible.controller and infra.controller_configuration. ## Role Variables @@ -42,9 +42,9 @@ The following Variables set the organization where should be applied the configu ### Data Structure -- It accepts two data models as the roles in the redhat_cop.controller_configuration collection,a simple straightforward easy to maintain model, and another based on the controller api. +- It accepts two data models as the roles in the infra.controller_configuration collection,a simple straightforward easy to maintain model, and another based on the controller api. - Variables should be stored in yaml files. It could be used vault to encrypt sensitive data when needed. -- All variables should be taken from the awx or automation controller object roles from the redhat_cop.controller_configuration collection. +- All variables should be taken from the awx or automation controller object roles from the infra.controller_configuration collection. ```yaml --- @@ -319,7 +319,7 @@ The role is designed to be used with tags, each tags correspond to an AWX or Aut - block: - name: Include Tasks to load Galaxy credentials to be added to Organizations ansible.builtin.include_role: - name: redhat_cop.controller_configuration.filetree_read + name: infra.controller_configuration.filetree_read tasks_from: "{{ create_orgs_credentials }}" loop: - organizations.yml @@ -329,7 +329,7 @@ The role is designed to be used with tags, each tags correspond to an AWX or Aut - name: Include Tasks to add Galaxy credentials to Organizations ansible.builtin.include_role: - name: redhat_cop.controller_configuration.dispatch + name: infra.controller_configuration.dispatch apply: tags: - organizations @@ -341,8 +341,8 @@ The role is designed to be used with tags, each tags correspond to an AWX or Aut - {role: credentials, var: controller_credentials, tags: credentials} roles: - - {role: redhat_cop.controller_configuration.filetree_read } - - {role: redhat_cop.controller_configuration.dispatch } + - {role: infra.controller_configuration.filetree_read } + - {role: infra.controller_configuration.dispatch } post_tasks: - name: "Delete the Authentication Token used" diff --git a/roles/groups/README.md b/roles/groups/README.md index d9e5b9b4b..307f44027 100644 --- a/roles/groups/README.md +++ b/roles/groups/README.md @@ -148,7 +148,7 @@ controller_groups: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.groups, when: controller_groups is defined} + - {role: infra.controller_configuration.groups, when: controller_groups is defined} ``` ## License diff --git a/roles/hosts/README.md b/roles/hosts/README.md index d61c35d10..a97a5684f 100644 --- a/roles/hosts/README.md +++ b/roles/hosts/README.md @@ -136,7 +136,7 @@ controller_hosts: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.hosts, when: controller_hosts is defined} + - {role: infra.controller_configuration.hosts, when: controller_hosts is defined} ``` ## License diff --git a/roles/instance_groups/README.md b/roles/instance_groups/README.md index 992a82204..421f83184 100644 --- a/roles/instance_groups/README.md +++ b/roles/instance_groups/README.md @@ -101,7 +101,7 @@ controller_instance_groups: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.groups, when: controller_groups is defined} + - {role: infra.controller_configuration.groups, when: controller_groups is defined} ``` ## License diff --git a/roles/instances/README.md b/roles/instances/README.md index 3c95be888..eca33da09 100644 --- a/roles/instances/README.md +++ b/roles/instances/README.md @@ -98,7 +98,7 @@ controller_instances: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.instances, when: controller_instances is defined} + - {role: infra.controller_configuration.instances, when: controller_instances is defined} ``` ## License diff --git a/roles/inventories/README.md b/roles/inventories/README.md index e19151b5c..fcbed202c 100644 --- a/roles/inventories/README.md +++ b/roles/inventories/README.md @@ -149,7 +149,7 @@ controller_inventories: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.inventories, when: controller_inventories is defined} + - {role: infra.controller_configuration.inventories, when: controller_inventories is defined} ``` ## License diff --git a/roles/inventory_source_update/README.md b/roles/inventory_source_update/README.md index d854b8aa9..5c0ed4b04 100644 --- a/roles/inventory_source_update/README.md +++ b/roles/inventory_source_update/README.md @@ -106,7 +106,7 @@ controller_inventory_sources: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.inventory_source_update, when: controller_inventory_sources is defined} + - {role: infra.controller_configuration.inventory_source_update, when: controller_inventory_sources is defined} ``` diff --git a/roles/inventory_sources/README.md b/roles/inventory_sources/README.md index efee4c6c0..575790b66 100644 --- a/roles/inventory_sources/README.md +++ b/roles/inventory_sources/README.md @@ -162,7 +162,7 @@ controller_inventory_sources: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.inventory_sources, when: controller_inventory_sources is defined} + - {role: infra.controller_configuration.inventory_sources, when: controller_inventory_sources is defined} ``` ## License diff --git a/roles/job_launch/README.md b/roles/job_launch/README.md index e9c0e8e3b..1466bcc93 100644 --- a/roles/job_launch/README.md +++ b/roles/job_launch/README.md @@ -98,7 +98,7 @@ controller_launch_jobs: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.job_launch, when: controller_launch_jobs is defined} + - {role: infra.controller_configuration.job_launch, when: controller_launch_jobs is defined} ``` ## License diff --git a/roles/job_templates/README.md b/roles/job_templates/README.md index 67a83f25b..a472d3e1e 100644 --- a/roles/job_templates/README.md +++ b/roles/job_templates/README.md @@ -277,7 +277,7 @@ controller_templates: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.job_templates, when: controller_templates is defined} + - {role: infra.controller_configuration.job_templates, when: controller_templates is defined} ``` ## License diff --git a/roles/jobs_cancel/README.md b/roles/jobs_cancel/README.md index 64a61875b..9c9c41e47 100644 --- a/roles/jobs_cancel/README.md +++ b/roles/jobs_cancel/README.md @@ -78,7 +78,7 @@ controller_cancel_jobs: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.jobs_cancel, when: controller_cancel_jobs is defined} + - {role: infra.controller_configuration.jobs_cancel, when: controller_cancel_jobs is defined} ``` ## License diff --git a/roles/labels/README.md b/roles/labels/README.md index efd4bd943..f64fcd9a1 100644 --- a/roles/labels/README.md +++ b/roles/labels/README.md @@ -113,7 +113,7 @@ controller_labels: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.labels, when: controller_labels is defined} + - {role: infra.controller_configuration.labels, when: controller_labels is defined} ``` ## License diff --git a/roles/license/README.md b/roles/license/README.md index 5befd0fd8..6775f1fd7 100644 --- a/roles/license/README.md +++ b/roles/license/README.md @@ -100,7 +100,7 @@ controller_license: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.license, when: controller_license is defined} + - {role: infra.controller_configuration.license, when: controller_license is defined} ``` ## License diff --git a/roles/notification_templates/README.md b/roles/notification_templates/README.md index ed8ac1127..18de29298 100644 --- a/roles/notification_templates/README.md +++ b/roles/notification_templates/README.md @@ -173,7 +173,7 @@ controller_notifications: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.notification_templates, when: controller_notifications is defined} + - {role: infra.controller_configuration.notification_templates, when: controller_notifications is defined} ``` ## License diff --git a/roles/object_diff/README.md b/roles/object_diff/README.md index 318ffc891..18b96cb5d 100644 --- a/roles/object_diff/README.md +++ b/roles/object_diff/README.md @@ -1,10 +1,10 @@ # controller_configuration.object_diff -An ansible role to manage the object diff of the AWX or Automation Controller configuration. This role leverage the controller_object_diff.py lookup plugin of the redhat_cop.controller_configuration, comparing two lists, one taken directly from the API and the other one from the git repository, and it could be used to delete objects in the AWX or Automation Controller that are not defined in the git repository list. +An ansible role to manage the object diff of the AWX or Automation Controller configuration. This role leverage the controller_object_diff.py lookup plugin of the infra.controller_configuration, comparing two lists, one taken directly from the API and the other one from the git repository, and it could be used to delete objects in the AWX or Automation Controller that are not defined in the git repository list. ## Requirements -`ansible-galaxy collection install -r tests/collections/requirements.yml` to be installed. Currently: `awx.awx` or `ansible.controller` and `redhat_cop.controller_configuration`. +`ansible-galaxy collection install -r tests/collections/requirements.yml` to be installed. Currently: `awx.awx` or `ansible.controller` and `infra.controller_configuration`. ## Role Variables @@ -73,8 +73,8 @@ To correctly manage `roles`, they can only be defined by a super-admin organizat - always roles: - - role: redhat_cop.controller_configuration.filetree_read - - role: redhat_cop.controller_configuration.object_diff + - role: infra.controller_configuration.filetree_read + - role: infra.controller_configuration.object_diff vars: controller_configuration_object_diff_tasks: - {name: workflow_job_templates, var: controller_workflows, tags: workflow_job_templates} @@ -88,7 +88,7 @@ To correctly manage `roles`, they can only be defined by a super-admin organizat - {name: credentials, var: controller_credentials, tags: credentials} - {name: credential_types, var: controller_credential_types, tags: credential_types} - {name: organizations, var: controller_organizations, tags: organizations} - - role: redhat_cop.controller_configuration.dispatch + - role: infra.controller_configuration.dispatch vars: controller_configuration_dispatcher_roles: - {role: workflow_job_templates, var: controller_workflows, tags: workflow_job_templates} diff --git a/roles/object_diff/tasks/applications.yml b/roles/object_diff/tasks/applications.yml index 5eaee8b33..28bf86932 100644 --- a/roles/object_diff/tasks/applications.yml +++ b/roles/object_diff/tasks/applications.yml @@ -16,7 +16,7 @@ - name: "Find the difference of Application between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: - __applications_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + __applications_difference: "{{ lookup(controller_role_plugin, api_list=__controller_api_applications, compare_list=controller_applications, with_present=false, set_absent=true) }}" diff --git a/roles/object_diff/tasks/credential_types.yml b/roles/object_diff/tasks/credential_types.yml index 237ad0779..5d800d013 100644 --- a/roles/object_diff/tasks/credential_types.yml +++ b/roles/object_diff/tasks/credential_types.yml @@ -22,7 +22,7 @@ - name: "Find the difference of Credential Types between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: - __credential_types_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + __credential_types_difference: "{{ lookup(controller_role_plugin, api_list=__controller_api_credential_types, compare_list=controller_credential_types, with_present=false, set_absent=true) }}" diff --git a/roles/object_diff/tasks/credentials.yml b/roles/object_diff/tasks/credentials.yml index b4263d14f..ca5321b3a 100644 --- a/roles/object_diff/tasks/credentials.yml +++ b/roles/object_diff/tasks/credentials.yml @@ -19,7 +19,7 @@ - name: "Find the difference of Credentials between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: - __credentials_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + __credentials_difference: "{{ lookup(controller_role_plugin, api_list=__controller_api_credentials, compare_list=controller_credentials, with_present=false, set_absent=true) }}" diff --git a/roles/object_diff/tasks/execution_environments.yml b/roles/object_diff/tasks/execution_environments.yml index 612073bcf..c63c24cb0 100644 --- a/roles/object_diff/tasks/execution_environments.yml +++ b/roles/object_diff/tasks/execution_environments.yml @@ -16,7 +16,7 @@ - name: "Find the difference of Execution Environment between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: - __execution_environments_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + __execution_environments_difference: "{{ lookup(controller_role_plugin, api_list=__controller_api_execution_environments, compare_list=controller_execution_environments, with_present=false, set_absent=true) }}" diff --git a/roles/object_diff/tasks/groups.yml b/roles/object_diff/tasks/groups.yml index cd8c71127..7104f3f37 100644 --- a/roles/object_diff/tasks/groups.yml +++ b/roles/object_diff/tasks/groups.yml @@ -36,7 +36,7 @@ block: - name: "Find the difference of Groups between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: - __groups_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + __groups_difference: "{{ lookup(controller_role_plugin, query_params={'summary_fields.inventory.organization_id': controller_organization_id.id}, api_list=__controller_api_groups, compare_list=controller_groups, with_present=false, set_absent=true) diff --git a/roles/object_diff/tasks/hosts.yml b/roles/object_diff/tasks/hosts.yml index 5713c5c9f..aeadd54e9 100644 --- a/roles/object_diff/tasks/hosts.yml +++ b/roles/object_diff/tasks/hosts.yml @@ -37,7 +37,7 @@ block: - name: "Find the difference of Hosts between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: - __hosts_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + __hosts_difference: "{{ lookup(controller_role_plugin, query_params={'summary_fields.inventory.organization_id': controller_organization_id.id}, api_list=__controller_api_hosts, compare_list=controller_hosts, with_present=false, set_absent=true) diff --git a/roles/object_diff/tasks/instance_groups.yml b/roles/object_diff/tasks/instance_groups.yml index 50e72ecfe..8acc1590f 100644 --- a/roles/object_diff/tasks/instance_groups.yml +++ b/roles/object_diff/tasks/instance_groups.yml @@ -19,7 +19,7 @@ - name: "Find the difference of Instance Groups between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: - __instance_groups_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + __instance_groups_difference: "{{ lookup(controller_role_plugin, api_list=__controller_api_instance_groups, compare_list=controller_instance_groups, with_present=false, diff --git a/roles/object_diff/tasks/inventories.yml b/roles/object_diff/tasks/inventories.yml index 65e2930a9..f546e237b 100644 --- a/roles/object_diff/tasks/inventories.yml +++ b/roles/object_diff/tasks/inventories.yml @@ -18,7 +18,7 @@ - name: "Find the difference of Inventories between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: - __inventories_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + __inventories_difference: "{{ lookup(controller_role_plugin, api_list=__controller_api_inventories, compare_list=controller_inventories, with_present=false, set_absent=true) }}" diff --git a/roles/object_diff/tasks/inventory_sources.yml b/roles/object_diff/tasks/inventory_sources.yml index 6da6f9179..7e993f08a 100644 --- a/roles/object_diff/tasks/inventory_sources.yml +++ b/roles/object_diff/tasks/inventory_sources.yml @@ -18,7 +18,7 @@ - name: "Find the difference of Inventory Sources between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: - __inventory_sources_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + __inventory_sources_difference: "{{ lookup(controller_role_plugin, api_list=__controller_api_inventory_sources, compare_list=controller_inventory_sources, with_present=false, set_absent=true) diff --git a/roles/object_diff/tasks/job_templates.yml b/roles/object_diff/tasks/job_templates.yml index ce4d1a8eb..9926f1e26 100644 --- a/roles/object_diff/tasks/job_templates.yml +++ b/roles/object_diff/tasks/job_templates.yml @@ -18,7 +18,7 @@ - name: "Find the difference of Job Templates between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: - __job_templates_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + __job_templates_difference: "{{ lookup(controller_role_plugin, api_list=__controller_api_job_templates, compare_list=controller_templates, with_present=false, set_absent=true) }}" diff --git a/roles/object_diff/tasks/main.yml b/roles/object_diff/tasks/main.yml index 34bec9423..12d316a54 100644 --- a/roles/object_diff/tasks/main.yml +++ b/roles/object_diff/tasks/main.yml @@ -4,7 +4,7 @@ tags: - always block: - - name: "Check installed collections (block)" + - name: "Check installed module collections (block)" block: - name: "Check if the collection ansible.controller is installed" ansible.builtin.set_fact: @@ -27,6 +27,29 @@ ansible.builtin.debug: msg: "Using the 'controller_api' plugin from: {{ controller_api_plugin }}" + - name: "Check installed role collections (block)" + block: + - name: "Check if the collection infra.controller_configuration is installed" + ansible.builtin.set_fact: + infra_controller_collection_installed: "{{ lookup('ansible.builtin.pipe', 'ansible-galaxy collection list | grep -i infra.controller_configuration || echo NOTINSTALLED') }}" + failed_when: infra_controller_collection_installed is match('NOTINSTALLED') + rescue: + - name: "Check if the collection redhat_cop.controller_configuration is installed" + ansible.builtin.set_fact: + redhat_cop_collection_installed: "{{ lookup('ansible.builtin.pipe', 'ansible-galaxy collection list | grep -i redhat_cop.controller_configuration || echo NOTINSTALLED') }}" + failed_when: redhat_cop_collection_installed is match('NOTINSTALLED') + always: + - name: "Set the collection providing the controller_api lookup plugin" + ansible.builtin.set_fact: + controller_role_plugin: "{{ ('infra.controller_configuration.controller_object_diff' if infra_controller_collection_installed is defined) | default('redhat_cop.controller_configuration.controller_object_diff' if redhat_cop_collection_installed is defined) | default('NONE') }}" + - name: "Fail if no collection is detected" + ansible.builtin.fail: + msg: "One of the following collections is required to be installed: 'infra.controller_configuration' or 'redhat_cop.controller_configuration'." + when: controller_role_plugin is match('NONE') + - name: "Show the plugin we are using" + ansible.builtin.debug: + msg: "Using the 'controller_role' plugin from: {{ controller_role_plugin }}" + - name: "Check if the connection is to an Ansible Tower or to Automation Platform" ansible.builtin.set_fact: is_aap: "{{ lookup(controller_api_plugin, 'ping', diff --git a/roles/object_diff/tasks/notification_templates.yml b/roles/object_diff/tasks/notification_templates.yml index e3b8f53d1..b7ea000a5 100644 --- a/roles/object_diff/tasks/notification_templates.yml +++ b/roles/object_diff/tasks/notification_templates.yml @@ -16,7 +16,7 @@ - name: "Find the difference of Notification Template between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: - __notification_templates_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + __notification_templates_difference: "{{ lookup(controller_role_plugin, api_list=__controller_api_notification_templates, compare_list=controller_notifications, with_present=false, set_absent=true) }}" diff --git a/roles/object_diff/tasks/organizations.yml b/roles/object_diff/tasks/organizations.yml index a3e987711..e88c1666e 100644 --- a/roles/object_diff/tasks/organizations.yml +++ b/roles/object_diff/tasks/organizations.yml @@ -21,7 +21,7 @@ - name: "Find the difference of Organizations between what is on the Controller versus curated list." ansible.builtin.set_fact: - __organizations_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + __organizations_difference: "{{ lookup(controller_role_plugin, api_list=__controller_api_organizations, compare_list=controller_organizations, with_present=false, set_absent=true) }}" diff --git a/roles/object_diff/tasks/projects.yml b/roles/object_diff/tasks/projects.yml index 6ea7b93cf..3b119ab6c 100644 --- a/roles/object_diff/tasks/projects.yml +++ b/roles/object_diff/tasks/projects.yml @@ -18,7 +18,7 @@ - name: "Find the difference of Project between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: - __projects_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + __projects_difference: "{{ lookup(controller_role_plugin, api_list=__controller_api_projects, compare_list=controller_projects, with_present=false, set_absent=true) }}" diff --git a/roles/object_diff/tasks/roles.yml b/roles/object_diff/tasks/roles.yml index d17a5c6d6..095161f21 100644 --- a/roles/object_diff/tasks/roles.yml +++ b/roles/object_diff/tasks/roles.yml @@ -53,7 +53,7 @@ - name: "Find the difference of Roles between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: - __roles_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + __roles_difference: "{{ lookup(controller_role_plugin, api_list=__full_controller_api_roles, compare_list=controller_roles, with_present=false, set_absent=true) }}" diff --git a/roles/object_diff/tasks/schedules.yml b/roles/object_diff/tasks/schedules.yml index 110a3b77a..fe2994186 100644 --- a/roles/object_diff/tasks/schedules.yml +++ b/roles/object_diff/tasks/schedules.yml @@ -37,7 +37,7 @@ - name: "Find the difference of Schedule between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: - __schedules_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + __schedules_difference: "{{ lookup(controller_role_plugin, api_list=__controller_api_schedules, compare_list=controller_schedules, with_present=false, set_absent=true) }}" diff --git a/roles/object_diff/tasks/teams.yml b/roles/object_diff/tasks/teams.yml index 12ef352fb..d1abf599f 100644 --- a/roles/object_diff/tasks/teams.yml +++ b/roles/object_diff/tasks/teams.yml @@ -30,7 +30,7 @@ - name: "Find the difference of Teams between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: - __teams_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + __teams_difference: "{{ lookup(controller_role_plugin, api_list=__controller_api_teams, compare_list=controller_teams, with_present=false, diff --git a/roles/object_diff/tasks/user_accounts.yml b/roles/object_diff/tasks/user_accounts.yml index 0504bd4c1..1bfb32e5a 100644 --- a/roles/object_diff/tasks/user_accounts.yml +++ b/roles/object_diff/tasks/user_accounts.yml @@ -36,7 +36,7 @@ block: - name: "Find the difference of User Accounts between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: - __user_accounts_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + __user_accounts_difference: "{{ lookup(controller_role_plugin, api_list=__controller_api_user_accounts, compare_list=controller_user_accounts, with_present=false, set_absent=true) }}" diff --git a/roles/object_diff/tasks/workflow_job_templates.yml b/roles/object_diff/tasks/workflow_job_templates.yml index f26795e2c..2f3c93c8a 100644 --- a/roles/object_diff/tasks/workflow_job_templates.yml +++ b/roles/object_diff/tasks/workflow_job_templates.yml @@ -18,7 +18,7 @@ - name: "Find the difference of Workflow Job Templates between what is on the Controller versus CasC on SCM" ansible.builtin.set_fact: - __workflow_job_templates_difference: "{{ lookup('redhat_cop.controller_configuration.controller_object_diff', + __workflow_job_templates_difference: "{{ lookup(controller_role_plugin, api_list=__controller_api_workflow_job_templates, compare_list=controller_workflows, with_present=false, set_absent=true) diff --git a/roles/organizations/README.md b/roles/organizations/README.md index e5b31f4fd..9a43a43c1 100644 --- a/roles/organizations/README.md +++ b/roles/organizations/README.md @@ -163,7 +163,7 @@ controller_organizations: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.organizations, when: controller_organizations is defined} + - {role: infra.controller_configuration.organizations, when: controller_organizations is defined} ``` ## License diff --git a/roles/project_update/README.md b/roles/project_update/README.md index 16cab2796..202a9d2c5 100644 --- a/roles/project_update/README.md +++ b/roles/project_update/README.md @@ -115,7 +115,7 @@ controller_projects: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.project_update, when: controller_projects is defined} + - {role: infra.controller_configuration.project_update, when: controller_projects is defined} ``` diff --git a/roles/projects/README.md b/roles/projects/README.md index 4b13dd92f..5a0a85e69 100644 --- a/roles/projects/README.md +++ b/roles/projects/README.md @@ -149,7 +149,7 @@ controller_projects: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.projects, when: controller_projects is defined} + - {role: infra.controller_configuration.projects, when: controller_projects is defined} ``` ## License diff --git a/roles/roles/README.md b/roles/roles/README.md index b94876575..dbd660fcf 100644 --- a/roles/roles/README.md +++ b/roles/roles/README.md @@ -151,7 +151,7 @@ controller_roles: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.roles, when: controller_roles is defined} + - {role: infra.controller_configuration.roles, when: controller_roles is defined} ``` ## License diff --git a/roles/schedules/README.md b/roles/schedules/README.md index 8ef7da3ca..c1db6f125 100644 --- a/roles/schedules/README.md +++ b/roles/schedules/README.md @@ -137,7 +137,7 @@ controller_schedules: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.schedules, when: controller_schedules is defined} + - {role: infra.controller_configuration.schedules, when: controller_schedules is defined} ``` ## License diff --git a/roles/settings/README.md b/roles/settings/README.md index 8845b6e9c..4ee4dea42 100644 --- a/roles/settings/README.md +++ b/roles/settings/README.md @@ -140,7 +140,7 @@ controller_settings: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.settings, when: controller_settings is defined} + - {role: infra.controller_configuration.settings, when: controller_settings is defined} ``` ## License diff --git a/roles/teams/README.md b/roles/teams/README.md index 1fe4dcdc5..3b7805910 100644 --- a/roles/teams/README.md +++ b/roles/teams/README.md @@ -82,7 +82,7 @@ This also speeds up the overall role. ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.teams, when: controller_teams is defined} + - {role: infra.controller_configuration.teams, when: controller_teams is defined} ``` ## License diff --git a/roles/users/README.md b/roles/users/README.md index 5d5ad6d69..579846700 100644 --- a/roles/users/README.md +++ b/roles/users/README.md @@ -117,7 +117,7 @@ controller_user_accounts: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.users, when: controller_user_accounts is defined} + - {role: infra.controller_configuration.users, when: controller_user_accounts is defined} ``` ## License diff --git a/roles/workflow_job_templates/README.md b/roles/workflow_job_templates/README.md index c8c667add..79d7db395 100644 --- a/roles/workflow_job_templates/README.md +++ b/roles/workflow_job_templates/README.md @@ -402,7 +402,7 @@ controller_workflows: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.workflow_job_templates, when: controller_workflows is defined} + - {role: infra.controller_configuration.workflow_job_templates, when: controller_workflows is defined} ``` diff --git a/roles/workflow_launch/README.md b/roles/workflow_launch/README.md index b22a1dfd3..ca85e5ebe 100644 --- a/roles/workflow_launch/README.md +++ b/roles/workflow_launch/README.md @@ -85,7 +85,7 @@ controller_workflow_launch_jobs: ignore_files: [controller_config.yml.template] extensions: ["yml"] roles: - - {role: redhat_cop.controller_configuration.workflow_launch, when: controller_workflow_launch_jobs is defined} + - {role: infra.controller_configuration.workflow_launch, when: controller_workflow_launch_jobs is defined} ``` From cf2c651a9fa0e791b4485227cf003ab2958336cf Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Wed, 15 Mar 2023 21:07:21 -0400 Subject: [PATCH 85/94] Update release (#543) * Fix incorrect required from no to yes inventory organization * update references from redhat_cop to infra * update release --------- Co-authored-by: Tony Kay --- .github/workflows/release.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef0f399cd..6a5e67d75 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,8 +9,20 @@ on: - published jobs: - integration-test: - uses: "./.github/workflows/ci_standalone.yaml" + ci_standalone: + strategy: + fail-fast: false + matrix: + awx_version: + - devel + - 21.13.0 + - 21.12.0 + - 21.11.0 + # - 20.1.0 Diabled until working + # - 19.5.1 Diabled until working + uses: "./.github/workflows/ci_standalone_versioned.yml" + with: + awx_version: ${{ matrix.awx_version }} release: needs: - integration-test From 92eafdfae6e06c70f821d085271684a6f7cf0c53 Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Wed, 15 Mar 2023 21:52:02 -0400 Subject: [PATCH 86/94] Update Release (#544) * Fix incorrect required from no to yes inventory organization * update references from redhat_cop to infra * update release * update release --------- Co-authored-by: Tony Kay --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6a5e67d75..9bea9e78f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: awx_version: ${{ matrix.awx_version }} release: needs: - - integration-test + - ci_standalone uses: "redhat-cop/ansible_collections_tooling/.github/workflows/release_pipeline.yml@main" with: collection_namespace: infra From dc5477c29ab52e46cdd4ce3a2a61704276fe0fe1 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Thu, 16 Mar 2023 12:32:23 +0000 Subject: [PATCH 87/94] Update release.yml (#545) --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9bea9e78f..f87e15ae0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,6 +34,7 @@ jobs: collection_version: ${{ github.ref_name }} collection_repo: https://github.com/redhat-cop/controller_configuration/ quay_username: redhat_cop + collection_dependencies: awx.awx secrets: galaxy_api_key: ${{ secrets.ANSIBLE_GALAXY_APIKEY }} infra_api_key: ${{ secrets.GALAXY_INFRA_KEY }} From 3cd463b952a88a1d95a6f8b9f5e28f646e86151b Mon Sep 17 00:00:00 2001 From: Tom Page Date: Fri, 17 Mar 2023 00:45:46 +0000 Subject: [PATCH 88/94] Fixes calendar icon to link to an ICS file which user can save (#546) * Add calendar link * Remove download attriute which is stripped away by GH * ignore line endings for ics file * linting * mute rule * Fix lint --------- Co-authored-by: Sean Sullivan --- .ansible-lint | 1 + .gitignore | 1 + README.md | 4 +-- docs/aap_config_as_code_public_meeting.ics | 39 ++++++++++++++++++++++ tests/sanity/ignore-2.11.txt | 1 + tests/sanity/ignore-2.12.txt | 1 + tests/sanity/ignore-2.13.txt | 1 + tests/sanity/ignore-2.14.txt | 1 + tests/sanity/ignore-2.15.txt | 1 + 9 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 docs/aap_config_as_code_public_meeting.ics create mode 100644 tests/sanity/ignore-2.11.txt create mode 100644 tests/sanity/ignore-2.12.txt create mode 100644 tests/sanity/ignore-2.13.txt create mode 100644 tests/sanity/ignore-2.14.txt create mode 100644 tests/sanity/ignore-2.15.txt diff --git a/.ansible-lint b/.ansible-lint index 506390966..78211f557 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -20,6 +20,7 @@ skip_list: - fqcn[keyword] - meta-runtime # This collection with the appropriate awx.awx or ansible.controller still works with older ansible. - role-name[path] + - sanity[cannot-ignore] # We're only ignoring sanity rules when we have to kinds: - playbooks: "**/examples/templates/*.{yml,yaml}" - playbooks: "**/examples/*.{yml,yaml}" diff --git a/.gitignore b/.gitignore index 6299c1d09..188a8aadc 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ galaxy.yml *.pyc id_rsa* test +tests/output diff --git a/README.md b/README.md index eb062b1b2..2c0dbe853 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![pre-commit tests](https://github.com/redhat-cop/controller_configuration/actions/workflows/pre-commit.yml/badge.svg) ![Galaxy Release](https://github.com/redhat-cop/controller_configuration/workflows/galaxy-release/badge.svg) - + This Ansible collection allows for easy interaction with an AWX or Ansible Controller server via Ansible roles using the AWX/Controller collection modules. @@ -170,7 +170,7 @@ More information about contributing can be found in our [Contribution Guidelines 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: - + ## Code of Conduct diff --git a/docs/aap_config_as_code_public_meeting.ics b/docs/aap_config_as_code_public_meeting.ics new file mode 100644 index 000000000..8ae6c226e --- /dev/null +++ b/docs/aap_config_as_code_public_meeting.ics @@ -0,0 +1,39 @@ +BEGIN:VCALENDAR +CALSCALE:GREGORIAN +VERSION:2.0 +X-WR-CALNAME:AAP config as code Public meeting +METHOD:PUBLISH +PRODID:-//Apple Inc.//macOS 13.2.1//EN +BEGIN:VEVENT +TRANSP:OPAQUE +DTEND:20230412T160000Z +ORGANIZER;CN="ssulliva@redhat.com";EMAIL="ssulliva@redhat.com":mailto:ss + ulliva@redhat.com +UID:2k8fmfg2msr8lfi6k6g5upqt9a@google.com +DTSTAMP:20230316T155301Z +X-GOOGLE-CONFERENCE:https://meet.google.com/npj-fyzv-oyo +DESCRIPTION:https://github.com/redhat-cop/controller_configuration/i + ssues/475\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 + Join using SIP\n1189446461569@gmeet.redhat.com (ID: 1189446461569)\nMore + joining options: https://tel.meet/npj-fyzv-oyo?pin=1189446461569&hs=7\n + \nLearn more about Meet at: https://support.google.com/a/users/answer/92 + 82720\n\nPlease do not edit this section.\n-::~:~::~:~:~:~:~:~:~:~:~:~:~ + :~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~::~:~::- +STATUS:CONFIRMED +SEQUENCE:2 +SUMMARY:AAP config as code Public meeting +DTSTART:20230412T150000Z +LAST-MODIFIED:20230316T155150Z +CREATED:20230123T211213Z +BEGIN:VALARM +UID:4555EBDE-771F-420A-9ED8-CB6C7540E67D +X-WR-ALARMUID:4555EBDE-771F-420A-9ED8-CB6C7540E67D +TRIGGER:-PT10M +DESCRIPTION:This is an event reminder +ACTION:DISPLAY +END:VALARM +END:VEVENT +END:VCALENDAR diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt new file mode 100644 index 000000000..b2ddbcad7 --- /dev/null +++ b/tests/sanity/ignore-2.11.txt @@ -0,0 +1 @@ +docs/aap_config_as_code_public_meeting.ics line-endings!skip diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt new file mode 100644 index 000000000..b2ddbcad7 --- /dev/null +++ b/tests/sanity/ignore-2.12.txt @@ -0,0 +1 @@ +docs/aap_config_as_code_public_meeting.ics line-endings!skip diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.13.txt new file mode 100644 index 000000000..b2ddbcad7 --- /dev/null +++ b/tests/sanity/ignore-2.13.txt @@ -0,0 +1 @@ +docs/aap_config_as_code_public_meeting.ics line-endings!skip diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt new file mode 100644 index 000000000..b2ddbcad7 --- /dev/null +++ b/tests/sanity/ignore-2.14.txt @@ -0,0 +1 @@ +docs/aap_config_as_code_public_meeting.ics line-endings!skip diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt new file mode 100644 index 000000000..b2ddbcad7 --- /dev/null +++ b/tests/sanity/ignore-2.15.txt @@ -0,0 +1 @@ +docs/aap_config_as_code_public_meeting.ics line-endings!skip From 3839b01d32f9d792159a12c8ed13f54bbe49b093 Mon Sep 17 00:00:00 2001 From: Klaas Demter Date: Mon, 20 Mar 2023 17:56:10 +0100 Subject: [PATCH 89/94] Fix dispatch to use general vars instead of specific hostvars (#547) * Fix dispatch to use general vars instead of specific hostvars * Add changelog --------- Co-authored-by: Tom Page --- changelogs/fragments/dispatch_fix.yml | 4 ++++ roles/dispatch/tasks/main.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/dispatch_fix.yml diff --git a/changelogs/fragments/dispatch_fix.yml b/changelogs/fragments/dispatch_fix.yml new file mode 100644 index 000000000..d70caf29f --- /dev/null +++ b/changelogs/fragments/dispatch_fix.yml @@ -0,0 +1,4 @@ +--- +bugfixes: + - Ensures vars get loaded properly by dispatch role +... diff --git a/roles/dispatch/tasks/main.yml b/roles/dispatch/tasks/main.yml index c2a4c0778..472fd8a49 100644 --- a/roles/dispatch/tasks/main.yml +++ b/roles/dispatch/tasks/main.yml @@ -4,7 +4,7 @@ name: "{{ __role.role }}" apply: tags: "{{ __role.tags }}" - when: hostvars[inventory_hostname][__role.var] is defined + when: vars[__role.var] is defined tags: always loop: "{{ controller_configuration_dispatcher_roles }}" loop_control: From b07941aca89c904da1c4118729fc14cd8bb83ec4 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 22 Mar 2023 15:47:09 +0000 Subject: [PATCH 90/94] Move CI test code to codebase rather than .github (#549) * Move CI test code to codebase rather than .github * Fixes to linting and doc paths * Trigger Git Commit --- .github/CONTRIBUTING.md | 6 +++--- .../redhat_cop/controller_configuration | 1 - .github/workflows/ci_standalone_versioned.yml | 4 ++-- roles/filetree_create/automatetheautomation.md | 2 +- .../config-controller-filetree.yml | 0 .../automatetheautomation/drop_diff.yml | 0 .../controller_credential_types_aap_monitor.yml | 0 .../controller_credential_types_acme_key.yml | 0 .../controller_credential_types_cloudforms.yml | 0 .../controller_credential_types_multiple.yml | 0 .../controller_credential_types_servicenow.yml | 0 .../controller_credential_types.yml | 0 .../controller_groups.d/controller_groups.yml | 0 .../app-example/controller_instance_groups_otlc.yml | 0 .../controller_instance_groups.yml | 0 .../app-casc/controller_inventories_localhost.yml | 0 .../app-example/controller_inventories_excel.yml | 0 .../controller_inventories_smart_org1.yml | 0 .../controller_inventories_smart_org2.yml | 0 .../controller_inventories.yml | 0 .../app-casc/controller_job_templates_casc.yml | 0 .../controller_job_templates_container_groups.yml | 0 .../controller_job_templates_demo_push.yml | 0 .../controller_job_templates.yml | 0 .../app-casc/controller_organizations_Global.yml | 0 .../controller_organizations_ExampleOrg.yml | 0 .../controller_organizations_OrgCrossTeams.yml | 0 .../controller_organizations_Organizations1-2.yml | 0 .../controller_organizations.yml | 0 .../app-casc/controller_projects_casc.yml | 0 .../controller_projects_container_groups.yml | 0 .../controller_projects.d/controller_projects.yml | 0 .../controller_projects_inventory_sourcea_dev.yml | 0 .../controller_projects_inventory_sourcea_prod.yml | 0 .../controller_projects_inventory_sourceb_dev.yml | 0 .../controller_projects_inventory_sourceb_prod.yml | 0 .../app-example/controller_roles_cmdb_approvals.yml | 0 .../app-example/controller_roles_inventories.yml | 0 .../controller_roles_inventory_wf_update.yml | 0 .../app-example/controller_roles_teams.yml | 0 .../app-example/controller_roles_users.yml | 0 .../common/controller_roles.d/controller_roles.yml | 0 .../app-casc/controller_schedules_casc.yml | 0 .../app-example/controller_schedules_example.yml | 0 .../controller_schedules.d/controller_schedules.yml | 0 .../app-demo/controller_teams_org1.yml | 0 .../app-demo/controller_teams_org2.yml | 0 .../common/controller_teams.d/controller_teams.yml | 0 .../controller_workflow_job_templates_casc.yml | 0 ...oller_workflow_job_templates_InventoryUpdate.yml | 0 .../controller_workflow_job_templates.yml | 0 .../app-examples/controller_credentials_aap.yml | 0 .../app-examples/controller_credentials_galaxy.yml | 0 .../app-examples/controller_credentials_machine.yml | 0 .../app-examples/controller_credentials_ocp.yml | 0 .../controller_credentials_registry.yml | 0 .../app-examples/controller_credentials_scm.yml | 0 .../app-examples/controller_credentials_vault.yml | 0 .../controller_execution_environments_ee-casc.yml | 0 .../controller_execution_environments_ee-xlsx.yml | 0 .../controller_execution_environments.yml | 0 .../app-casc/controller_hosts_localhost.yml | 0 .../env/dev/controller_hosts.d/controller_hosts.yml | 0 .../controller_inventory_sources_sourcea_dev.yml | 0 .../controller_inventory_sources_sourcea_prod.yml | 0 .../controller_inventory_sources_sourceb_dev.yml | 0 .../controller_inventory_sources_sourceb_prod.yml | 0 .../controller_inventory_sources.yml | 0 .../app-examples/controller_settings_jobs.yml | 0 .../app-examples/controller_settings_ldap.yml | 0 .../app-examples/controller_settings_system.yml | 0 .../controller_settings_user_interface.yml | 0 .../controller_settings.d/controller_settings.yml | 0 .../app-demo/controller_user_accounts_org1.yml | 0 .../app-demo/controller_user_accounts_org2.yml | 0 .../controller_users.d/controller_user_accounts.yml | 0 .../app-examples/controller_credentials_aap.yml | 0 .../app-examples/controller_credentials_galaxy.yml | 0 .../app-examples/controller_credentials_machine.yml | 0 .../app-examples/controller_credentials_ocp.yml | 0 .../controller_credentials_registry.yml | 0 .../app-examples/controller_credentials_scm.yml | 0 .../app-examples/controller_credentials_vault.yml | 0 .../controller_execution_environments_ee-casc.yml | 0 .../controller_execution_environments_ee-xlsx.yml | 0 .../controller_execution_environments.yml | 0 .../prod/controller_hosts.d/controller_hosts.yml | 0 .../controller_inventory_sources_sourcea_dev.yml | 0 .../controller_inventory_sources_sourcea_prod.yml | 0 .../controller_inventory_sources_sourceb_dev.yml | 0 .../controller_inventory_sources_sourceb_prod.yml | 0 .../controller_inventory_sources.yml | 0 .../app-examples/controller_settings_jobs.yml | 0 .../app-examples/controller_settings_ldap.yml | 0 .../app-examples/controller_settings_system.yml | 0 .../controller_settings_user_interface.yml | 0 .../controller_settings.d/controller_settings.yml | 0 .../app-demo/controller_user_accounts_org1.yml | 0 .../app-demo/controller_user_accounts_org2.yml | 0 .../controller_users.d/controller_user_accounts.yml | 0 .../configure_connection_controller_credentials.yml | 0 .../configure_connection_controller_credentials.yml | 0 .../pictures/AAP_CasC_Worflow.png | Bin .../configs/ad_hoc_command_cancel_defaults.yml | 0 .../tests => tests}/configs/ad_hoc_commands.yml | 0 {.github/tests => tests}/configs/applications.yml | 0 .../tests => tests}/configs/controller_auth.yml | 0 .../configs/credential_input_sources.yml | 0 .../tests => tests}/configs/credential_types.yml | 0 {.github/tests => tests}/configs/credentials.yml | 0 .../tests => tests}/configs/differential_items.yml | 0 .../configs/execution_environments.yml | 0 {.github/tests => tests}/configs/groups.yml | 0 {.github/tests => tests}/configs/hosts.yml | 0 .../tests => tests}/configs/instance_groups.yml | 0 {.github/tests => tests}/configs/instances.yml | 0 {.github/tests => tests}/configs/inventories.yml | 0 .../tests => tests}/configs/inventory_sources.yml | 0 {.github/tests => tests}/configs/labels.yml | 0 {.github/tests => tests}/configs/launch_jobs.yml | 0 {.github/tests => tests}/configs/notifications.yml | 0 {.github/tests => tests}/configs/organizations.yml | 0 {.github/tests => tests}/configs/projects.yml | 0 {.github/tests => tests}/configs/roles.yml | 0 {.github/tests => tests}/configs/schedule.yml | 0 {.github/tests => tests}/configs/settings.yml | 0 .../configs/settings_individuale.yml | 0 .../tests => tests}/configs/ssh_private_key.yml | 0 {.github/tests => tests}/configs/teams.yml | 0 {.github/tests => tests}/configs/templates.yml | 0 {.github/tests => tests}/configs/user_accounts.yml | 0 {.github/tests => tests}/configs/workflows.yml | 0 .../tests => tests}/configs/workfows_launch.yml | 0 .../tests => tests}/configs_export_model/auth.yml | 0 .../credential_types_export.yml | 0 .../configs_export_model/credentials_export.yml | 0 .../configs_export_model/inventory_export.yml | 0 .../inventory_sources_export.yml | 0 .../configs_export_model/job_templates_export.yml | 0 .../notifications_templates_export.yml | 0 .../configs_export_model/organizations_export.yml | 0 .../configs_export_model/projects_export.yml | 0 .../configs_export_model/teams_export.yml | 0 .../configs_export_model/users_export.yml | 0 .../configs_export_model/workflows.yml | 0 {.github/tests => tests}/configure_controller.yml | 2 +- .../configure_controller_export_model.yml | 3 +-- {.github/tests => tests}/playbooks/README.md | 0 .../playbooks/cd_gitlab_webhook_trigger.yml | 0 .../tests => tests}/playbooks/configure_awx.yml | 0 .../playbooks/configure_controller.yml | 0 .../playbooks/tasks/ad_hoc_cancel.yml | 0 {.github/tests => tests}/tasks/ad_hoc_cancel.yml | 0 {.github/tests => tests}/tasks/differential.yml | 0 {.github/tests => tests}/templates/README.md | 0 .../templates/collections/requirements.yml | 0 .../tests => tests}/templates/controller_config.yml | 0 .../templates/tasks/manage_controller_settings.yml | 0 .../templates/tasks/manage_credential_types.yml | 0 .../templates/tasks/manage_credentials.yml | 0 .../tasks/manage_execution_environments.yml | 0 .../templates/tasks/manage_groups.yml | 0 .../templates/tasks/manage_hosts.yml | 0 .../templates/tasks/manage_instance_groups.yml | 0 .../templates/tasks/manage_inventories.yml | 0 .../templates/tasks/manage_inventory_sources.yml | 0 .../templates/tasks/manage_job_templates.yml | 0 .../templates/tasks/manage_labels.yml | 0 .../tasks/manage_notification_templates.yml | 0 .../templates/tasks/manage_organizations.yml | 0 .../templates/tasks/manage_projects.yml | 0 .../templates/tasks/manage_roles.yml | 0 .../templates/tasks/manage_schedules.yml | 0 .../templates/tasks/manage_teams.yml | 0 .../templates/tasks/manage_users.yml | 0 .../templates/tasks/manage_workflow_templates.yml | 0 .../templates/vars/controller_credential_types.yml | 0 .../templates/vars/controller_credentials.yml | 0 .../vars/controller_execution_environments.yml | 0 .../templates/vars/controller_groups.yml | 0 .../templates/vars/controller_hosts.yml | 0 .../templates/vars/controller_instance_groups.yml | 0 .../templates/vars/controller_inventories.yml | 0 .../templates/vars/controller_inventory_sources.yml | 0 .../templates/vars/controller_job_templates.yml | 0 .../templates/vars/controller_labels.yml | 0 .../vars/controller_ldap_configuration.json | 0 .../vars/controller_notification_templates.yml | 0 .../templates/vars/controller_organizations.yml | 0 .../vars/controller_organizations_with_hub.yml | 0 .../templates/vars/controller_projects.yml | 0 .../templates/vars/controller_roles.yml | 0 .../templates/vars/controller_schedules.yml | 0 .../templates/vars/controller_teams.yml | 0 .../templates/vars/controller_users.yml | 0 .../templates/vars/controller_vars.yml | 0 .../templates/vars/controller_workflows.yml | 0 197 files changed, 8 insertions(+), 10 deletions(-) delete mode 120000 .github/tests/collections/ansible_collections/redhat_cop/controller_configuration rename {.github/tests => tests}/automatetheautomation/config-controller-filetree.yml (100%) rename {.github/tests => tests}/automatetheautomation/drop_diff.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_aap_monitor.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_acme_key.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_cloudforms.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_multiple.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_servicenow.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/controller_credential_types.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_groups.d/controller_groups.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_instance_groups.d/app-example/controller_instance_groups_otlc.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_instance_groups.d/controller_instance_groups.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/app-casc/controller_inventories_localhost.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/app-example/controller_inventories_excel.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/app-example/controller_inventories_smart_org1.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/app-example/controller_inventories_smart_org2.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/controller_inventories.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_job_templates.d/app-casc/controller_job_templates_casc.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_job_templates.d/app-example/controller_job_templates_container_groups.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_job_templates.d/app-example/controller_job_templates_demo_push.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_job_templates.d/controller_job_templates.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/app-casc/controller_organizations_Global.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/app-example/controller_organizations_ExampleOrg.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/app-example/controller_organizations_OrgCrossTeams.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/app-example/controller_organizations_Organizations1-2.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/controller_organizations.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/app-casc/controller_projects_casc.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/app-ocp/controller_projects_container_groups.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/controller_projects.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/inventories/controller_projects_inventory_sourcea_dev.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/inventories/controller_projects_inventory_sourcea_prod.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/inventories/controller_projects_inventory_sourceb_dev.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/inventories/controller_projects_inventory_sourceb_prod.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_cmdb_approvals.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_inventories.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_inventory_wf_update.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_teams.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_users.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/controller_roles.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_schedules.d/app-casc/controller_schedules_casc.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_schedules.d/app-example/controller_schedules_example.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_schedules.d/controller_schedules.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_teams.d/app-demo/controller_teams_org1.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_teams.d/app-demo/controller_teams_org2.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_teams.d/controller_teams.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_workflow_job_templates.d/app-casc/controller_workflow_job_templates_casc.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_workflow_job_templates.d/app-examples/controller_workflow_job_templates_InventoryUpdate.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_workflow_job_templates.d/controller_workflow_job_templates.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_aap.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_galaxy.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_machine.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_ocp.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_registry.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_scm.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_vault.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_execution_environments.d/app-casc/controller_execution_environments_ee-casc.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_execution_environments.d/app-examples/controller_execution_environments_ee-xlsx.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_execution_environments.d/controller_execution_environments.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_hosts.d/app-casc/controller_hosts_localhost.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_hosts.d/controller_hosts.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourcea_dev.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourcea_prod.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourceb_dev.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourceb_prod.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/controller_inventory_sources.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/app-examples/controller_settings_jobs.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/app-examples/controller_settings_ldap.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/app-examples/controller_settings_system.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/app-examples/controller_settings_user_interface.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/controller_settings.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_users.d/app-demo/controller_user_accounts_org1.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_users.d/app-demo/controller_user_accounts_org2.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_users.d/controller_user_accounts.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_aap.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_galaxy.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_machine.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_ocp.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_registry.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_scm.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_vault.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_execution_environments.d/app-casc/controller_execution_environments_ee-casc.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_execution_environments.d/app-examples/controller_execution_environments_ee-xlsx.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_execution_environments.d/controller_execution_environments.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_hosts.d/controller_hosts.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourcea_dev.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourcea_prod.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourceb_dev.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourceb_prod.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/controller_inventory_sources.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples/controller_settings_jobs.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples/controller_settings_ldap.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples/controller_settings_system.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples/controller_settings_user_interface.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/controller_settings.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_users.d/app-demo/controller_user_accounts_org1.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_users.d/app-demo/controller_user_accounts_org2.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_users.d/controller_user_accounts.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/env/dev/configure_connection_controller_credentials.yml (100%) rename {.github/tests => tests}/automatetheautomation/orgs_vars/env/prod/configure_connection_controller_credentials.yml (100%) rename {.github/tests => tests}/automatetheautomation/pictures/AAP_CasC_Worflow.png (100%) rename {.github/tests => tests}/configs/ad_hoc_command_cancel_defaults.yml (100%) rename {.github/tests => tests}/configs/ad_hoc_commands.yml (100%) rename {.github/tests => tests}/configs/applications.yml (100%) rename {.github/tests => tests}/configs/controller_auth.yml (100%) rename {.github/tests => tests}/configs/credential_input_sources.yml (100%) rename {.github/tests => tests}/configs/credential_types.yml (100%) rename {.github/tests => tests}/configs/credentials.yml (100%) rename {.github/tests => tests}/configs/differential_items.yml (100%) rename {.github/tests => tests}/configs/execution_environments.yml (100%) rename {.github/tests => tests}/configs/groups.yml (100%) rename {.github/tests => tests}/configs/hosts.yml (100%) rename {.github/tests => tests}/configs/instance_groups.yml (100%) rename {.github/tests => tests}/configs/instances.yml (100%) rename {.github/tests => tests}/configs/inventories.yml (100%) rename {.github/tests => tests}/configs/inventory_sources.yml (100%) rename {.github/tests => tests}/configs/labels.yml (100%) rename {.github/tests => tests}/configs/launch_jobs.yml (100%) rename {.github/tests => tests}/configs/notifications.yml (100%) rename {.github/tests => tests}/configs/organizations.yml (100%) rename {.github/tests => tests}/configs/projects.yml (100%) rename {.github/tests => tests}/configs/roles.yml (100%) rename {.github/tests => tests}/configs/schedule.yml (100%) rename {.github/tests => tests}/configs/settings.yml (100%) rename {.github/tests => tests}/configs/settings_individuale.yml (100%) rename {.github/tests => tests}/configs/ssh_private_key.yml (100%) rename {.github/tests => tests}/configs/teams.yml (100%) rename {.github/tests => tests}/configs/templates.yml (100%) rename {.github/tests => tests}/configs/user_accounts.yml (100%) rename {.github/tests => tests}/configs/workflows.yml (100%) rename {.github/tests => tests}/configs/workfows_launch.yml (100%) rename {.github/tests => tests}/configs_export_model/auth.yml (100%) rename {.github/tests => tests}/configs_export_model/credential_types_export.yml (100%) rename {.github/tests => tests}/configs_export_model/credentials_export.yml (100%) rename {.github/tests => tests}/configs_export_model/inventory_export.yml (100%) rename {.github/tests => tests}/configs_export_model/inventory_sources_export.yml (100%) rename {.github/tests => tests}/configs_export_model/job_templates_export.yml (100%) rename {.github/tests => tests}/configs_export_model/notifications_templates_export.yml (100%) rename {.github/tests => tests}/configs_export_model/organizations_export.yml (100%) rename {.github/tests => tests}/configs_export_model/projects_export.yml (100%) rename {.github/tests => tests}/configs_export_model/teams_export.yml (100%) rename {.github/tests => tests}/configs_export_model/users_export.yml (100%) rename {.github/tests => tests}/configs_export_model/workflows.yml (100%) rename {.github/tests => tests}/configure_controller.yml (99%) rename {.github/tests => tests}/configure_controller_export_model.yml (99%) rename {.github/tests => tests}/playbooks/README.md (100%) rename {.github/tests => tests}/playbooks/cd_gitlab_webhook_trigger.yml (100%) rename {.github/tests => tests}/playbooks/configure_awx.yml (100%) rename {.github/tests => tests}/playbooks/configure_controller.yml (100%) rename {.github/tests => tests}/playbooks/tasks/ad_hoc_cancel.yml (100%) rename {.github/tests => tests}/tasks/ad_hoc_cancel.yml (100%) rename {.github/tests => tests}/tasks/differential.yml (100%) rename {.github/tests => tests}/templates/README.md (100%) rename {.github/tests => tests}/templates/collections/requirements.yml (100%) rename {.github/tests => tests}/templates/controller_config.yml (100%) rename {.github/tests => tests}/templates/tasks/manage_controller_settings.yml (100%) rename {.github/tests => tests}/templates/tasks/manage_credential_types.yml (100%) rename {.github/tests => tests}/templates/tasks/manage_credentials.yml (100%) rename {.github/tests => tests}/templates/tasks/manage_execution_environments.yml (100%) rename {.github/tests => tests}/templates/tasks/manage_groups.yml (100%) rename {.github/tests => tests}/templates/tasks/manage_hosts.yml (100%) rename {.github/tests => tests}/templates/tasks/manage_instance_groups.yml (100%) rename {.github/tests => tests}/templates/tasks/manage_inventories.yml (100%) rename {.github/tests => tests}/templates/tasks/manage_inventory_sources.yml (100%) rename {.github/tests => tests}/templates/tasks/manage_job_templates.yml (100%) rename {.github/tests => tests}/templates/tasks/manage_labels.yml (100%) rename {.github/tests => tests}/templates/tasks/manage_notification_templates.yml (100%) rename {.github/tests => tests}/templates/tasks/manage_organizations.yml (100%) rename {.github/tests => tests}/templates/tasks/manage_projects.yml (100%) rename {.github/tests => tests}/templates/tasks/manage_roles.yml (100%) rename {.github/tests => tests}/templates/tasks/manage_schedules.yml (100%) rename {.github/tests => tests}/templates/tasks/manage_teams.yml (100%) rename {.github/tests => tests}/templates/tasks/manage_users.yml (100%) rename {.github/tests => tests}/templates/tasks/manage_workflow_templates.yml (100%) rename {.github/tests => tests}/templates/vars/controller_credential_types.yml (100%) rename {.github/tests => tests}/templates/vars/controller_credentials.yml (100%) rename {.github/tests => tests}/templates/vars/controller_execution_environments.yml (100%) rename {.github/tests => tests}/templates/vars/controller_groups.yml (100%) rename {.github/tests => tests}/templates/vars/controller_hosts.yml (100%) rename {.github/tests => tests}/templates/vars/controller_instance_groups.yml (100%) rename {.github/tests => tests}/templates/vars/controller_inventories.yml (100%) rename {.github/tests => tests}/templates/vars/controller_inventory_sources.yml (100%) rename {.github/tests => tests}/templates/vars/controller_job_templates.yml (100%) rename {.github/tests => tests}/templates/vars/controller_labels.yml (100%) rename {.github/tests => tests}/templates/vars/controller_ldap_configuration.json (100%) rename {.github/tests => tests}/templates/vars/controller_notification_templates.yml (100%) rename {.github/tests => tests}/templates/vars/controller_organizations.yml (100%) rename {.github/tests => tests}/templates/vars/controller_organizations_with_hub.yml (100%) rename {.github/tests => tests}/templates/vars/controller_projects.yml (100%) rename {.github/tests => tests}/templates/vars/controller_roles.yml (100%) rename {.github/tests => tests}/templates/vars/controller_schedules.yml (100%) rename {.github/tests => tests}/templates/vars/controller_teams.yml (100%) rename {.github/tests => tests}/templates/vars/controller_users.yml (100%) rename {.github/tests => tests}/templates/vars/controller_vars.yml (100%) rename {.github/tests => tests}/templates/vars/controller_workflows.yml (100%) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 4a3e18601..cba376184 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -15,10 +15,10 @@ Python's pre-commit tool can be installed, and hooks installed, to cleanup white 1. Create a local virtual environment for controller_configurations (suggested, its your system!) 2. Use pip to install pre-commit in your environment of choice: `pip install pre-commit` -3. Install pre-commit hooks with `pre-commit install --install-hooks -c .github/workflow-config/.pre-commit-config.yml` +3. Install pre-commit hooks with `pre-commit install --install-hooks -c .pre-commit-config.yaml` 4. With hooks installed, they will be run automatically when you call `git commit`, blocking commit if any hooks fail. 5. [Optional] If you want to ignore hook failures and commit anyway, use `git commit -n` -6. [Optional] Run pre-commit checks at any time with `pre-commit run --all -c .github/workflow-config/.pre-commit-config.yml`. +6. [Optional] Run pre-commit checks at any time with `pre-commit run --all -c .pre-commit-config.yaml`. Please see pre-commit documentation for further explanation: [Pre-commit](https://pre-commit.com/) @@ -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/.github/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/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. 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/tests/collections/ansible_collections/redhat_cop/controller_configuration b/.github/tests/collections/ansible_collections/redhat_cop/controller_configuration deleted file mode 120000 index c866b8687..000000000 --- a/.github/tests/collections/ansible_collections/redhat_cop/controller_configuration +++ /dev/null @@ -1 +0,0 @@ -../../../.. \ No newline at end of file diff --git a/.github/workflows/ci_standalone_versioned.yml b/.github/workflows/ci_standalone_versioned.yml index 27b337c97..db5f369a4 100644 --- a/.github/workflows/ci_standalone_versioned.yml +++ b/.github/workflows/ci_standalone_versioned.yml @@ -63,8 +63,8 @@ jobs: run: ansible-galaxy collection install -r .github/collections/requirements.yml - name: "Perform playbook tests" - run: ansible-playbook .github/tests/configure_controller.yml -e controller_hostname=localhost:8043 -v + run: ansible-playbook tests/configure_controller.yml -e controller_hostname=localhost:8043 -v - name: "Perform export model playbook tests" - run: ansible-playbook .github/tests/configure_controller_export_model.yml -e controller_hostname=localhost:8043 -v + run: ansible-playbook tests/configure_controller_export_model.yml -e controller_hostname=localhost:8043 -v ... diff --git a/roles/filetree_create/automatetheautomation.md b/roles/filetree_create/automatetheautomation.md index 92e109dff..05c5c3914 100644 --- a/roles/filetree_create/automatetheautomation.md +++ b/roles/filetree_create/automatetheautomation.md @@ -21,7 +21,7 @@ Utilizing the Automation Webhook capabilities in Ansible Tower / Controller, you ## Automation Controller Workflow CasC -![Automation Controller Workflow CasC](https://github.com/redhat-cop/controller_configuration/blob/devel/.github/tests/automatetheautomation/pictures/AAP_CasC_Worflow.png) +![Automation Controller Workflow CasC](https://github.com/redhat-cop/controller_configuration/blob/devel/tests/automatetheautomation/pictures/AAP_CasC_Worflow.png) *Automation Controller Workflow CasC* The workflow will have the following steps: diff --git a/.github/tests/automatetheautomation/config-controller-filetree.yml b/tests/automatetheautomation/config-controller-filetree.yml similarity index 100% rename from .github/tests/automatetheautomation/config-controller-filetree.yml rename to tests/automatetheautomation/config-controller-filetree.yml diff --git a/.github/tests/automatetheautomation/drop_diff.yml b/tests/automatetheautomation/drop_diff.yml similarity index 100% rename from .github/tests/automatetheautomation/drop_diff.yml rename to tests/automatetheautomation/drop_diff.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_aap_monitor.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_aap_monitor.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_aap_monitor.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_aap_monitor.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_acme_key.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_acme_key.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_acme_key.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_acme_key.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_cloudforms.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_cloudforms.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_cloudforms.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_cloudforms.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_multiple.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_multiple.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_multiple.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_multiple.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_servicenow.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_servicenow.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_servicenow.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/app-example/controller_credential_types_servicenow.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/controller_credential_types.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/controller_credential_types.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/controller_credential_types.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_credential_types.d/controller_credential_types.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_groups.d/controller_groups.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_groups.d/controller_groups.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_groups.d/controller_groups.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_groups.d/controller_groups.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_instance_groups.d/app-example/controller_instance_groups_otlc.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_instance_groups.d/app-example/controller_instance_groups_otlc.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_instance_groups.d/app-example/controller_instance_groups_otlc.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_instance_groups.d/app-example/controller_instance_groups_otlc.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_instance_groups.d/controller_instance_groups.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_instance_groups.d/controller_instance_groups.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_instance_groups.d/controller_instance_groups.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_instance_groups.d/controller_instance_groups.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/app-casc/controller_inventories_localhost.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/app-casc/controller_inventories_localhost.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/app-casc/controller_inventories_localhost.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/app-casc/controller_inventories_localhost.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/app-example/controller_inventories_excel.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/app-example/controller_inventories_excel.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/app-example/controller_inventories_excel.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/app-example/controller_inventories_excel.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/app-example/controller_inventories_smart_org1.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/app-example/controller_inventories_smart_org1.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/app-example/controller_inventories_smart_org1.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/app-example/controller_inventories_smart_org1.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/app-example/controller_inventories_smart_org2.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/app-example/controller_inventories_smart_org2.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/app-example/controller_inventories_smart_org2.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/app-example/controller_inventories_smart_org2.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/controller_inventories.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/controller_inventories.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/controller_inventories.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_inventories.d/controller_inventories.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_job_templates.d/app-casc/controller_job_templates_casc.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_job_templates.d/app-casc/controller_job_templates_casc.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_job_templates.d/app-casc/controller_job_templates_casc.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_job_templates.d/app-casc/controller_job_templates_casc.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_job_templates.d/app-example/controller_job_templates_container_groups.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_job_templates.d/app-example/controller_job_templates_container_groups.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_job_templates.d/app-example/controller_job_templates_container_groups.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_job_templates.d/app-example/controller_job_templates_container_groups.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_job_templates.d/app-example/controller_job_templates_demo_push.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_job_templates.d/app-example/controller_job_templates_demo_push.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_job_templates.d/app-example/controller_job_templates_demo_push.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_job_templates.d/app-example/controller_job_templates_demo_push.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_job_templates.d/controller_job_templates.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_job_templates.d/controller_job_templates.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_job_templates.d/controller_job_templates.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_job_templates.d/controller_job_templates.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/app-casc/controller_organizations_Global.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/app-casc/controller_organizations_Global.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/app-casc/controller_organizations_Global.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/app-casc/controller_organizations_Global.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/app-example/controller_organizations_ExampleOrg.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/app-example/controller_organizations_ExampleOrg.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/app-example/controller_organizations_ExampleOrg.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/app-example/controller_organizations_ExampleOrg.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/app-example/controller_organizations_OrgCrossTeams.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/app-example/controller_organizations_OrgCrossTeams.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/app-example/controller_organizations_OrgCrossTeams.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/app-example/controller_organizations_OrgCrossTeams.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/app-example/controller_organizations_Organizations1-2.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/app-example/controller_organizations_Organizations1-2.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/app-example/controller_organizations_Organizations1-2.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/app-example/controller_organizations_Organizations1-2.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/controller_organizations.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/controller_organizations.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/controller_organizations.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_organizations.d/controller_organizations.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/app-casc/controller_projects_casc.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/app-casc/controller_projects_casc.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/app-casc/controller_projects_casc.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/app-casc/controller_projects_casc.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/app-ocp/controller_projects_container_groups.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/app-ocp/controller_projects_container_groups.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/app-ocp/controller_projects_container_groups.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/app-ocp/controller_projects_container_groups.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/controller_projects.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/controller_projects.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/controller_projects.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/controller_projects.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/inventories/controller_projects_inventory_sourcea_dev.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/inventories/controller_projects_inventory_sourcea_dev.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/inventories/controller_projects_inventory_sourcea_dev.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/inventories/controller_projects_inventory_sourcea_dev.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/inventories/controller_projects_inventory_sourcea_prod.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/inventories/controller_projects_inventory_sourcea_prod.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/inventories/controller_projects_inventory_sourcea_prod.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/inventories/controller_projects_inventory_sourcea_prod.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/inventories/controller_projects_inventory_sourceb_dev.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/inventories/controller_projects_inventory_sourceb_dev.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/inventories/controller_projects_inventory_sourceb_dev.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/inventories/controller_projects_inventory_sourceb_dev.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/inventories/controller_projects_inventory_sourceb_prod.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/inventories/controller_projects_inventory_sourceb_prod.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/inventories/controller_projects_inventory_sourceb_prod.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_projects.d/inventories/controller_projects_inventory_sourceb_prod.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_cmdb_approvals.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_cmdb_approvals.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_cmdb_approvals.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_cmdb_approvals.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_inventories.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_inventories.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_inventories.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_inventories.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_inventory_wf_update.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_inventory_wf_update.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_inventory_wf_update.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_inventory_wf_update.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_teams.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_teams.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_teams.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_teams.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_users.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_users.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_users.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/app-example/controller_roles_users.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/controller_roles.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/controller_roles.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/controller_roles.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_roles.d/controller_roles.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_schedules.d/app-casc/controller_schedules_casc.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_schedules.d/app-casc/controller_schedules_casc.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_schedules.d/app-casc/controller_schedules_casc.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_schedules.d/app-casc/controller_schedules_casc.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_schedules.d/app-example/controller_schedules_example.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_schedules.d/app-example/controller_schedules_example.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_schedules.d/app-example/controller_schedules_example.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_schedules.d/app-example/controller_schedules_example.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_schedules.d/controller_schedules.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_schedules.d/controller_schedules.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_schedules.d/controller_schedules.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_schedules.d/controller_schedules.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_teams.d/app-demo/controller_teams_org1.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_teams.d/app-demo/controller_teams_org1.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_teams.d/app-demo/controller_teams_org1.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_teams.d/app-demo/controller_teams_org1.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_teams.d/app-demo/controller_teams_org2.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_teams.d/app-demo/controller_teams_org2.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_teams.d/app-demo/controller_teams_org2.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_teams.d/app-demo/controller_teams_org2.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_teams.d/controller_teams.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_teams.d/controller_teams.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_teams.d/controller_teams.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_teams.d/controller_teams.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_workflow_job_templates.d/app-casc/controller_workflow_job_templates_casc.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_workflow_job_templates.d/app-casc/controller_workflow_job_templates_casc.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_workflow_job_templates.d/app-casc/controller_workflow_job_templates_casc.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_workflow_job_templates.d/app-casc/controller_workflow_job_templates_casc.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_workflow_job_templates.d/app-examples/controller_workflow_job_templates_InventoryUpdate.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_workflow_job_templates.d/app-examples/controller_workflow_job_templates_InventoryUpdate.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_workflow_job_templates.d/app-examples/controller_workflow_job_templates_InventoryUpdate.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_workflow_job_templates.d/app-examples/controller_workflow_job_templates_InventoryUpdate.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_workflow_job_templates.d/controller_workflow_job_templates.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_workflow_job_templates.d/controller_workflow_job_templates.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_workflow_job_templates.d/controller_workflow_job_templates.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/common/controller_workflow_job_templates.d/controller_workflow_job_templates.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_aap.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_aap.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_aap.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_aap.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_galaxy.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_galaxy.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_galaxy.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_galaxy.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_machine.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_machine.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_machine.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_machine.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_ocp.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_ocp.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_ocp.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_ocp.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_registry.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_registry.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_registry.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_registry.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_scm.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_scm.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_scm.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_scm.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_vault.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_vault.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_vault.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_credentials.d/app-examples/controller_credentials_vault.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_execution_environments.d/app-casc/controller_execution_environments_ee-casc.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_execution_environments.d/app-casc/controller_execution_environments_ee-casc.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_execution_environments.d/app-casc/controller_execution_environments_ee-casc.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_execution_environments.d/app-casc/controller_execution_environments_ee-casc.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_execution_environments.d/app-examples/controller_execution_environments_ee-xlsx.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_execution_environments.d/app-examples/controller_execution_environments_ee-xlsx.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_execution_environments.d/app-examples/controller_execution_environments_ee-xlsx.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_execution_environments.d/app-examples/controller_execution_environments_ee-xlsx.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_execution_environments.d/controller_execution_environments.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_execution_environments.d/controller_execution_environments.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_execution_environments.d/controller_execution_environments.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_execution_environments.d/controller_execution_environments.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_hosts.d/app-casc/controller_hosts_localhost.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_hosts.d/app-casc/controller_hosts_localhost.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_hosts.d/app-casc/controller_hosts_localhost.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_hosts.d/app-casc/controller_hosts_localhost.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_hosts.d/controller_hosts.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_hosts.d/controller_hosts.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_hosts.d/controller_hosts.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_hosts.d/controller_hosts.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourcea_dev.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourcea_dev.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourcea_dev.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourcea_dev.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourcea_prod.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourcea_prod.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourcea_prod.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourcea_prod.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourceb_dev.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourceb_dev.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourceb_dev.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourceb_dev.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourceb_prod.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourceb_prod.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourceb_prod.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourceb_prod.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/controller_inventory_sources.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/controller_inventory_sources.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/controller_inventory_sources.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_inventory_sources.d/controller_inventory_sources.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/app-examples/controller_settings_jobs.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/app-examples/controller_settings_jobs.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/app-examples/controller_settings_jobs.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/app-examples/controller_settings_jobs.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/app-examples/controller_settings_ldap.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/app-examples/controller_settings_ldap.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/app-examples/controller_settings_ldap.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/app-examples/controller_settings_ldap.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/app-examples/controller_settings_system.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/app-examples/controller_settings_system.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/app-examples/controller_settings_system.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/app-examples/controller_settings_system.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/app-examples/controller_settings_user_interface.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/app-examples/controller_settings_user_interface.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/app-examples/controller_settings_user_interface.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/app-examples/controller_settings_user_interface.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/controller_settings.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/controller_settings.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/controller_settings.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_settings.d/controller_settings.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_users.d/app-demo/controller_user_accounts_org1.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_users.d/app-demo/controller_user_accounts_org1.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_users.d/app-demo/controller_user_accounts_org1.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_users.d/app-demo/controller_user_accounts_org1.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_users.d/app-demo/controller_user_accounts_org2.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_users.d/app-demo/controller_user_accounts_org2.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_users.d/app-demo/controller_user_accounts_org2.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_users.d/app-demo/controller_user_accounts_org2.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_users.d/controller_user_accounts.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_users.d/controller_user_accounts.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_users.d/controller_user_accounts.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/dev/controller_users.d/controller_user_accounts.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_aap.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_aap.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_aap.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_aap.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_galaxy.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_galaxy.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_galaxy.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_galaxy.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_machine.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_machine.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_machine.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_machine.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_ocp.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_ocp.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_ocp.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_ocp.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_registry.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_registry.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_registry.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_registry.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_scm.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_scm.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_scm.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_scm.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_vault.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_vault.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_vault.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_credentials.d/app-examples/controller_credentials_vault.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_execution_environments.d/app-casc/controller_execution_environments_ee-casc.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_execution_environments.d/app-casc/controller_execution_environments_ee-casc.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_execution_environments.d/app-casc/controller_execution_environments_ee-casc.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_execution_environments.d/app-casc/controller_execution_environments_ee-casc.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_execution_environments.d/app-examples/controller_execution_environments_ee-xlsx.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_execution_environments.d/app-examples/controller_execution_environments_ee-xlsx.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_execution_environments.d/app-examples/controller_execution_environments_ee-xlsx.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_execution_environments.d/app-examples/controller_execution_environments_ee-xlsx.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_execution_environments.d/controller_execution_environments.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_execution_environments.d/controller_execution_environments.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_execution_environments.d/controller_execution_environments.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_execution_environments.d/controller_execution_environments.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_hosts.d/controller_hosts.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_hosts.d/controller_hosts.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_hosts.d/controller_hosts.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_hosts.d/controller_hosts.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourcea_dev.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourcea_dev.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourcea_dev.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourcea_dev.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourcea_prod.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourcea_prod.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourcea_prod.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourcea_prod.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourceb_dev.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourceb_dev.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourceb_dev.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourceb_dev.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourceb_prod.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourceb_prod.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourceb_prod.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/app-examples/controller_inventory_sources_sourceb_prod.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/controller_inventory_sources.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/controller_inventory_sources.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/controller_inventory_sources.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_inventory_sources.d/controller_inventory_sources.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples/controller_settings_jobs.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples/controller_settings_jobs.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples/controller_settings_jobs.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples/controller_settings_jobs.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples/controller_settings_ldap.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples/controller_settings_ldap.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples/controller_settings_ldap.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples/controller_settings_ldap.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples/controller_settings_system.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples/controller_settings_system.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples/controller_settings_system.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples/controller_settings_system.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples/controller_settings_user_interface.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples/controller_settings_user_interface.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples/controller_settings_user_interface.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/app-examples/controller_settings_user_interface.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/controller_settings.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/controller_settings.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/controller_settings.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_settings.d/controller_settings.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_users.d/app-demo/controller_user_accounts_org1.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_users.d/app-demo/controller_user_accounts_org1.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_users.d/app-demo/controller_user_accounts_org1.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_users.d/app-demo/controller_user_accounts_org1.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_users.d/app-demo/controller_user_accounts_org2.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_users.d/app-demo/controller_user_accounts_org2.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_users.d/app-demo/controller_user_accounts_org2.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_users.d/app-demo/controller_user_accounts_org2.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_users.d/controller_user_accounts.yml b/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_users.d/controller_user_accounts.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_users.d/controller_user_accounts.yml rename to tests/automatetheautomation/orgs_vars/ExampleOrg/env/prod/controller_users.d/controller_user_accounts.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/env/dev/configure_connection_controller_credentials.yml b/tests/automatetheautomation/orgs_vars/env/dev/configure_connection_controller_credentials.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/env/dev/configure_connection_controller_credentials.yml rename to tests/automatetheautomation/orgs_vars/env/dev/configure_connection_controller_credentials.yml diff --git a/.github/tests/automatetheautomation/orgs_vars/env/prod/configure_connection_controller_credentials.yml b/tests/automatetheautomation/orgs_vars/env/prod/configure_connection_controller_credentials.yml similarity index 100% rename from .github/tests/automatetheautomation/orgs_vars/env/prod/configure_connection_controller_credentials.yml rename to tests/automatetheautomation/orgs_vars/env/prod/configure_connection_controller_credentials.yml diff --git a/.github/tests/automatetheautomation/pictures/AAP_CasC_Worflow.png b/tests/automatetheautomation/pictures/AAP_CasC_Worflow.png similarity index 100% rename from .github/tests/automatetheautomation/pictures/AAP_CasC_Worflow.png rename to tests/automatetheautomation/pictures/AAP_CasC_Worflow.png diff --git a/.github/tests/configs/ad_hoc_command_cancel_defaults.yml b/tests/configs/ad_hoc_command_cancel_defaults.yml similarity index 100% rename from .github/tests/configs/ad_hoc_command_cancel_defaults.yml rename to tests/configs/ad_hoc_command_cancel_defaults.yml diff --git a/.github/tests/configs/ad_hoc_commands.yml b/tests/configs/ad_hoc_commands.yml similarity index 100% rename from .github/tests/configs/ad_hoc_commands.yml rename to tests/configs/ad_hoc_commands.yml diff --git a/.github/tests/configs/applications.yml b/tests/configs/applications.yml similarity index 100% rename from .github/tests/configs/applications.yml rename to tests/configs/applications.yml diff --git a/.github/tests/configs/controller_auth.yml b/tests/configs/controller_auth.yml similarity index 100% rename from .github/tests/configs/controller_auth.yml rename to tests/configs/controller_auth.yml diff --git a/.github/tests/configs/credential_input_sources.yml b/tests/configs/credential_input_sources.yml similarity index 100% rename from .github/tests/configs/credential_input_sources.yml rename to tests/configs/credential_input_sources.yml diff --git a/.github/tests/configs/credential_types.yml b/tests/configs/credential_types.yml similarity index 100% rename from .github/tests/configs/credential_types.yml rename to tests/configs/credential_types.yml diff --git a/.github/tests/configs/credentials.yml b/tests/configs/credentials.yml similarity index 100% rename from .github/tests/configs/credentials.yml rename to tests/configs/credentials.yml diff --git a/.github/tests/configs/differential_items.yml b/tests/configs/differential_items.yml similarity index 100% rename from .github/tests/configs/differential_items.yml rename to tests/configs/differential_items.yml diff --git a/.github/tests/configs/execution_environments.yml b/tests/configs/execution_environments.yml similarity index 100% rename from .github/tests/configs/execution_environments.yml rename to tests/configs/execution_environments.yml diff --git a/.github/tests/configs/groups.yml b/tests/configs/groups.yml similarity index 100% rename from .github/tests/configs/groups.yml rename to tests/configs/groups.yml diff --git a/.github/tests/configs/hosts.yml b/tests/configs/hosts.yml similarity index 100% rename from .github/tests/configs/hosts.yml rename to tests/configs/hosts.yml diff --git a/.github/tests/configs/instance_groups.yml b/tests/configs/instance_groups.yml similarity index 100% rename from .github/tests/configs/instance_groups.yml rename to tests/configs/instance_groups.yml diff --git a/.github/tests/configs/instances.yml b/tests/configs/instances.yml similarity index 100% rename from .github/tests/configs/instances.yml rename to tests/configs/instances.yml diff --git a/.github/tests/configs/inventories.yml b/tests/configs/inventories.yml similarity index 100% rename from .github/tests/configs/inventories.yml rename to tests/configs/inventories.yml diff --git a/.github/tests/configs/inventory_sources.yml b/tests/configs/inventory_sources.yml similarity index 100% rename from .github/tests/configs/inventory_sources.yml rename to tests/configs/inventory_sources.yml diff --git a/.github/tests/configs/labels.yml b/tests/configs/labels.yml similarity index 100% rename from .github/tests/configs/labels.yml rename to tests/configs/labels.yml diff --git a/.github/tests/configs/launch_jobs.yml b/tests/configs/launch_jobs.yml similarity index 100% rename from .github/tests/configs/launch_jobs.yml rename to tests/configs/launch_jobs.yml diff --git a/.github/tests/configs/notifications.yml b/tests/configs/notifications.yml similarity index 100% rename from .github/tests/configs/notifications.yml rename to tests/configs/notifications.yml diff --git a/.github/tests/configs/organizations.yml b/tests/configs/organizations.yml similarity index 100% rename from .github/tests/configs/organizations.yml rename to tests/configs/organizations.yml diff --git a/.github/tests/configs/projects.yml b/tests/configs/projects.yml similarity index 100% rename from .github/tests/configs/projects.yml rename to tests/configs/projects.yml diff --git a/.github/tests/configs/roles.yml b/tests/configs/roles.yml similarity index 100% rename from .github/tests/configs/roles.yml rename to tests/configs/roles.yml diff --git a/.github/tests/configs/schedule.yml b/tests/configs/schedule.yml similarity index 100% rename from .github/tests/configs/schedule.yml rename to tests/configs/schedule.yml diff --git a/.github/tests/configs/settings.yml b/tests/configs/settings.yml similarity index 100% rename from .github/tests/configs/settings.yml rename to tests/configs/settings.yml diff --git a/.github/tests/configs/settings_individuale.yml b/tests/configs/settings_individuale.yml similarity index 100% rename from .github/tests/configs/settings_individuale.yml rename to tests/configs/settings_individuale.yml diff --git a/.github/tests/configs/ssh_private_key.yml b/tests/configs/ssh_private_key.yml similarity index 100% rename from .github/tests/configs/ssh_private_key.yml rename to tests/configs/ssh_private_key.yml diff --git a/.github/tests/configs/teams.yml b/tests/configs/teams.yml similarity index 100% rename from .github/tests/configs/teams.yml rename to tests/configs/teams.yml diff --git a/.github/tests/configs/templates.yml b/tests/configs/templates.yml similarity index 100% rename from .github/tests/configs/templates.yml rename to tests/configs/templates.yml diff --git a/.github/tests/configs/user_accounts.yml b/tests/configs/user_accounts.yml similarity index 100% rename from .github/tests/configs/user_accounts.yml rename to tests/configs/user_accounts.yml diff --git a/.github/tests/configs/workflows.yml b/tests/configs/workflows.yml similarity index 100% rename from .github/tests/configs/workflows.yml rename to tests/configs/workflows.yml diff --git a/.github/tests/configs/workfows_launch.yml b/tests/configs/workfows_launch.yml similarity index 100% rename from .github/tests/configs/workfows_launch.yml rename to tests/configs/workfows_launch.yml diff --git a/.github/tests/configs_export_model/auth.yml b/tests/configs_export_model/auth.yml similarity index 100% rename from .github/tests/configs_export_model/auth.yml rename to tests/configs_export_model/auth.yml diff --git a/.github/tests/configs_export_model/credential_types_export.yml b/tests/configs_export_model/credential_types_export.yml similarity index 100% rename from .github/tests/configs_export_model/credential_types_export.yml rename to tests/configs_export_model/credential_types_export.yml diff --git a/.github/tests/configs_export_model/credentials_export.yml b/tests/configs_export_model/credentials_export.yml similarity index 100% rename from .github/tests/configs_export_model/credentials_export.yml rename to tests/configs_export_model/credentials_export.yml diff --git a/.github/tests/configs_export_model/inventory_export.yml b/tests/configs_export_model/inventory_export.yml similarity index 100% rename from .github/tests/configs_export_model/inventory_export.yml rename to tests/configs_export_model/inventory_export.yml diff --git a/.github/tests/configs_export_model/inventory_sources_export.yml b/tests/configs_export_model/inventory_sources_export.yml similarity index 100% rename from .github/tests/configs_export_model/inventory_sources_export.yml rename to tests/configs_export_model/inventory_sources_export.yml diff --git a/.github/tests/configs_export_model/job_templates_export.yml b/tests/configs_export_model/job_templates_export.yml similarity index 100% rename from .github/tests/configs_export_model/job_templates_export.yml rename to tests/configs_export_model/job_templates_export.yml diff --git a/.github/tests/configs_export_model/notifications_templates_export.yml b/tests/configs_export_model/notifications_templates_export.yml similarity index 100% rename from .github/tests/configs_export_model/notifications_templates_export.yml rename to tests/configs_export_model/notifications_templates_export.yml diff --git a/.github/tests/configs_export_model/organizations_export.yml b/tests/configs_export_model/organizations_export.yml similarity index 100% rename from .github/tests/configs_export_model/organizations_export.yml rename to tests/configs_export_model/organizations_export.yml diff --git a/.github/tests/configs_export_model/projects_export.yml b/tests/configs_export_model/projects_export.yml similarity index 100% rename from .github/tests/configs_export_model/projects_export.yml rename to tests/configs_export_model/projects_export.yml diff --git a/.github/tests/configs_export_model/teams_export.yml b/tests/configs_export_model/teams_export.yml similarity index 100% rename from .github/tests/configs_export_model/teams_export.yml rename to tests/configs_export_model/teams_export.yml diff --git a/.github/tests/configs_export_model/users_export.yml b/tests/configs_export_model/users_export.yml similarity index 100% rename from .github/tests/configs_export_model/users_export.yml rename to tests/configs_export_model/users_export.yml diff --git a/.github/tests/configs_export_model/workflows.yml b/tests/configs_export_model/workflows.yml similarity index 100% rename from .github/tests/configs_export_model/workflows.yml rename to tests/configs_export_model/workflows.yml diff --git a/.github/tests/configure_controller.yml b/tests/configure_controller.yml similarity index 99% rename from .github/tests/configure_controller.yml rename to tests/configure_controller.yml index b5ee4fec7..efd00eea6 100644 --- a/.github/tests/configure_controller.yml +++ b/tests/configure_controller.yml @@ -58,7 +58,7 @@ ignore_errors: true - name: Wait for the controller node to be up - uri: + ansible.builtin.uri: url: "https://{{ controller_hostname }}/api/v2/mesh_visualizer/" user: "{{ controller_username }}" password: "{{ controller_password }}" diff --git a/.github/tests/configure_controller_export_model.yml b/tests/configure_controller_export_model.yml similarity index 99% rename from .github/tests/configure_controller_export_model.yml rename to tests/configure_controller_export_model.yml index f33bdcac7..ce881e141 100644 --- a/.github/tests/configure_controller_export_model.yml +++ b/tests/configure_controller_export_model.yml @@ -44,7 +44,7 @@ extensions: ["yml"] - name: Wait for the controller to be up - uri: + ansible.builtin.uri: url: "https://{{ controller_hostname }}/api/v2/mesh_visualizer/" user: "{{ controller_username }}" password: "{{ controller_password }}" @@ -59,7 +59,6 @@ delay: 5 - roles: - {role: organizations, when: controller_organizations is defined, tags: organizations} - {role: users, when: controller_user_accounts is defined, tags: users} diff --git a/.github/tests/playbooks/README.md b/tests/playbooks/README.md similarity index 100% rename from .github/tests/playbooks/README.md rename to tests/playbooks/README.md diff --git a/.github/tests/playbooks/cd_gitlab_webhook_trigger.yml b/tests/playbooks/cd_gitlab_webhook_trigger.yml similarity index 100% rename from .github/tests/playbooks/cd_gitlab_webhook_trigger.yml rename to tests/playbooks/cd_gitlab_webhook_trigger.yml diff --git a/.github/tests/playbooks/configure_awx.yml b/tests/playbooks/configure_awx.yml similarity index 100% rename from .github/tests/playbooks/configure_awx.yml rename to tests/playbooks/configure_awx.yml diff --git a/.github/tests/playbooks/configure_controller.yml b/tests/playbooks/configure_controller.yml similarity index 100% rename from .github/tests/playbooks/configure_controller.yml rename to tests/playbooks/configure_controller.yml diff --git a/.github/tests/playbooks/tasks/ad_hoc_cancel.yml b/tests/playbooks/tasks/ad_hoc_cancel.yml similarity index 100% rename from .github/tests/playbooks/tasks/ad_hoc_cancel.yml rename to tests/playbooks/tasks/ad_hoc_cancel.yml diff --git a/.github/tests/tasks/ad_hoc_cancel.yml b/tests/tasks/ad_hoc_cancel.yml similarity index 100% rename from .github/tests/tasks/ad_hoc_cancel.yml rename to tests/tasks/ad_hoc_cancel.yml diff --git a/.github/tests/tasks/differential.yml b/tests/tasks/differential.yml similarity index 100% rename from .github/tests/tasks/differential.yml rename to tests/tasks/differential.yml diff --git a/.github/tests/templates/README.md b/tests/templates/README.md similarity index 100% rename from .github/tests/templates/README.md rename to tests/templates/README.md diff --git a/.github/tests/templates/collections/requirements.yml b/tests/templates/collections/requirements.yml similarity index 100% rename from .github/tests/templates/collections/requirements.yml rename to tests/templates/collections/requirements.yml diff --git a/.github/tests/templates/controller_config.yml b/tests/templates/controller_config.yml similarity index 100% rename from .github/tests/templates/controller_config.yml rename to tests/templates/controller_config.yml diff --git a/.github/tests/templates/tasks/manage_controller_settings.yml b/tests/templates/tasks/manage_controller_settings.yml similarity index 100% rename from .github/tests/templates/tasks/manage_controller_settings.yml rename to tests/templates/tasks/manage_controller_settings.yml diff --git a/.github/tests/templates/tasks/manage_credential_types.yml b/tests/templates/tasks/manage_credential_types.yml similarity index 100% rename from .github/tests/templates/tasks/manage_credential_types.yml rename to tests/templates/tasks/manage_credential_types.yml diff --git a/.github/tests/templates/tasks/manage_credentials.yml b/tests/templates/tasks/manage_credentials.yml similarity index 100% rename from .github/tests/templates/tasks/manage_credentials.yml rename to tests/templates/tasks/manage_credentials.yml diff --git a/.github/tests/templates/tasks/manage_execution_environments.yml b/tests/templates/tasks/manage_execution_environments.yml similarity index 100% rename from .github/tests/templates/tasks/manage_execution_environments.yml rename to tests/templates/tasks/manage_execution_environments.yml diff --git a/.github/tests/templates/tasks/manage_groups.yml b/tests/templates/tasks/manage_groups.yml similarity index 100% rename from .github/tests/templates/tasks/manage_groups.yml rename to tests/templates/tasks/manage_groups.yml diff --git a/.github/tests/templates/tasks/manage_hosts.yml b/tests/templates/tasks/manage_hosts.yml similarity index 100% rename from .github/tests/templates/tasks/manage_hosts.yml rename to tests/templates/tasks/manage_hosts.yml diff --git a/.github/tests/templates/tasks/manage_instance_groups.yml b/tests/templates/tasks/manage_instance_groups.yml similarity index 100% rename from .github/tests/templates/tasks/manage_instance_groups.yml rename to tests/templates/tasks/manage_instance_groups.yml diff --git a/.github/tests/templates/tasks/manage_inventories.yml b/tests/templates/tasks/manage_inventories.yml similarity index 100% rename from .github/tests/templates/tasks/manage_inventories.yml rename to tests/templates/tasks/manage_inventories.yml diff --git a/.github/tests/templates/tasks/manage_inventory_sources.yml b/tests/templates/tasks/manage_inventory_sources.yml similarity index 100% rename from .github/tests/templates/tasks/manage_inventory_sources.yml rename to tests/templates/tasks/manage_inventory_sources.yml diff --git a/.github/tests/templates/tasks/manage_job_templates.yml b/tests/templates/tasks/manage_job_templates.yml similarity index 100% rename from .github/tests/templates/tasks/manage_job_templates.yml rename to tests/templates/tasks/manage_job_templates.yml diff --git a/.github/tests/templates/tasks/manage_labels.yml b/tests/templates/tasks/manage_labels.yml similarity index 100% rename from .github/tests/templates/tasks/manage_labels.yml rename to tests/templates/tasks/manage_labels.yml diff --git a/.github/tests/templates/tasks/manage_notification_templates.yml b/tests/templates/tasks/manage_notification_templates.yml similarity index 100% rename from .github/tests/templates/tasks/manage_notification_templates.yml rename to tests/templates/tasks/manage_notification_templates.yml diff --git a/.github/tests/templates/tasks/manage_organizations.yml b/tests/templates/tasks/manage_organizations.yml similarity index 100% rename from .github/tests/templates/tasks/manage_organizations.yml rename to tests/templates/tasks/manage_organizations.yml diff --git a/.github/tests/templates/tasks/manage_projects.yml b/tests/templates/tasks/manage_projects.yml similarity index 100% rename from .github/tests/templates/tasks/manage_projects.yml rename to tests/templates/tasks/manage_projects.yml diff --git a/.github/tests/templates/tasks/manage_roles.yml b/tests/templates/tasks/manage_roles.yml similarity index 100% rename from .github/tests/templates/tasks/manage_roles.yml rename to tests/templates/tasks/manage_roles.yml diff --git a/.github/tests/templates/tasks/manage_schedules.yml b/tests/templates/tasks/manage_schedules.yml similarity index 100% rename from .github/tests/templates/tasks/manage_schedules.yml rename to tests/templates/tasks/manage_schedules.yml diff --git a/.github/tests/templates/tasks/manage_teams.yml b/tests/templates/tasks/manage_teams.yml similarity index 100% rename from .github/tests/templates/tasks/manage_teams.yml rename to tests/templates/tasks/manage_teams.yml diff --git a/.github/tests/templates/tasks/manage_users.yml b/tests/templates/tasks/manage_users.yml similarity index 100% rename from .github/tests/templates/tasks/manage_users.yml rename to tests/templates/tasks/manage_users.yml diff --git a/.github/tests/templates/tasks/manage_workflow_templates.yml b/tests/templates/tasks/manage_workflow_templates.yml similarity index 100% rename from .github/tests/templates/tasks/manage_workflow_templates.yml rename to tests/templates/tasks/manage_workflow_templates.yml diff --git a/.github/tests/templates/vars/controller_credential_types.yml b/tests/templates/vars/controller_credential_types.yml similarity index 100% rename from .github/tests/templates/vars/controller_credential_types.yml rename to tests/templates/vars/controller_credential_types.yml diff --git a/.github/tests/templates/vars/controller_credentials.yml b/tests/templates/vars/controller_credentials.yml similarity index 100% rename from .github/tests/templates/vars/controller_credentials.yml rename to tests/templates/vars/controller_credentials.yml diff --git a/.github/tests/templates/vars/controller_execution_environments.yml b/tests/templates/vars/controller_execution_environments.yml similarity index 100% rename from .github/tests/templates/vars/controller_execution_environments.yml rename to tests/templates/vars/controller_execution_environments.yml diff --git a/.github/tests/templates/vars/controller_groups.yml b/tests/templates/vars/controller_groups.yml similarity index 100% rename from .github/tests/templates/vars/controller_groups.yml rename to tests/templates/vars/controller_groups.yml diff --git a/.github/tests/templates/vars/controller_hosts.yml b/tests/templates/vars/controller_hosts.yml similarity index 100% rename from .github/tests/templates/vars/controller_hosts.yml rename to tests/templates/vars/controller_hosts.yml diff --git a/.github/tests/templates/vars/controller_instance_groups.yml b/tests/templates/vars/controller_instance_groups.yml similarity index 100% rename from .github/tests/templates/vars/controller_instance_groups.yml rename to tests/templates/vars/controller_instance_groups.yml diff --git a/.github/tests/templates/vars/controller_inventories.yml b/tests/templates/vars/controller_inventories.yml similarity index 100% rename from .github/tests/templates/vars/controller_inventories.yml rename to tests/templates/vars/controller_inventories.yml diff --git a/.github/tests/templates/vars/controller_inventory_sources.yml b/tests/templates/vars/controller_inventory_sources.yml similarity index 100% rename from .github/tests/templates/vars/controller_inventory_sources.yml rename to tests/templates/vars/controller_inventory_sources.yml diff --git a/.github/tests/templates/vars/controller_job_templates.yml b/tests/templates/vars/controller_job_templates.yml similarity index 100% rename from .github/tests/templates/vars/controller_job_templates.yml rename to tests/templates/vars/controller_job_templates.yml diff --git a/.github/tests/templates/vars/controller_labels.yml b/tests/templates/vars/controller_labels.yml similarity index 100% rename from .github/tests/templates/vars/controller_labels.yml rename to tests/templates/vars/controller_labels.yml diff --git a/.github/tests/templates/vars/controller_ldap_configuration.json b/tests/templates/vars/controller_ldap_configuration.json similarity index 100% rename from .github/tests/templates/vars/controller_ldap_configuration.json rename to tests/templates/vars/controller_ldap_configuration.json diff --git a/.github/tests/templates/vars/controller_notification_templates.yml b/tests/templates/vars/controller_notification_templates.yml similarity index 100% rename from .github/tests/templates/vars/controller_notification_templates.yml rename to tests/templates/vars/controller_notification_templates.yml diff --git a/.github/tests/templates/vars/controller_organizations.yml b/tests/templates/vars/controller_organizations.yml similarity index 100% rename from .github/tests/templates/vars/controller_organizations.yml rename to tests/templates/vars/controller_organizations.yml diff --git a/.github/tests/templates/vars/controller_organizations_with_hub.yml b/tests/templates/vars/controller_organizations_with_hub.yml similarity index 100% rename from .github/tests/templates/vars/controller_organizations_with_hub.yml rename to tests/templates/vars/controller_organizations_with_hub.yml diff --git a/.github/tests/templates/vars/controller_projects.yml b/tests/templates/vars/controller_projects.yml similarity index 100% rename from .github/tests/templates/vars/controller_projects.yml rename to tests/templates/vars/controller_projects.yml diff --git a/.github/tests/templates/vars/controller_roles.yml b/tests/templates/vars/controller_roles.yml similarity index 100% rename from .github/tests/templates/vars/controller_roles.yml rename to tests/templates/vars/controller_roles.yml diff --git a/.github/tests/templates/vars/controller_schedules.yml b/tests/templates/vars/controller_schedules.yml similarity index 100% rename from .github/tests/templates/vars/controller_schedules.yml rename to tests/templates/vars/controller_schedules.yml diff --git a/.github/tests/templates/vars/controller_teams.yml b/tests/templates/vars/controller_teams.yml similarity index 100% rename from .github/tests/templates/vars/controller_teams.yml rename to tests/templates/vars/controller_teams.yml diff --git a/.github/tests/templates/vars/controller_users.yml b/tests/templates/vars/controller_users.yml similarity index 100% rename from .github/tests/templates/vars/controller_users.yml rename to tests/templates/vars/controller_users.yml diff --git a/.github/tests/templates/vars/controller_vars.yml b/tests/templates/vars/controller_vars.yml similarity index 100% rename from .github/tests/templates/vars/controller_vars.yml rename to tests/templates/vars/controller_vars.yml diff --git a/.github/tests/templates/vars/controller_workflows.yml b/tests/templates/vars/controller_workflows.yml similarity index 100% rename from .github/tests/templates/vars/controller_workflows.yml rename to tests/templates/vars/controller_workflows.yml From 040c17c77b840b0b66daa9a673a830249b9e0ff4 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Fri, 24 Mar 2023 02:57:43 +0000 Subject: [PATCH 91/94] Fix arg spec failure (#551) * Fix arg spec failure * add changelog * fix broken link --- changelogs/fragments/arg_spec.yml | 1 + roles/filetree_read/meta/argument_specs.yml | 2 -- tests/playbooks/README.md | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/changelogs/fragments/arg_spec.yml b/changelogs/fragments/arg_spec.yml index 39b7d144b..702d320fd 100644 --- a/changelogs/fragments/arg_spec.yml +++ b/changelogs/fragments/arg_spec.yml @@ -3,4 +3,5 @@ bugfixes: - Removed master_role_example as no longer required (this wasn't a functional role) - Added argument_spec for all roles - Fixed variable definitions in readmes + - Fixed issue in filetree_read where arg spec incorrect and caused failure (#550) ... diff --git a/roles/filetree_read/meta/argument_specs.yml b/roles/filetree_read/meta/argument_specs.yml index bc3a17a0d..3f155ee88 100644 --- a/roles/filetree_read/meta/argument_specs.yml +++ b/roles/filetree_read/meta/argument_specs.yml @@ -5,12 +5,10 @@ argument_specs: options: orgs: type: str - default: Acme required: true description: This variable sets the organization where should be applied the configuration. dir_orgs_vars: type: str - default: orgs_vars required: true description: This variable sets the directory path where the variables will be store. env: diff --git a/tests/playbooks/README.md b/tests/playbooks/README.md index f94a0d8f6..31de12208 100644 --- a/tests/playbooks/README.md +++ b/tests/playbooks/README.md @@ -126,7 +126,7 @@ 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/.github/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/controller_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. From dafe20eb9e6e2e9f156e5d59a89929ae17fe0e1e Mon Sep 17 00:00:00 2001 From: Tom Page Date: Fri, 24 Mar 2023 13:04:45 +0000 Subject: [PATCH 92/94] Up delay on projects async to prevent failures (#553) --- tests/configs/projects.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/configs/projects.yml b/tests/configs/projects.yml index 7a6e6418c..287c551b2 100644 --- a/tests/configs/projects.yml +++ b/tests/configs/projects.yml @@ -1,6 +1,6 @@ --- controller_configuration_projects_async_retries: 60 -controller_configuration_projects_async_delay: 3 +controller_configuration_projects_async_delay: 5 controller_projects: - name: Test Project scm_type: git From 9096f21fb8465f780688a01bebbea47abaeb2cd3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 24 Mar 2023 14:27:39 +0000 Subject: [PATCH 93/94] [RELEASE] Update changelog refs/tags/2.3.1 (#554) * Update changelog refs/tags/2.3.1 * Update changelog.yaml * Update CHANGELOG.rst --------- Co-authored-by: Tompage1994 Co-authored-by: Tom Page --- CHANGELOG.rst | 41 ++++- changelogs/.plugin-cache.yaml | 146 +++++++++++++++++- changelogs/changelog.yaml | 41 +++++ changelogs/fragments/arg_spec.yml | 7 - .../dispatch_creds_ee_orgs_creation.yml | 6 - changelogs/fragments/dispatch_fix.yml | 4 - changelogs/fragments/filetree_read.yml | 4 - changelogs/fragments/fixing_readme.yaml | 2 - changelogs/fragments/i_s_u_title.yml | 4 - .../fragments/object_diff_role_and_plugin.yml | 5 - .../fragments/redhat_to_infra_conversion.yml | 6 - 11 files changed, 224 insertions(+), 42 deletions(-) delete mode 100644 changelogs/fragments/arg_spec.yml delete mode 100644 changelogs/fragments/dispatch_creds_ee_orgs_creation.yml delete mode 100644 changelogs/fragments/dispatch_fix.yml delete mode 100644 changelogs/fragments/filetree_read.yml delete mode 100644 changelogs/fragments/fixing_readme.yaml delete mode 100644 changelogs/fragments/i_s_u_title.yml delete mode 100644 changelogs/fragments/object_diff_role_and_plugin.yml delete mode 100644 changelogs/fragments/redhat_to_infra_conversion.yml diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 380dc3fb8..85ada7f19 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,10 +1,47 @@ -================================================= +============================================ infra.controller_configuration Release Notes -================================================= +============================================ .. contents:: Topics +v2.3.1 +====== + +Bugfixes +-------- + +- Ensures vars get loaded properly by dispatch role +- Fixed issue in filetree_read where arg spec incorrect and caused failure (#550) + +v2.3.0 +====== + +Minor Changes +------------- + +- Adapt filetree_read role tests playbook config-controller-filetree.yml. +- Add new type of objects for object_diff role: applications, execution environments, instance groups, notifications and schedules +- Add no_log to all tasks that populates data to avoid exposing encrypted data +- Add task to add Galaxy credentials and Execution Environments to Organization. +- Set the variables to assign_galaxy_credentials_to_org and assign_default_ee_to_org to false in the task to run all roles at dispatch role. +- avoid to create orgs during drop_diff +- fixed an extra blank line in schedules readme that was breaking the table +- removed references to redhat_cop as a collection namespace in the readme files. + +Breaking Changes / Porting Guide +-------------------------------- + +- updated object_diff role to use the infra namespace, that means to use the role it requires the infra version of the collection. Previous version required the redhat_cop + +Bugfixes +-------- + +- Added argument_spec for all roles +- Fixed name of task for inventory source update +- Fixed variable definitions in readmes +- Removed master_role_example as no longer required (this wasn't a functional role) + v2.2.5 ====== diff --git a/changelogs/.plugin-cache.yaml b/changelogs/.plugin-cache.yaml index 991ebd90d..7b116cc24 100644 --- a/changelogs/.plugin-cache.yaml +++ b/changelogs/.plugin-cache.yaml @@ -1,5 +1,147 @@ objects: - role: {} + role: + ad_hoc_command: + description: An Ansible Role to run a list of ad hoc commands on Ansible Controller. + name: ad_hoc_command + version_added: null + ad_hoc_command_cancel: + description: An Ansible Role to cancel a list of ad hoc commands on Ansible + Controller. + name: ad_hoc_command_cancel + version_added: null + applications: + description: An Ansible Role to create Applications on Ansible Controller. + name: applications + version_added: null + credential_input_sources: + description: An Ansible Role to create Credential Input Sources on Ansible Controller. + name: credential_input_sources + version_added: null + credential_types: + description: An Ansible Role to create credential types on Ansible Controller. + name: credential_types + version_added: null + credentials: + description: An Ansible Role to create credentials on Ansible Controller. + name: credentials + version_added: null + dispatch: + description: An Ansible Role to call other roles to create objects on Ansible + Controller. + name: dispatch + version_added: null + execution_environments: + description: An Ansible Role to create execution environment objects on Ansible + Controller. + name: execution_environments + version_added: null + filetree_create: + description: An Ansible Role to create a local file tree of objects existing + in Controller + name: filetree_create + version_added: null + filetree_read: + description: An Ansible Role to read from a local file tree and create objects + in Controller + name: filetree_read + version_added: null + groups: + description: An Ansible Role to create groups on Ansible Controller. + name: groups + version_added: null + hosts: + description: An Ansible Role to create hosts on Ansible Controller. + name: hosts + version_added: null + instance_groups: + description: An Ansible Role to create instance groups on Ansible Controller. + name: instance_groups + version_added: null + instances: + description: An Ansible Role to create instances on Ansible Controller. + name: instances + version_added: null + inventories: + description: An Ansible Role to create inventories on Ansible Controller. + name: inventories + version_added: null + inventory_source_update: + description: An Ansible Role to update inventory sources on Ansible Controller. + name: inventory_source_update + version_added: null + inventory_sources: + description: An Ansible Role to create inventory sources on Ansible Controller. + name: inventory_sources + version_added: null + job_launch: + description: An Ansible Role to launch jobs on Ansible Controller. + name: job_launch + version_added: null + job_templates: + description: An Ansible Role to create job templates on Ansible Controller. + name: job_templates + version_added: null + jobs_cancel: + description: An Ansible Role to cancel a list of jobs on Ansible Controller. + name: jobs_cancel + version_added: null + labels: + description: An Ansible Role to create labels on Ansible Controller. + name: labels + version_added: null + license: + description: An Ansible Role to deploy a license on Ansible Controller. + name: license + version_added: null + notification_templates: + description: An Ansible Role to create notification templates on Ansible Controller. + name: notification_templates + version_added: null + object_diff: + description: An Ansible Role to read from a local file tree and create objects + in Controller + name: object_diff + version_added: null + organizations: + description: An Ansible Role to create organizations on Ansible Controller. + name: organizations + version_added: null + project_update: + description: An Ansible Role to update projects on Ansible Controller. + name: project_update + version_added: null + projects: + description: An Ansible Role to create projects on Ansible Controller. + name: projects + version_added: null + roles: + description: An Ansible Role to create roles on Ansible Controller. + name: roles + version_added: null + schedules: + description: An Ansible Role to create schedules on Ansible Controller. + name: schedules + version_added: null + settings: + description: An Ansible Role to create settings on Ansible Controller. + name: settings + version_added: null + teams: + description: An Ansible Role to create teams on Ansible Controller. + name: teams + version_added: null + users: + description: An Ansible Role to create users on Ansible Controller. + name: users + version_added: null + workflow_job_templates: + description: An Ansible Role to create workflow job templates on Ansible Controller. + name: workflow_job_templates + version_added: null + workflow_launch: + description: An Ansible Role to launch workflows on Ansible Controller. + name: workflow_launch + version_added: null plugins: become: {} cache: {} @@ -20,4 +162,4 @@ plugins: strategy: {} test: {} vars: {} -version: 2.2.5 +version: 2.3.1 diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index e72f3d6b5..9241d55e4 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -381,3 +381,44 @@ releases: - typos.yml - workflow_job_template_state_and_nodes.yml release_date: '2023-01-26' + 2.3.0: + changes: + breaking_changes: + - updated object_diff role to use the infra namespace, that means to use the + role it requires the infra version of the collection. Previous version required + the redhat_cop + bugfixes: + - Fixed name of task for inventory source update + - Fixed variable definitions in readmes + - Removed master_role_example as no longer required (this wasn't a functional + role) + minor_changes: + - Added argument_spec for all roles + - Adapt filetree_read role tests playbook config-controller-filetree.yml. + - 'Add new type of objects for object_diff role: applications, execution environments, + instance groups, notifications and schedules' + - Add no_log to all tasks that populates data to avoid exposing encrypted data + - Add task to add Galaxy credentials and Execution Environments to Organization. + - Set the variables to assign_galaxy_credentials_to_org and assign_default_ee_to_org + to false in the task to run all roles at dispatch role. + - avoid to create orgs during drop_diff + - fixed an extra blank line in schedules readme that was breaking the table + - removed references to redhat_cop as a collection namespace in the readme files. + fragments: + - arg_spec.yml + - dispatch_creds_ee_orgs_creation.yml + - filetree_read.yml + - fixing_readme.yaml + - i_s_u_title.yml + - object_diff_role_and_plugin.yml + - redhat_to_infra_conversion.yml + release_date: '2023-03-16' + 2.3.1: + changes: + bugfixes: + - Added argument_spec for all roles + - Ensures vars get loaded properly by dispatch role + fragments: + - arg_spec.yml + - dispatch_fix.yml + release_date: '2023-03-24' diff --git a/changelogs/fragments/arg_spec.yml b/changelogs/fragments/arg_spec.yml deleted file mode 100644 index 702d320fd..000000000 --- a/changelogs/fragments/arg_spec.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -bugfixes: - - Removed master_role_example as no longer required (this wasn't a functional role) - - Added argument_spec for all roles - - Fixed variable definitions in readmes - - Fixed issue in filetree_read where arg spec incorrect and caused failure (#550) -... diff --git a/changelogs/fragments/dispatch_creds_ee_orgs_creation.yml b/changelogs/fragments/dispatch_creds_ee_orgs_creation.yml deleted file mode 100644 index a502a3488..000000000 --- a/changelogs/fragments/dispatch_creds_ee_orgs_creation.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -minor_changes: - - Set the variables to assign_galaxy_credentials_to_org and assign_default_ee_to_org to false in the task to run all roles at dispatch role. - - Add task to add Galaxy credentials and Execution Environments to Organization. - - Adapt filetree_read role tests playbook config-controller-filetree.yml. -... diff --git a/changelogs/fragments/dispatch_fix.yml b/changelogs/fragments/dispatch_fix.yml deleted file mode 100644 index d70caf29f..000000000 --- a/changelogs/fragments/dispatch_fix.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -bugfixes: - - Ensures vars get loaded properly by dispatch role -... diff --git a/changelogs/fragments/filetree_read.yml b/changelogs/fragments/filetree_read.yml deleted file mode 100644 index 72f1c6328..000000000 --- a/changelogs/fragments/filetree_read.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -minor_changes: - - "Add no_log to all tasks that populates data to avoid exposing encrypted data" -... diff --git a/changelogs/fragments/fixing_readme.yaml b/changelogs/fragments/fixing_readme.yaml deleted file mode 100644 index 40838503d..000000000 --- a/changelogs/fragments/fixing_readme.yaml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - fixed an extra blank line in schedules readme that was breaking the table diff --git a/changelogs/fragments/i_s_u_title.yml b/changelogs/fragments/i_s_u_title.yml deleted file mode 100644 index fc631b35f..000000000 --- a/changelogs/fragments/i_s_u_title.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -bugfixes: - - Fixed name of task for inventory source update -... diff --git a/changelogs/fragments/object_diff_role_and_plugin.yml b/changelogs/fragments/object_diff_role_and_plugin.yml deleted file mode 100644 index 44414e8cb..000000000 --- a/changelogs/fragments/object_diff_role_and_plugin.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -minor_changes: - - "Add new type of objects for object_diff role: applications, execution environments, instance groups, notifications and schedules" - - "avoid to create orgs during drop_diff" -... diff --git a/changelogs/fragments/redhat_to_infra_conversion.yml b/changelogs/fragments/redhat_to_infra_conversion.yml deleted file mode 100644 index d192b0504..000000000 --- a/changelogs/fragments/redhat_to_infra_conversion.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -minor_changes: - - removed references to redhat_cop as a collection namespace in the readme files. -breaking_changes: - - updated object_diff role to use the infra namespace, that means to use the role it requires the infra version of the collection. Previous version required the redhat_cop -... From 251b3285360e038bf2e365b78e54f52611508cce Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 25 Mar 2023 08:28:08 +0000 Subject: [PATCH 94/94] Update pre-commit (#555) Co-authored-by: sean-m-sullivan --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 344225b2d..bc9f9cc01 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: # types: # - yaml - repo: 'https://github.com/ansible-community/ansible-lint.git' - rev: v6.14.2 + rev: v6.14.3 hooks: # see discussions here about what arguments are used, and behavior # https://github.com/ansible/ansible-lint/issues/649