Hey,

 I have a dynamic inventory script. The script sets these variables...

"Server01"{        
        "ansible_host": "xxx.xxx.xxx.xxx",
        "ansible_ssh_host": "xxx.xxx.xxx.xxx",
        "ansible_ssh_pass": "xxxxxxxxxxxx",
}

That way when you spin up a new cloud host you can immediately call a role 
or playbook on it. I have set up a role using the user module and have used 
it to set up a new ansible user and ssh key and tested it by sshing from 
the cmd line to the machine. The problem I have is that I changed the root 
password on that box and now all ansible task's fail because it's 
defaulting to the ansible_ssh_pass.

ansible Test -m ping
Server01 | UNREACHABLE! => {
    "changed": false,
    "msg": "ERROR! Authentication failure.",
    "unreachable": true
}



 Do I have something I can change in mmy playbook or cmd line to make it 
try ssh via key and not password? 

Thanks,
Levi

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/eda70498-b1c7-453a-aefe-27f6fce7cc60%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to