I tried to add:
But for some reason this the state seems to execute/install but the commands are not executed, or at least not all of them.I need a solution to run multiple commands and to fail the deployment if any of these fails. I know that I could write a bash script and include this bash script, but I was looking for a solution that would work with only the YAML file.
You want this:
Or this, which I would prefer, where the script is downloaded from the master:
You can do as Dan pointed out, using the pipe or a
cmd.script state. But it should be noted that you have some syntax problems in your original post. Each new state needs a name arg, you can't just put the command after the colon:
However, that actually may fail as well, because I don't think you
can put multiple of the same state underneath a single ID. So you may
have to split them out like this:
up vote
0
down vote
In addition to the above (better) suggestions, you can do this:
|
-
0 comments:
Post a Comment