cancel
Showing results for 
Search instead for 
Did you mean: 
TiffanyA
Flight Engineer
Flight Engineer
  • 1,783 Views

RH294 Chapter 10 Guided Exercise 5

Jump to solution

I'm back again with yet another question :) :

In chapter 10, on Guided Exercise #5 the 'ens4' interface being asked to use is not being recognized when I try and run the playbook. I should receive this output according to the workbook when veriyfing the configuration of ens4 interface:

Screen Shot 08-24-20 at 04.53 PM.PNG

Unfortunately, this is what I'm getting:

Screen Shot 08-24-20 at 04.02 PM.PNG

I'm not sure where I went wrong. My play gives me the below error:

Screen Shot 08-25-20 at 04.30 PM.PNG

Any advice would be appreciated!

"Success doesn't come from what you do occasionally, it comes from what you do consistently." ~Maria Forleo
Labels (3)
0 Kudos
2 Solutions

Accepted Solutions
Tracy_Baker
Starfighter Starfighter
Starfighter
  • 1,776 Views

It is because there is no ens34 adapter in servera.

In our NetLabs, the adapter is enp2s0
In other systems, it is enp8s0
In my home lab, it is enp1s0

You can ssh into servera and do an ip addr to see what it is in your case.

Or, from workstation: ssh servera 'ip addr | grep enp'

Or, using Ansible from workstation: ansible servera -m setup | grep interface

b.JPG

Once you have the proper adapter name, change the command to (using the above output):

ansible webservers -m setup -a 'filter=ansible_enp1s0'

Program Lead at Arizona's first Red Hat Academy, est. 2005
Estrella Mountain Community College

View solution in original post

TheOtherJFern
Mission Specialist
Mission Specialist
  • 1,771 Views

Every setup would be different as noted by Tracy_Baker

Find out what interface name your server has; two methods of several.

from any terminal$ ssh USER@servera "ifconfig "

from your ansible work directory$ ansible servera -a ifconfig
       where servera is in your inventory file

From the output locate the proper interface name and update the play.

View solution in original post

0 Kudos
3 Replies
Tracy_Baker
Starfighter Starfighter
Starfighter
  • 1,777 Views

It is because there is no ens34 adapter in servera.

In our NetLabs, the adapter is enp2s0
In other systems, it is enp8s0
In my home lab, it is enp1s0

You can ssh into servera and do an ip addr to see what it is in your case.

Or, from workstation: ssh servera 'ip addr | grep enp'

Or, using Ansible from workstation: ansible servera -m setup | grep interface

b.JPG

Once you have the proper adapter name, change the command to (using the above output):

ansible webservers -m setup -a 'filter=ansible_enp1s0'

Program Lead at Arizona's first Red Hat Academy, est. 2005
Estrella Mountain Community College
TheOtherJFern
Mission Specialist
Mission Specialist
  • 1,772 Views

Every setup would be different as noted by Tracy_Baker

Find out what interface name your server has; two methods of several.

from any terminal$ ssh USER@servera "ifconfig "

from your ansible work directory$ ansible servera -a ifconfig
       where servera is in your inventory file

From the output locate the proper interface name and update the play.

0 Kudos
TiffanyA
Flight Engineer
Flight Engineer
  • 1,761 Views

Ah, sweet success! Thank you  @Tracy_Baker and @TheOtherJFern for both the solution and explanation. I wish it was made more clear in the workbook (I literally thought I was supposed to use the given interface instead of finding it on servera) but then maybe this was something assumed students should already know. Either way, I now know how to find it myself! Thanks again!

"Success doesn't come from what you do occasionally, it comes from what you do consistently." ~Maria Forleo
0 Kudos
Join the discussion
You must log in to join this conversation.