Rearrange playbooks. Add EDA
This commit is contained in:
30
playbooks/provision_users.yml
Normal file
30
playbooks/provision_users.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
- name: Provision Beta Test User Accounts
|
||||
hosts: apidev.bab.toal.ca
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Use Appwrite REST API to create new user
|
||||
ansible.builtin.uri:
|
||||
url: "{{ appwrite_api_uri }}/users/argon2"
|
||||
method: POST
|
||||
body_format: json
|
||||
headers:
|
||||
Content-Type: application/json
|
||||
X-Appwrite-Response-Format: '{{ appwrite_response_format }}'
|
||||
X-Appwrite-Project: '{{ appwrite_project }}'
|
||||
X-Appwrite-Key: '{{ appwrite_api_key }}'
|
||||
|
||||
body:
|
||||
userId: "{{ item.userid }}"
|
||||
password: "{{ item.password }}"
|
||||
email: "{{ item.email | default(omit) }}"
|
||||
name: "{{ item.name }}"
|
||||
status_code: [201, 409]
|
||||
return_content: true
|
||||
register: appwrite_api_result
|
||||
loop: '{{ bab_users }}'
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Display response
|
||||
ansible.builtin.debug:
|
||||
var: appwrite_api_result
|
||||
Reference in New Issue
Block a user