I have a pretty simple scenario, but unfortunately it appears not be so. I want to post a valid yaml to the salt-api and let the reactor take care of the rest. My yaml is basically a text from docker-compose.yml file. So when I do this
curl -sSi localhost:8000/hook/docker-services -H 'Content-type: application/x-yaml' \
-d '
target: my_minion
compose:
version: "3"
services:
mongodb:
image: "mongo:3.6.1"
restart: always
ports:
- 27017:27017
command: mongod --smallfiles --logpath=/dev/null
'
I get this error
SaltRenderError: found unexpected ':'
It cannot parse : after mongo. What is the best way the go about it? Same is the case with ports.
My motivation is to run docker containers on minions and manage them by passing docker-compose.yml using salt-api.
Is there a better way to do it? I would really appreciate if I could get some help. Thank you!
Fawad