cancel
Showing results for 
Search instead for 
Did you mean: 
zak1
Mission Specialist
Mission Specialist
  • 310 Views

Ansible...RH294 Version 9 Chapter 6, Section 6.5 Lab grade fails at Apache..

Jump to solution

lab grade fails and i have no idea why ?

 

zak1_0-1732511814544.png

Please help - just have 7 days to complete the self-paced course

Tags (2)
2 Solutions

Accepted Solutions
zak1
Mission Specialist
Mission Specialist
  • 256 Views

So I went thru the instructor's video and did what he said....used import_tasks instead of ansible,builtin.import_tasks in PLAYBOOK.YML and it succeeded.

 

zak1_0-1732517621737.png

zak1_1-1732517748248.png

SUCCESS !!!!!

 

View solution in original post

Travis
Moderator
Moderator
  • 184 Views

@zak1 -

Actually the ansible,builtin.import_tasks should have worked. However, your problem was more fundamental in that you accidentally mixed things up in the solution. The import_tasks is meant to be used in a playbook to import a list of tasks. From what I can tell, you did have an import_tasks for the server setup, but there were no tasks imported for the Firewall setup which means while everything is up and running you couldn't connect properly and return content.

So this image has the HTTPD Server installation only

Travis_0-1732543432446.png

 

So that would be the imported tasks for installing the Apache webserver and setting up the firewall rules. I see nothing from your original above that opened up the firewall rules. I have a feeling since the grading occurs from workstation it was unable to connect and being blocked by the firewall. One way you could have checked was go to the ServerX individually and doing a curl localhost. My guess is when you went back and changed things how the instructor did things that you had created the correct firewall rules and imported the firewall tasks which allowed the grading to pass. Technically, the import_tasks is the same as ansible.builtin.import_tasks as it is part of the Ansible core collection of modules. It is generally best practice to use the fully-qualified collection name (FQCN) even for built-in collections and modules but instructors (like myself) often don't do that because of bad habits. I strive to always show FQCN, but I am horrible for some things (especially debug module).

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

View solution in original post

8 Replies
RH-Yamato
Mission Specialist
Mission Specialist
  • 302 Views

Thank you for your question.

From your description, we can conclude the following:

  1. Your playbook successfully connects to all four web servers at the IP level.
  2. The HTTP 403 error indicates that the HTTP service is running, and the firewall on port 80 is open. (If either the service wasn’t running or the port wasn’t open, you would likely encounter a “Page not found” or similar error instead.)

Based on these observations, it’s possible that the HTTP service on all web servers is unable to read or serve the intended web content. This may be related to a configuration issue in the web_tasks.yml playbook described in Chapter 6, Section 6.5 of the lab.

Specifically, check the section using ansible.builtin.copy. Ensure that all file paths, permissions, and ownerships are correctly defined to allow the web server to access and serve the files.

If this doesn’t resolve your issue or if you need further assistance, please feel free to reach out again.

Yamato Sakai
Learning & Development Senior Instructor
Red Hat Global Learning Service
Tags (2)
zak1
Mission Specialist
Mission Specialist
  • 294 Views

Thanks, Yamato stll going crazy here..... here's the web_tasks.yml. Please help:

zak1_0-1732513851567.png

 

 

RH-Yamato
Mission Specialist
Mission Specialist
  • 292 Views

Thank you for providing additional details.

At first glance, it appears there may be an issue with the module referenced in the sections highlighted in red. Additionally, the green-highlighted portion also seems to differ from what is expected.

Could you start by correcting these two areas and let us know if the issue persists?スクリーンショット 2024-11-25 14.55.53.png

Yamato Sakai
Learning & Development Senior Instructor
Red Hat Global Learning Service
zak1
Mission Specialist
Mission Specialist
  • 283 Views

I made it same as in the picture u showed on the right BUT the issue remains:

 

zak1_0-1732515172582.png

 

RH-Yamato
Mission Specialist
Mission Specialist
  • 272 Views

Hi @zak1 

Thank you very much reply us.

Could you share us the latest error message after you run the play?

Yamato Sakai
Learning & Development Senior Instructor
Red Hat Global Learning Service
zak1
Mission Specialist
Mission Specialist
  • 257 Views

So I went thru the instructor's video and did what he said....used import_tasks instead of ansible,builtin.import_tasks in PLAYBOOK.YML and it succeeded.

 

zak1_0-1732517621737.png

zak1_1-1732517748248.png

SUCCESS !!!!!

 

RH-Yamato
Mission Specialist
Mission Specialist
  • 255 Views

Congratulations, @zak1 

Yamato Sakai
Learning & Development Senior Instructor
Red Hat Global Learning Service
Travis
Moderator
Moderator
  • 185 Views

@zak1 -

Actually the ansible,builtin.import_tasks should have worked. However, your problem was more fundamental in that you accidentally mixed things up in the solution. The import_tasks is meant to be used in a playbook to import a list of tasks. From what I can tell, you did have an import_tasks for the server setup, but there were no tasks imported for the Firewall setup which means while everything is up and running you couldn't connect properly and return content.

So this image has the HTTPD Server installation only

Travis_0-1732543432446.png

 

So that would be the imported tasks for installing the Apache webserver and setting up the firewall rules. I see nothing from your original above that opened up the firewall rules. I have a feeling since the grading occurs from workstation it was unable to connect and being blocked by the firewall. One way you could have checked was go to the ServerX individually and doing a curl localhost. My guess is when you went back and changed things how the instructor did things that you had created the correct firewall rules and imported the firewall tasks which allowed the grading to pass. Technically, the import_tasks is the same as ansible.builtin.import_tasks as it is part of the Ansible core collection of modules. It is generally best practice to use the fully-qualified collection name (FQCN) even for built-in collections and modules but instructors (like myself) often don't do that because of bad habits. I strive to always show FQCN, but I am horrible for some things (especially debug module).

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
Join the discussion
You must log in to join this conversation.