https://pulumi.com logo
Title
q

quaint-psychiatrist-60421

01/08/2022, 6:33 AM
Greetings Programs! Dipping into the pulumi pool ... I have AWS instances being created similar to how we do things in terraform, but now I would like to run an ansible playbook against newly created instances. python: In my app module I use
instances.append(aws.ec2.Instance(<various_params>))
for creating instances, and return
instances
. I would then like to run ansible (either through subprocess.run() or ansible imports) against newly created resources. This list always contains the total resources, new or existing.
g

great-queen-39697

01/10/2022, 9:00 PM
You might find the new Command package useful: https://www.pulumi.com/registry/packages/command/. It's in preview, but the idea is to allow you to run commands as part of running Pulumi, so you could add your Ansible playbooks in that way.
q

quaint-psychiatrist-60421

01/12/2022, 1:25 AM
Thanks Laura, looks like this will work.
👍 1