playbooks/clone-repo: changed creating auto ssh add file and its path

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
This commit is contained in:
Marc Mattmüller 2023-06-13 10:50:47 +02:00
parent fcceaca96e
commit 0b66f54f97
1 changed files with 3 additions and 2 deletions

View File

@ -3,7 +3,7 @@
gather_facts: no
vars:
git_repo_path: "~/nwl-ci"
ssh_auto_sshadd_file: "~/auto-sshadd"
ssh_auto_sshadd_file: "./auto-sshadd"
ssh_keyfile: "~/.ssh/testvm_ed25519"
ssh_passphrase: !vault |
$ANSIBLE_VAULT;1.1;AES256
@ -26,7 +26,8 @@
- name: Prepare auto ssh-add file
register: prepareAutoSshAdd
ansible.builtin.shell: |
echo -e '#!/bin/bash\necho $SSH_PASS' > {{ ssh_auto_sshadd_file }}
echo '#!/bin/bash' > {{ ssh_auto_sshadd_file }}
echo 'echo $SSH_PASS' >> {{ ssh_auto_sshadd_file }}
chmod +x {{ ssh_auto_sshadd_file }}
when: not auto_sshadd_stat.stat.exists