Run curl command to run a playbook in semaphore against a specified host without using inventory? #2522
jengstrom440
started this conversation in
General
Replies: 1 comment
-
Finally got this issue figured out, turns out to be a formatting issue with JSON, another reason I wished ansible used YAML only! :) To get this to run, format it as such. This is the exact command I used to run it, minus environment information. Notice the \ in the nested JSON only:
I also used the "args" and specified
It works, but will not work without the backslashes at all. I think the play recap somehow pulls the variable name instead of what it resolves to:
That is unedited of the Play Recap, which is kinda funny, but hey it works! I hope this can save someone else some time in their ansible semaphore work. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to run a curl command to semaphore API to tell it to use the hostname of the system it is calling it as the inventory to run against instead of specifying it in an inventory or using a survey. I want it to pick up the hostname system variable to run against, not an ansible variable. How would one go about doing that? My only workaround so far is SSH to the ansible server, and run ansible-playbook and bypass semaphore completely, which defeats the point of having semaphore. Any ideas? I have spent a considerable amount of time attempting to get this to work and have gotten close, but not quite there. Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions