summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaikel Guemar <hguemar@fedoraproject.org>2020-05-06 12:08:43 +0200
committerHaikel Guemar <hguemar@fedoraproject.org>2020-05-06 13:31:00 +0200
commitab39ebcece2c0b283213d61fd01a6209de94fb96 (patch)
tree377b1ff9722882379df02a09e40518fd93bce066
parent306666f1d9d2519fdb044d3c9d27cda57767b9db (diff)
Ensure that ssh home directory exists
Trying to use the add-sshkey role fails due to home ssh directory being absent on pod nodes Change-Id: I4fe6eaf3e958c19dbdcca23ae904b12f5be0e489
-rw-r--r--roles/add-sshkey/tasks/main.yaml6
1 files changed, 6 insertions, 0 deletions
diff --git a/roles/add-sshkey/tasks/main.yaml b/roles/add-sshkey/tasks/main.yaml
index 74e9f23..facb504 100644
--- a/roles/add-sshkey/tasks/main.yaml
+++ b/roles/add-sshkey/tasks/main.yaml
@@ -1,3 +1,9 @@
+- name: Ensure that ssh home directory exists
+ file:
+ path: "~/.ssh"
+ state: directory
+ mode: 0700
+
- name: Write out ssh key
copy:
dest: "~/.ssh/id_rsa"