From 94e53d988bf12a1601a02631fc48109aab3b8979 Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Tue, 8 Feb 2022 09:44:50 -0500 Subject: [PATCH] add execution adminitrator to role module --- awx_collection/plugins/modules/role.py | 3 ++- .../tests/integration/targets/role/tasks/main.yml | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/awx_collection/plugins/modules/role.py b/awx_collection/plugins/modules/role.py index 504d574402..f10e7deaea 100644 --- a/awx_collection/plugins/modules/role.py +++ b/awx_collection/plugins/modules/role.py @@ -34,7 +34,7 @@ options: - The role type to grant/revoke. required: True choices: ["admin", "read", "member", "execute", "adhoc", "update", "use", "approval", "auditor", "project_admin", "inventory_admin", "credential_admin", - "workflow_admin", "notification_admin", "job_template_admin"] + "workflow_admin", "notification_admin", "job_template_admin", "execution_environment_admin"] type: str target_team: description: @@ -173,6 +173,7 @@ def main(): "workflow_admin", "notification_admin", "job_template_admin", + "execution_environment_admin", ], required=True, ), diff --git a/awx_collection/tests/integration/targets/role/tasks/main.yml b/awx_collection/tests/integration/targets/role/tasks/main.yml index 364ba67183..692b7085e7 100644 --- a/awx_collection/tests/integration/targets/role/tasks/main.yml +++ b/awx_collection/tests/integration/targets/role/tasks/main.yml @@ -85,6 +85,21 @@ that: - "result is changed" + - name: Add Joe as execution admin to Default Org. + role: + user: "{{ username }}" + role: execution_environment_admin + organizations: Default + state: "{{ item }}" + register: result + with_items: + - "present" + - "absent" + + - assert: + that: + - "result is changed" + - name: Create a workflow workflow_job_template: name: test-role-workflow