mirror of
https://github.com/ansible/awx.git
synced 2026-05-13 04:17:36 -02:30
Initial cut at tower_token module
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
---
|
||||
- name: Generate names
|
||||
set_fact:
|
||||
token_description: "AWX-Collection-tests-tower_token-description-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
||||
|
||||
- name: Create a Token
|
||||
tower_token:
|
||||
description: '{{ token_description }}'
|
||||
scope: "write"
|
||||
state: present
|
||||
register: new_token
|
||||
|
||||
- name: Validate our token works by token
|
||||
tower_job_list:
|
||||
tower_oauthtoken: "{{ tower_token.token }}"
|
||||
|
||||
- name: Validate out token works by object
|
||||
tower_job_list:
|
||||
tower_oauthtoken: "{{ tower_token }}"
|
||||
|
||||
- name: Delete our Token with our own token
|
||||
tower_token:
|
||||
existing_token: "{{ tower_token }}"
|
||||
tower_oauthtoken: "{{ tower_token }}"
|
||||
state: absent
|
||||
Reference in New Issue
Block a user