Closed stevestrutt closed 5 years ago
Hi @stevestrutt. Thank you for the pull request. It looks complete. Being able to run Ansible via null_resource
effectively turns Terraform into an Ansible runner.
I will run a couple of checks before merging.
Hi Steve, thank you once again for the contribution. I have merged your PR onto an intermediate branch to have the tests status covered. The intermediate PR is now merged to master. I will create a release mid next week, your changes will be in the new version.
Happy to hear this is extensively tested on the IBM Cloud!
Summary
Added support to allow terraform-provisioner-ansible to be used in local_mode with a null_resource. Target hosts for the provisioner can be specified using
plays.hosts
and interpolation from the ip_address of provisioned compute instances, or by passing an inventory file.Included updates to Readme and an additional example.
Using
terraform taint null_resource.xxxxxxx
the provisioner can be triggered to run again on the nextterraform apply
.Extensively tested on IBM Cloud. Operation will be the same across all cloud vendors.