2017-04-13 1 views
0

Meine Gastgeber scheitern:ansible -i Hosts alle -u root -m ping -vvvv

➜ ansible cat hosts 
[Production] 
60.205.94.138 

Mein ansible.cfg:

➜ ansible cat ansible.cfg 
[Production] 
60.205.94.138 ansible_ssh_private_key_file=/Users/yuanyuan/.ssh/yyb 

Mein Befehl, und seine Ergebnisse:

enter image description here

Der SSH-Befehl:

ssh-copy-id -i ~/.ssh/yyb.pub [email protected] 

Was ist das Problem?

Antwort

1

Sie verwenden ansible.cfg falsch. Der Inhalt, den Sie dort haben, sollte in Ihrer Hosts-Datei sein.

Versuchen hosts:

[Production] 
60.205.94.138 ansible_ssh_private_key_file=/Users/yuanyuan/.ssh/yyb 

und:

$ ansible all -i hosts -u root -m ping 
+0

Es work.I zu Tränen gerührt wurde –

Verwandte Themen