radekg / terraform-provisioner-ansible

Ansible with Terraform 0.14.x
Apache License 2.0
572 stars 100 forks source link

Don't set ANSIBLE_ROLES_PATH when not needed #109

Closed killerwhile closed 5 years ago

killerwhile commented 5 years ago

When neither ANSIBLE_ROLES_PATH nor DEFAULT_ROLES_PATH environment variables are set, ANSIBLE_ROLES_PATH is still set to defaultRolesPath. This avoid usage of ansible.cfg file, since ANSIBLE_ROLES_PATH has precedence over ansible.cfg:role_path attribute.

The proposal here is to avoid forcing ANSIBLE_ROLES_PATH when no path is provided, deferring to the ansible.cfg or ansible defaults when possible.

Adding role_path parameter in the provisioner should remains untouched.

radekg commented 5 years ago

Resolved with https://github.com/radekg/terraform-provisioner-ansible/pull/110. Thank you for the PR, @killerwhile.