update
This commit is contained in:
11
ssh_key/authorized_keys.yml
Normal file
11
ssh_key/authorized_keys.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- hosts: cluster
|
||||
remote_user: root
|
||||
tasks:
|
||||
- name: key add
|
||||
authorized_key:
|
||||
user: root
|
||||
state: present
|
||||
key: "{{ lookup('file', lookup('env','HOME') + '/.ssh/id_rsa.pub') }}"
|
||||
manage_dir: False
|
||||
|
||||
5
ssh_key/key_test.sh
Executable file
5
ssh_key/key_test.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/expect -f
|
||||
spawn ssh-copy-id root@$argv
|
||||
expect "password:"
|
||||
send "password\n"
|
||||
expect eof
|
||||
Reference in New Issue
Block a user