radekg / terraform-provisioner-ansible

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

Reemote bootstrap directory exists check simplification, closes #138 #140

Closed radekg closed 5 years ago

radekg commented 5 years ago

Summary

The existing test for directory existence with the magic code 50, in remote provisioner func (v *RemoteMode) checkRemoteDirExists(remoteDir string) (bool, error), appears to be failing for users, as per: https://github.com/radekg/terraform-provisioner-ansible/issues/138

Maybe the original test was too clever. This PR attempts to simplify the test and look for a substring that we know should exist in case of that expected error.