blob: 82c6c8a44b3dc3d6384918661e2191e1f9483835 [file] [log] [blame]
---
# tasks file for apigee-opdk-setup-scopes-state
- name: Assert that attributes are available.
assert:
that:
- "ax_group is defined and ax_group | 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: GET
body_format: json
url: http://{{ local_mgmt_ip }}:8080/v1/analytics/groups/ax/{{ ax_group }}
register: ax_state
- name: Debug axgroup_results
debug:
var: ax_state
- pause:
#- name: Format results to json
# set_fact:
# ax_state: "{{ axgroup_results.json | from_json }}"
- name: Assert that scopes is not empty
assert:
that:
- "ax_state.json['scopes'] | length > 0"
msg: "analytics group has no scopes defined, please define scopes for analytics group"