2022-03-08 12:57:06 +00:00
|
|
|
---
|
|
|
|
- name: Ensure required params for CLI have been provided
|
|
|
|
ansible.builtin.assert:
|
|
|
|
that:
|
|
|
|
- query is defined
|
|
|
|
fail_msg: "Missing required parameters to execute CLI."
|
|
|
|
quiet: true
|
|
|
|
|
|
|
|
- name: "Execute CLI query: {{ query }}"
|
|
|
|
ansible.builtin.command: >
|
2022-03-11 13:44:19 +00:00
|
|
|
{{ keycloak.cli_path }} --connect --command='{{ query }}' --controller={{ keycloak_host }}:{{ keycloak_management_http_port }}
|
|
|
|
changed_when: false
|
|
|
|
register: cli_result
|