You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have created an “integration” in the semaphore, which is configured as follows:
ExtractValue
values source: body
body data type: json
key: vmname
environment variable: vmname
matcher
type: body
method: equals
body data type: json
key: key
value: test
This triggers my ansible task “webhook test”.
If I trigger the webhook with the following command: curl -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"key\": \"test\", \"vmname\": \"test\"}" https://semaphore.example.org/api/integrations/1234567890abcdef
then the ansible task starts, but the environment variable “vmname” is empty.
Even if I display the entire env, I can't find my variable anywhere, only the env variables of the task itself.
- name: show all env
hosts: localhost
gather_facts: yes
tasks:
- name: show all env
debug:
var: ansible_facts.env
I use semaphore in docker, and have the following in my docker compose env: SEMAPHORE_FORWARDED_ENV_VARS: '["vmname"]'
Unfortunately, this did not help either, the variable is still empty or not set.
Related to
Web-Backend (APIs), Ansible (task execution)
The text was updated successfully, but these errors were encountered:
Question
Hello, I have created an “integration” in the semaphore, which is configured as follows:
ExtractValue
matcher
This triggers my ansible task “webhook test”.
If I trigger the webhook with the following command:
curl -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"key\": \"test\", \"vmname\": \"test\"}" https://semaphore.example.org/api/integrations/1234567890abcdef
then the ansible task starts, but the environment variable “vmname” is empty.
only prints
VM NAME:
Even if I display the entire env, I can't find my variable anywhere, only the env variables of the task itself.
I use semaphore in docker, and have the following in my docker compose env:
SEMAPHORE_FORWARDED_ENV_VARS: '["vmname"]'
Unfortunately, this did not help either, the variable is still empty or not set.
Related to
Web-Backend (APIs), Ansible (task execution)
The text was updated successfully, but these errors were encountered: