cancel
Showing results for 
Search instead for 
Did you mean: 
zak1
Flight Engineer
Flight Engineer
  • 538 Views

RH294 Section 10.4: Lab: Managing Linux Hosts and Using System Roles

Hello support,

 

in review-cr3 module:

i created this storage.yml

zak1_0-1732849797044.png

 

when i run ansible-navigator run -m stdout storage.yml

i get this at the end:

zak1_1-1732850013024.png

 

I xhecked the yml in yamllint.com as well.  it says it is valid but then why is my storage.yml failing?

10 Replies
zak1
Flight Engineer
Flight Engineer
  • 424 Views

Any one? Help pls?

Travis
Moderator
Moderator
  • 401 Views

@zak1 -

 

TLDR:  Double check variables and spelling as there are lots of things undefined (but that isn't always bad). The other thing that might be wrong is towards the end, it mentions /dev/vdb has existing formatting and volumes (indicates previous things might not be cleaned up). I would suggest running using parted/fdisk or something to wipe the VDB disk and running the playbook again. If that doesn't work, look at the items below.

 

ansible-lint and the ansible --syntax-check only look for formatting issues and large issues. Just because it passes doesn't mean you have a good playbook. In your case, you were to create a playbook using the storage role. Since you are using a role, and not modules, you need to account for that as the roles take variables so I believe you are missing the entire "VARS" section. You provided the "ROLE NAME" like you would an ansible module, but when using the "ROLE" you need all the vars required so you can pass the variables to the role. I am not looking at the course content, just your playbook and the error. I've also provided a blog post that can help. I haven't found your exact error, but I suspect you are missing a variable that is needed.

The Blog post does things slightly different as you can specify the "VARS" at a play level or a role level. My suggested fix is the role level, but it is up to you how you want to do it. The important thing is that the ROLE sees the variables so it can use them. Right now, you are getting errors because nothing is defined for the ROLE.

 

https://www.redhat.com/en/blog/automating-storage-management-rhel-system-roles

https://www.redhat.com/en/blog/rhel-system-roles

https://www.redhat.com/en/blog/introduction-rhel-system-roles

 

 

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
zak1
Flight Engineer
Flight Engineer
  • 389 Views

Hi Travis, thank so much for helping.

i wiped /dev/vdb on target host servera - recreated it yet...

Now i m getting this ..something new

 

 

zak1_0-1732904710746.png

 

Chetan_Tiwary_
Community Manager
Community Manager
  • 375 Views

@zak1 loooks like there is a wrong parameter or typo in the blivet yaml :

Chetan_Tiwary__0-1732906514428.png

the supported ones are these :

Chetan_Tiwary__1-1732906560800.png

However, let me also inform you that I was unable to reproduce this issue in my lab :

Chetan_Tiwary__2-1732906618962.png

As this is a comp -review lab, I strongly recommend you to delete your existing lab and recreate a fresh one. Then you can retry this one more time.

0 Kudos
zak1
Flight Engineer
Flight Engineer
  • 372 Views

Hi Chetanm I fixed that type but now i got something else. ;-(

 

zak1_0-1732907089278.png

 

zak1
Flight Engineer
Flight Engineer
  • 372 Views

also with -vvv option ...this is shown

zak1_0-1732907266217.png

 

 

zak1
Flight Engineer
Flight Engineer
  • 366 Views

Don't bother i solved it

did this on servera 

 

dd if=/dev/zero of=/dev/sdb bs=1M count=10

Chetan_Tiwary_
Community Manager
Community Manager
  • 353 Views

ok @zak1 glad that you got it and I hope you are able to move past this step.

0 Kudos
Chetan_Tiwary_
Community Manager
Community Manager
  • 364 Views

@zak1 you are again back to the same error that you posted in the original post.

Please follow what I recommend :

1. go to your lab env - click on "Delete".

2. Once your labs are deleted, click on "Create".

3. When your lab VMs are active - please proceed with the lab exercise from lab start script.

4. You dont need to touch any of the role tasks, you have to "Write a playbook named storage.yml that uses the redhat.rhel_system_roles.storage system role to configure logical volumes for the managed hosts in the webservers group specified by the inventory file in your project directory".

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