Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating to the new 3.1 aap_configuration collection #61

Merged
merged 5 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The awx.awx or ansible.controller collections MUST be installed in order for thi
hosts: localhost
connection: local
vars:
controller_validate_certs: false
aap_validate_certs: false
collections:
- awx.awx
```
Expand Down
11 changes: 0 additions & 11 deletions group_vars/all/ah_ee_main.yml

This file was deleted.

9 changes: 0 additions & 9 deletions group_vars/all/ah_ee_namespaces.yml

This file was deleted.

8 changes: 0 additions & 8 deletions group_vars/all/ah_groups.yml

This file was deleted.

12 changes: 0 additions & 12 deletions group_vars/all/ah_users.yml

This file was deleted.

2 changes: 1 addition & 1 deletion group_vars/all/applications.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
controller_applications_all:
aap_applications_all:
- name: config_as_code_api
description: launch controller config job template
organization: config_as_code
Expand Down
24 changes: 4 additions & 20 deletions group_vars/all/auth.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
# User may add controller auth creds to this file and encrypt it using `ansible-vault`
---
controller_hostname: "{{ controller_host | default(groups['automationcontroller'][0]) }}:{{ controller_port | default(443) }}"
controller_username: "{{ controller_user | default('admin') }}"
controller_password: "{{ controller_pass }}"
controller_validate_certs: false

ah_host: "{{ ah_hostname | default(groups['automationhub'][0]) }}:{{ ah_port | default(443) }}"
ah_username: "{{ ah_user | default('admin') }}"
ah_password: "{{ ah_pass }}"
ah_path_prefix: 'galaxy' # this is for private automation hub
ah_verify_ssl: false
ah_validate_certs: false

ee_registry_username: "{{ ah_username }}"
ee_registry_password: "{{ ah_password }}"
ee_registry_dest: "{{ ah_host }}"

eda_hostname: "{{ eda_host | default(groups['automationedacontroller'][0]) | default(groups['automationeda'][0]) }}:{{ eda_port | default(443) }}"
eda_username: "{{ eda_user | default('admin') }}"
eda_password: "{{ eda_pass }}"
eda_validate_certs: false
aap_hostname: "{{ aap_host | default(groups['automationcontroller'][0]) }}:{{ controller_port | default(443) }}"
aap_username: "{{ aap_user | default('admin') }}"
aap_password: "{{ aap_pass }}"
aap_validate_certs: false
...
16 changes: 8 additions & 8 deletions group_vars/all/credential_types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ controller_credential_types_all:
- hostname
injectors:
env:
AH_PASSWORD: !unsafe "{{ password }}"
AH_USERNAME: !unsafe "{{ username }}"
AH_HOST: !unsafe "{{ hostname }}"
aap_password: !unsafe "{{ password }}"
aap_username: !unsafe "{{ username }}"
aap_hostname: !unsafe "{{ hostname }}"
AH_API_TOKEN: !unsafe "{{ token }}"
AH_VERIFY_SSL: !unsafe "{{ verify_ssl }}"
extra_vars:
ah_password: !unsafe "{{ password }}"
ah_username: !unsafe "{{ username }}"
ah_host: !unsafe "{{ hostname }}"
ah_token: !unsafe "{{ token }}"
ah_validate_certs: !unsafe "{{ verify_ssl }}"
aap_password: !unsafe "{{ password }}"
aap_username: !unsafe "{{ username }}"
aap_hostname: !unsafe "{{ hostname }}"
aap_token: !unsafe "{{ token }}"
aap_validate_certs: !unsafe "{{ verify_ssl }}"

- name: ssh_priv_file
kind: cloud
Expand Down
38 changes: 19 additions & 19 deletions group_vars/all/credentials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,66 +5,66 @@ controller_credentials_all:
organization: config_as_code
description: aap admin account
inputs:
host: "{{ controller_hostname }}"
username: "{{ controller_username }}"
password: "{{ controller_password }}"
host: "{{ aap_hostname }}"
username: "{{ aap_username }}"
password: "{{ aap_password }}"
verify_ssl: false

- name: ah_admin_user_pass
credential_type: automation_hub
organization: config_as_code
description: automation hub admin account
inputs:
hostname: "{{ ah_host }}"
username: "{{ ah_username }}"
password: "{{ ah_password }}"
hostname: "{{ aap_hostname }}"
username: "{{ aap_username }}"
password: "{{ aap_password }}"
verify_ssl: false

- name: ah_token_user
credential_type: automation_hub
organization: config_as_code
description: automation hub api account
inputs:
hostname: "{{ ah_host }}"
hostname: "{{ aap_hostname }}"
username: "{{ ah_token_username }}"
token: "{{ ah_token }}"
token: "{{ aap_token }}"
verify_ssl: false

- name: ah_certified
credential_type: Ansible Galaxy/Automation Hub API Token
organization: config_as_code
inputs:
url: https://{{ ah_host }}/api/galaxy/content/rh-certified/
token: "{{ ah_token }}"
url: https://{{ aap_hostname }}/pulp_ansible/galaxy/rh-certified/
token: "{{ aap_token }}"

- name: ah_published
credential_type: Ansible Galaxy/Automation Hub API Token
organization: config_as_code
inputs:
url: https://{{ ah_host }}/api/galaxy/content/published/
token: "{{ ah_token }}"
url: https://{{ aap_hostname }}/pulp_ansible/galaxy/published/
token: "{{ aap_token }}"

- name: ah_validated
credential_type: Ansible Galaxy/Automation Hub API Token
organization: config_as_code
inputs:
url: https://{{ ah_host }}/api/galaxy/content/validated/
token: "{{ ah_token }}"
url: https://{{ aap_hostname }}/pulp_ansible/galaxy/validated/
token: "{{ aap_token }}"

- name: ah_community
credential_type: Ansible Galaxy/Automation Hub API Token
organization: config_as_code
inputs:
url: https://{{ ah_host }}/api/galaxy/content/community/
token: "{{ ah_token }}"
url: https://{{ aap_hostname }}/pulp_ansible/galaxy/community/
token: "{{ aap_token }}"

- name: cr_ah
credential_type: Container Registry
organization: config_as_code
inputs:
host: "{{ ah_host }}"
username: "{{ ah_username }}"
password: "{{ ah_password }}"
host: "{{ aap_hostname }}"
username: "{{ aap_username }}"
password: "{{ aap_password }}"
verify_ssl: false

- name: root
Expand Down
4 changes: 2 additions & 2 deletions group_vars/all/eda_credentials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ eda_credentials:
- name: hub
description: private automation hub
credential_type: 'Container Registry'
username: "{{ ah_username }}"
secret: "{{ ah_password }}"
username: "{{ aap_username }}"
secret: "{{ aap_password }}"
...
2 changes: 1 addition & 1 deletion group_vars/all/eda_decision_environments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
eda_decision_environments:
- name: minimal
description: my default decision environment
image_url: "{{ ah_host }}/de-minimal-rhel8"
image_url: "{{ aap_hostname }}/de-minimal-rhel8"
credential: hub
...
10 changes: 10 additions & 0 deletions group_vars/all/ah_ee_list.yml → group_vars/all/ee_list.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
---
# ee_base_image: registry.redhat.io/ansible-automation-platform-22/ee-supported-rhel8
# ee_builder_image: registry.redhat.io/ansible-automation-platform-22/ansible-builder-rhel8
ee_image_push: true
ee_validate_certs: false
ee_create_ansible_config: false
# ee_auth_file:
# ee_executable:
# ee_ca_cert_dir:
# ee_sign_by:

ee_list:
- name: config_as_code_ee
dependencies:
Expand Down
6 changes: 3 additions & 3 deletions group_vars/all/execution_environments.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
controller_execution_environments_all:
- name: supported
image: "{{ ah_host }}/ee-supported-rhel8"
image: "{{ aap_hostname }}/ee-supported-rhel8"
pull: always
credential: cr_ah

- name: minimal
image: "{{ ah_host }}/ee-minimal-rhel8"
image: "{{ aap_hostname }}/ee-minimal-rhel8"
pull: always
credential: cr_ah

- name: old_29_ee
image: "{{ ah_host }}/ee-29-rhel8"
image: "{{ aap_hostname }}/ee-29-rhel8"
pull: always
credential: cr_ah
...
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
ah_namespaces:
hub_namespaces:
- name: community_test
company: Ansible by Red Hat
email: [email protected]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
ah_auto_approve: true
ah_collections:
hub_collections:
- collection_name: test
git_url: https://github.com/sean-m-sullivan/collection_test.git
# key_path: "{{ lookup('env', 'MY_CERT_FILE') }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# Documentation:
# https://github.com/ansible/galaxy_collection/blob/devel/roles/ee_image/README.md
ah_ee_images: []
hub_ee_images: []
# - name:
# state: "{{ target_state }}"
# append: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# - https://github.com/ansible/galaxy_collection/blob/devel/roles/ee_registry/README.md
# - https://github.com/ansible/galaxy_collection/blob/devel/roles/ee_registry_index/README.md
# - https://github.com/ansible/galaxy_collection/blob/devel/roles/ee_registry_sync/README.md
ah_ee_registries: []
hub_ee_registries: []
# - name: registry_redhat_io
# url: https://registry.redhat.io
# username: "{{ rh_username }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# Documentation:
# https://github.com/ansible/galaxy_collection/tree/devel/roles/ee_repository
ah_ee_repositories: []
hub_ee_repositories: []
# - name: ansible-automation-platform/ee-minimal-rhel8
# readme: "" # mutex with readme_file
# readme_file: "" # mutex with readme
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# Documentation: https://github.com/ansible/galaxy_collection/blob/devel/roles/group_roles/README.md
ah_group_roles: []
hub_group_roles: []
# - state: present
# groups:
# - foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
ah_collection_remotes:
hub_collection_remotes:
- name: rh-certified
token: "{{ cloud_token }}"
url: https://console.redhat.com/api/automation-hub/content/published/
Expand All @@ -23,7 +23,7 @@ ah_collection_remotes:
- community.crypto
- cloud.terraform

ah_collection_repositories:
hub_collection_repositories:
- name: rh-certified
remote: rh-certified
- name: validated
Expand Down
2 changes: 1 addition & 1 deletion group_vars/all/organizations.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
controller_organizations_all:
aap_organizations_all:
- name: config_as_code
galaxy_credentials:
- ah_published
Expand Down
4 changes: 3 additions & 1 deletion group_vars/all/teams.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
controller_teams_all:
aap_teams_all:
- name: config_as_code_admin
organization: config_as_code
- name: admin
state: present
...
13 changes: 11 additions & 2 deletions group_vars/all/users.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
---
controller_user_accounts_all:
- user: api_user
ah_token_username: token_user
aap_user_accounts_all:
- username: api_user
is_superuser: false
password: "{{ controller_api_user_pass }}"
- username: token_user
# Currently not working
# groups:
# - "admin"
append: true
is_superuser: true
password: "{{ ah_token_password }}"
state: present
...
2 changes: 1 addition & 1 deletion group_vars/dev/applications.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
controller_applications_dev: []
aap_applications_dev: []
...
8 changes: 4 additions & 4 deletions group_vars/dev/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
controller_applications: "{{ controller_applications_all + controller_applications_dev }}"
aap_applications: "{{ aap_applications_all + aap_applications_dev }}"
controller_credential_input_sources: "{{ controller_credential_input_sources_all + controller_credential_input_sources_dev }}"
controller_credential_types: "{{ controller_credential_types_all + controller_credential_types_dev }}"
controller_credentials: "{{ controller_credentials_all + controller_credentials_dev }}"
Expand All @@ -12,13 +12,13 @@ controller_inventory_sources: "{{ controller_inventory_sources_all + controller_
controller_templates: "{{ controller_templates_all + controller_templates_dev }}"
controller_labels: "{{ controller_labels_all + controller_labels_dev }}"
controller_notifications: "{{ controller_notifications_all + controller_notifications_dev }}"
controller_organizations: "{{ controller_organizations_all + controller_organizations_dev }}"
aap_organizations: "{{ aap_organizations_all + aap_organizations_dev }}"
controller_projects: "{{ controller_projects_all + controller_projects_dev }}"
controller_roles: "{{ controller_roles_all + controller_roles_dev }}"
controller_schedules: "{{ controller_schedules_all + controller_schedules_dev }}"
controller_settings: "{{ controller_settings_all | combine(controller_settings_dev, list_merge='append', recursive=true) }}"
controller_teams: "{{ controller_teams_all + controller_teams_dev }}"
controller_user_accounts: "{{ controller_user_accounts_all + controller_user_accounts_dev }}"
aap_teams: "{{ aap_teams_all + aap_teams_dev }}"
aap_user_accounts: "{{ aap_user_accounts_all + aap_user_accounts_dev }}"
controller_workflows: "{{ controller_workflows_all + controller_workflows_dev }}"
env: dev
scm_branch: "" # when you want it to be default branch just set to ""
Expand Down
2 changes: 1 addition & 1 deletion group_vars/dev/organizations.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
controller_organizations_dev: []
aap_organizations_dev: []
...
2 changes: 1 addition & 1 deletion group_vars/dev/teams.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
controller_teams_dev: []
aap_teams_dev: []
...
2 changes: 1 addition & 1 deletion group_vars/dev/users.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
controller_user_accounts_dev: []
aap_user_accounts_dev: []
...
Loading
Loading