You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hetzner-ansible/tasks/smardigo_management_message...

35 lines
1023 B
YAML

---
- name: "Creating smardigo user token"
smardigo_user_token:
secret: "{{ connect_jwt_secret }}"
user_id: "{{ connect_jwt_username }}"
register: smardigo_user_token_result
delegate_to: 127.0.0.1
tags:
- update_deployment
- name: "Setting smardigo_auth_token_value as fact"
set_fact:
smardigo_auth_token_value: "{{ smardigo_user_token_result.token }}"
tags:
- update_deployment
- name: "Sending smardigo management message <{{ smardigo_management_action }}> to <{{ scope_id }}/{{ process_instance_id }}>"
uri:
url: "{{ smardigo_management_url }}"
method: POST
body_format: json
body: "{{ lookup('template','smardigo-management-message.json.j2') }}"
headers:
accept: "*/*"
Content-Type: "application/json"
Smardigo-User-Token: "{{ smardigo_auth_token_value }}"
status_code: [200]
delegate_to: 127.0.0.1
retries: 5
delay: 5
when:
- scope_id is defined
- process_instance_id is defined
- smardigo_management_action is defined