[CORD-2464]
Fixes to allow scenarios to run on macOS
Change-Id: I257d62fb2726be81f21aac41baf84aaf3591eec8
diff --git a/ansible/roles/vagrant-ssh-install/tasks/main.yml b/ansible/roles/vagrant-ssh-install/tasks/main.yml
index b1da8c7..b1b287d 100644
--- a/ansible/roles/vagrant-ssh-install/tasks/main.yml
+++ b/ansible/roles/vagrant-ssh-install/tasks/main.yml
@@ -14,7 +14,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-- name: Ensure .ssh directory exists
+- name: Check for .ssh directory
+ stat:
+ path: "{{ ansible_env.HOME }}/.ssh"
+ register: dotsshdir
+
+- name: Create .ssh directory if it doesn't exist
+ when: (not dotsshdir.stat.isdir) and (not dotsshdir.stat.islnk)
file:
path: "{{ ansible_env.HOME }}/.ssh"
state: directory