Highlighted
Flight Engineer
Flight Engineer
  • 724 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
Highlighted
Moderator
Moderator
  • 710 Views

Re: RH294 Chapter2

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
Reply
Loading...
Highlighted
Flight Engineer
Flight Engineer
  • 700 Views

Re: RH294 Chapter2

I am using

RH294

Red Hat System Administrator III

Linux Automation

Student Workbook

Edition 1

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

0 Kudos
Reply
Loading...
Highlighted
Flight Engineer
Flight Engineer
  • 697 Views

Re: RH294 Chapter2

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
Reply
Loading...
Highlighted
Moderator
Moderator
  • 669 Views

Re: RH294 Chapter2

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
Reply
Loading...
Join the discussion
You must log in to join this conversation.