From 59e2789df07eed521b9182122dbe7bb3919c52b5 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Mon, 1 Feb 2021 07:26:54 -0600 Subject: [PATCH] Ask for password then pass it to the ssh-copy-id. Hoping prompt does not need moved to local.yml. --- tasks/general/acct_mgmt/keys.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tasks/general/acct_mgmt/keys.yml b/tasks/general/acct_mgmt/keys.yml index 4c3ac51..6e22cce 100644 --- a/tasks/general/acct_mgmt/keys.yml +++ b/tasks/general/acct_mgmt/keys.yml @@ -12,7 +12,13 @@ executable: /bin/bash ignore_errors: yes +- vars_prompt: + - name: leet_passwd + prompt: 'Enter password for 1337 share: ' + unsafe: yes + private: yes + - name: SSH Key | Root | Copy to 1337 shell: ssh-copy-id -f -i /root/.ssh/id_rsa ling@leet args: - executable: /bin/bash \ No newline at end of file + stdin: "{{ leet_passwd }}" \ No newline at end of file