Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

RedHat EX294 Exam - Topic 6 Question 54 Discussion

Posted by Anastacia on Sep 13, 2024 at 02:57 PM

Create a playbook called hwreport.yml that produces an output file called /root/

hwreport.txt on all managed nodes with the following information:

------------------------------------------------------------------------------------------------------

--> Inventory host name

--> Total memory in MB

--> BIOS version

--> Size of disk device vda

--> Size of disk device vdb

Each line of the output file contains a single key-value pair.

* Your playbook should:

--> Download the file hwreport.empty from the URL http://classroom.example.com/

hwreport.empty and

save it as /root/hwreport.txt

--> Modify with the correct values.

note: If a hardware item does not exist, the associated value should be set to NONE

----------------------------------------------------------------------------------------------

while practising you to create these file hear. But in exam have to download as per

questation.

hwreport.txt file consists.

my_sys=hostname

my_BIOS=biosversion

my_MEMORY=memory

my_vda=vdasize

my_vdb=vdbsize

Suggested Answer: A

Get Premium EX294 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
27 comments · newest first
RO
Royal 11 months ago
This is a solid approach, but I'm not sure about the error handling part.
AA
Aaron 12 months ago
Wait, does it really set values to NONE if the hardware is missing?
PO
Portia 12 months ago
I think the URL in the playbook is wrong.
VA
Val 1 year ago
Totally agree, but what if vdb doesn't exist?
RA
Raymon 1 year ago
Sounds straightforward, just need to pull the right facts.
JA
Janine 1 year ago
I recall we had to use a loop for replacing multiple values in a file, so I hope I can remember how to set that up correctly in this playbook.
AR
Arlette 1 year ago
I feel confident about downloading the file with get_url, but I’m worried I might mix up the variables for memory and BIOS version in the output.
HA
Hayley 1 year ago
I think we did a similar question where we had to check for device sizes, but I’m not clear on how to handle the "NONE" value if a device doesn’t exist.
AS
Ashley 1 year ago
I remember we practiced creating playbooks that gather system information, but I’m a bit unsure about the exact syntax for the replace module.
VE
Velda 1 year ago
This exam question looks pretty straightforward, but I want to make sure I don't miss anything. I'm going to carefully read through the requirements one more time to make sure I understand exactly what I need to do. Then I'll start building out the playbook step-by-step.
EL
Elinore 1 year ago
Okay, I think I've got a good strategy for this. First, I'll use the get_url module to download the hwreport.empty file. Then, I'll use the replace module to swap out the placeholders with the actual system facts. And if any of the hardware items don't exist, I'll set the value to "NONE". Feels like a good plan!
JU
Junita 1 year ago
Hmm, I'm a bit confused about the part where we need to set the values to "NONE" if the hardware item doesn't exist. Not sure how to handle that properly in the playbook. Might need to do some research on the Ansible replace module.
AN
Annmarie 1 year ago
This looks like a pretty straightforward task. I think I can handle this - just need to download the file, replace the placeholders with the actual system information, and save the output. Shouldn't be too difficult.
MA
Madelyn 2 years ago
The playbook looks great, but I'm a little worried about the `ignore_errors` setting. What if something goes wrong during the execution, and we miss important information in the output file? Maybe we could add some error handling instead.
SI
Simona 1 year ago
↳ replying to Madelyn
Yes, using 'block' and 'rescue' will make the playbook more robust and reliable during execution.
DE
Desiree 1 year ago
↳ replying to Madelyn
Adding error handling will definitely make the playbook more robust and reliable.
LA
Lashandra 1 year ago
↳ replying to Madelyn
That's a good idea. We can also use 'block' and 'rescue' keywords to group tasks and handle errors more efficiently.
CH
Charlene 1 year ago
↳ replying to Madelyn
We could also consider using 'block' and 'rescue' to group tasks and handle errors more efficiently.
SH
Shenika 1 year ago
↳ replying to Madelyn
We can add a 'failed_when' condition to the tasks to handle errors and ensure important information is not missed.
GR
Graciela 1 year ago
↳ replying to Madelyn
That's a good point. We should make sure to capture any errors that occur during the execution.
MY
Myra 2 years ago
↳ replying to Madelyn
We can add a 'failed_when' condition to the tasks to handle errors more effectively.
DO
Doug 2 years ago
Eve
EV
Evan 1 year ago
↳ replying to Doug
What should be done if a hardware item does not exist?
ME
Melynda 1 year ago
↳ replying to Doug
What is the next step after creating the playbook?
OL
Oliva 2 years ago
Yes, the playbook steps are well explained with the necessary tasks.
QU
Quentin 2 years ago
I agree, but the solution provided seems clear.
OL
Oliva 2 years ago
I think this question is tricky.
0/2000 characters

Save Cancel