Hello All,
Just new to Ansible and trying to implement in our organozation.
Noticed this,
When ran ping from root user prompt by mentioning "delpoy" user , it errors
out.
++++++++++++++++++++++++++++++++++
[root@dev-armor21 ~]# ansible all -m ping --user=delpoy
dev-mado21 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: Permission denied
(publickey,gssapi-keyex,gssapi-with-mic,password).\r\n",
"unreachable": true
}
dev-pipe21 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: Permission denied
(publickey,gssapi-keyex,gssapi-with-mic,password).\r\n",
"unreachable": true
}
dev-mado22 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: Permission denied
(publickey,gssapi-keyex,gssapi-with-mic,password).\r\n",
"unreachable": true
}
localhost | SUCCESS => {
"changed": false,
"ping": "pong"
}
++++++++++++++++++++++++++++++++++
But when switch to deploy user and run ansible ping , it works fine
++++++++++++++++++++++++++++++++++
[root@dev-armor21 ~]# su - deploy
[deploy@dev-armor21 ~]$ ansible all -m ping
localhost | SUCCESS => {
"changed": false,
"ping": "pong"
}
dev-mado22 | SUCCESS => {
"changed": false,
"ping": "pong"
}
dev-pipe21 | SUCCESS => {
"changed": false,
"ping": "pong"
}
dev-mado21 | SUCCESS => {
"changed": false,
"ping": "pong"
}
[deploy@dev-armor21 ~]$
++++++++++++++++++++++++++++++++++
Is this expected or am I doing something wrong?
My objective is to run ansible command from root ( do not want to share
root keys to all hosts ) and with specific users .
Can this be achieved?
Regards,
Prakash.
--
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/b56274b5-a670-4a16-ba87-cc88e8436e50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.