blob: b7009465462115d107fea72d023bcfd3cc4a199b [file] [log] [blame]
---
# tasks file for apigee-opdk-setup-scopes-add
- name: Assert that attributes are available.
assert:
that:
- "ax_group is defined and ax_group | trim | length > 0"
- "scope_org is defined and scope_org | trim | length > 0"
- "scope_env is defined and scope_env | trim | length > 0"
- "local_mgmt_ip is defined and local_mgmt_ip | trim | length > 0"
- "opdk_user_email is defined and opdk_user_email | trim | length > 0"
- "opdk_user_pass is defined and opdk_user_pass | trim | length > 0"
msg: "Please provide the missing attribute"
- name: Add scope to analytics group
uri:
user: '{{ opdk_user_email }}'
password: '{{ opdk_user_pass }}'
method: POST
body_format: json
url: http://{{ local_mgmt_ip }}:8080/v1/analytics/groups/ax/{{ ax_group }}/scopes?org={{ scope_org }}&env={{ scope_env }}