Creating file to share between actions?

Hello all,
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 :frowning:

Any suggestions would be very appreciated.

Well kind of solved it, at least the action with simple python script is now generating the files. Permissions issue was that docker containers have different UID/GID mapped left and right and are not the same between the myriad of micro containers that creates stackstorm… so I created folder in pack/action folder called inventory. chown 1000:1000 as this is user that it needs to be writable by and than it created the files there as needed.

Now somehow chain this into workflow…