add-build-sshkey: call cmd with command
Currently a new cmd shell is opened instead of running the command supplied when adding the build key for ssh enabled windows nodes. Fix this by adding a '/c' flag. Change-Id: I582febfe91d5dc229cc6a1959477a461a237336b
This commit is contained in:
@@ -16,9 +16,9 @@
|
|||||||
|
|
||||||
echo "Add build ssh keys to authorized_keys"
|
echo "Add build ssh keys to authorized_keys"
|
||||||
{% if win_admin_ssh | default(false) %}
|
{% if win_admin_ssh | default(false) %}
|
||||||
ssh -o BatchMode=yes {{ ansible_user }}@{{ ansible_host }} cmd "type .ssh\\id_rsa.pub >> %programdata%\\ssh\\administrators_authorized_keys"
|
ssh -o BatchMode=yes {{ ansible_user }}@{{ ansible_host }} cmd /c "type .ssh\\id_rsa.pub >> %programdata%\\ssh\\administrators_authorized_keys"
|
||||||
{% else %}
|
{% else %}
|
||||||
ssh -o BatchMode=yes {{ ansible_user }}@{{ ansible_host }} cmd "type .ssh\\id_rsa.pub >> .ssh\\authorized_keys"
|
ssh -o BatchMode=yes {{ ansible_user }}@{{ ansible_host }} cmd /c "type .ssh\\id_rsa.pub >> .ssh\\authorized_keys"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
register: windows_remote_ssh
|
register: windows_remote_ssh
|
||||||
# Ignore errors here because this should not break non-ssh enabled windows hosts
|
# Ignore errors here because this should not break non-ssh enabled windows hosts
|
||||||
|
|||||||
Reference in New Issue
Block a user