cancel
Showing results for 
Search instead for 
Did you mean: 
Tanveer
Flight Engineer
Flight Engineer
  • 2,455 Views

RH294 Chapter2

Dear all,

As-salamu alaykum,

[ansible@ibadi chapter2-review]$ cat ansible.cfg
[defaults]
remote_user=devops
inventory=./inventory/inventory

[privilege_escalation]
become=False
become_method=sudo
become_user=root
become_ask_pass=False


[ansible@ibadi chapter2-review]$ cat inventory/inventory
[ex]
controller
node1


[ansible@ibadi chapter2-review]$ ansible -i ./inventory/inventory controller -m command -a id
controller | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: devops@controller: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).",
"unreachable": true
}
[ansible@ibadi chapter2-review]$

 

it looks like ssh error, and i am trying to ssh by devops user it is working but when i am trying to run this playbook getting this error?

please let me know the solution , is there anyone who has completed RH-294 chapter's 2 LAB.

Labels (1)
0 Kudos
4 Replies
JS_Learning
Moderator
Moderator
  • 2,441 Views

What guide are you following? I did RH294 and there were no hosts called "controller"...

Seems an issue with SSH, try adding:

ask_pass = true

 

0 Kudos
Tanveer
Flight Engineer
Flight Engineer
  • 2,431 Views

I am using

RH294

Red Hat System Administrator III

Linux Automation

Student Workbook

Edition 1

(Rlease RHEL8.0-en-1-20190531)

0 Kudos
Tanveer
Flight Engineer
Flight Engineer
  • 2,428 Views

Please know that this is my home lab and controller host is like workstation in book and node1 is like servera.lab.example.com

 

0 Kudos
JS_Learning
Moderator
Moderator
  • 2,400 Views

Hi,

Ok, it's strange not to use the same lab, but ok.

It really seems to be ssh related so check the verbose debug "ssh -v"?

 

0 Kudos
Join the discussion
You must log in to join this conversation.