I’m trying to figure out a solution for this issue:
I have ansible playbook that require specially crafted inventory file. I’m not finding a way natively in stackstorm creating it before the playbook is run so I thought I make another action that call python script locally with parameters and base on that it will pop out inventory file.
In workflow than the script is run first, register stdout and this is used as inventory file for ansible playbook. At least that was the idea… but I can’t create the file in the same location as the script is ( in its packs/action folder ) because I get permissions denied ( does not matter if I set the folder to 777 )… if I set the destination of the file to /tmp/something it gets created but disappear ( I think this is because stackstorm spawn temporary image to run the function in ?, I’m running the whole stackstorm in docker )
So how to deal with this, I need to craft inventory file to look specific way … on google there is so little examples of using ansible with stackstorm its not even funny
Any suggestions would be very appreciated.