diff options
author | Chris Meyers <chris.meyers.fsu@gmail.com> | 2025-01-09 22:27:06 +0100 |
---|---|---|
committer | Chris Meyers <chrismeyersfsu@users.noreply.github.com> | 2025-01-13 21:01:18 +0100 |
commit | ec2966225bb31f2e2273b44b8763b0cba5a001aa (patch) | |
tree | 1414ae8f512561587daa67ea1bf7078f119971a0 | |
parent | Add test to ensure bootstrap reqs are good (#15733) (diff) | |
download | awx-ec2966225bb31f2e2273b44b8763b0cba5a001aa.tar.xz awx-ec2966225bb31f2e2273b44b8763b0cba5a001aa.zip |
Add insights service account support to collection
-rw-r--r-- | awx_collection/plugins/modules/credential.py | 2 | ||||
-rw-r--r-- | awx_collection/tests/integration/targets/credential/tasks/main.yml | 28 |
2 files changed, 30 insertions, 0 deletions
diff --git a/awx_collection/plugins/modules/credential.py b/awx_collection/plugins/modules/credential.py index b5fbfe9a4e..e43e59ae63 100644 --- a/awx_collection/plugins/modules/credential.py +++ b/awx_collection/plugins/modules/credential.py @@ -85,6 +85,8 @@ options: - vault_id (the vault identifier; this parameter is only valid if C(kind) is specified as C(vault).) - ssh_key_unlock (unlock password for ssh_key; use "ASK" and launch job to be prompted) - gpg_public_key (GPG Public Key used for signature validation) + - client_id (client ID insights type service account) + - client_secret (client secret insights type service account) type: dict update_secrets: description: diff --git a/awx_collection/tests/integration/targets/credential/tasks/main.yml b/awx_collection/tests/integration/targets/credential/tasks/main.yml index 34dd058d97..043deea185 100644 --- a/awx_collection/tests/integration/targets/credential/tasks/main.yml +++ b/awx_collection/tests/integration/targets/credential/tasks/main.yml @@ -22,6 +22,7 @@ openstack_cred_name1: "AWX-Collection-tests-credential-openstack-cred1-{{ test_id }}" rhv_cred_name1: "AWX-Collection-tests-credential-rhv-cred1-{{ test_id }}" insights_cred_name1: "AWX-Collection-tests-credential-insights-cred1-{{ test_id }}" + insights_cred_name2: "AWX-Collection-tests-credential-insights-cred2-{{ test_id }}" tower_cred_name1: "AWX-Collection-tests-credential-tower-cred1-{{ test_id }}" - name: create a tempdir for an SSH key @@ -694,6 +695,33 @@ that: - "result is changed" +- name: Create a valid Insights token credential + credential: + name: "{{ insights_cred_name2 }}" + organization: Default + state: present + credential_type: Insights + inputs: + client_id: joe + client_secret: secret + register: result + +- assert: + that: + - "result is changed" + +- name: Delete an Insights token credential + credential: + name: "{{ insights_cred_name2 }}" + organization: Default + state: absent + credential_type: Insights + register: result + +- assert: + that: + - "result is changed" + - name: Create a valid Tower-to-Tower credential credential: name: "{{ tower_cred_name1 }}" |