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 5 Question 62 Discussion

Posted by Camellia on Mar 23, 2025 at 05:18 AM

Create and run an Ansible ad-hoc command.

--> As a system administrator, you will need to install software on the managed

nodes.

--> Create a shell script called yum-pack.sh that runs an Ansible ad-hoc command to

create yum-repository on each of the managed nodes as follows:

--> repository1

-----------

1. The name of the repository is EX407

2. The description is "Ex407 Description"

3. The base URL is http://content.example.com/rhel8.0/x86_64/dvd/BaseOS/

4. GPG signature checking is enabled

5. The GPG key URL is http://content.example.com/rhel8.0/x86_64/dvd/RPM-GPG-KEYredhat-

release

6. The repository is enabled

--> repository2

-----------

1. The name of the repository is EXX407

2. The description is "Exx407 Description"

3. The base URL is http://content.example.com/rhel8.0/x86_64/dvd/AppStream/

4. GPG signature checking is enabled

5. The GPG key URL is http://content.example.com/rhel8.0/x86_64/dvd/ RPM-GPG-KEYredhat-

release

6. The repository is enabled

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
36 comments · newest first
EL
Elvera 11 months ago
Not sure if I trust that base URL, looks sketchy.
ME
Merilyn 11 months ago
I thought you had to manually create repos, this is a game changer!
CA
Carlton 11 months ago
Just ran the command, worked like a charm!
SH
Shelton 11 months ago
Wait, did you say GPG checking is enabled? That's awesome!
AD
Adria 11 months ago
I love how simple Ansible makes this!
TA
Tamesha 12 months ago
I remember we had to make the script executable with `chmod +x`, but I'm unsure if I need to run the command as root or not.
ST
Stephaine 12 months ago
I feel a bit confused about the order of parameters in the ad-hoc command. Did we cover if the description should be in quotes or not?
CA
Carol 1 year ago
I practiced a similar question where we had to create a repository, but I can't recall if I need to specify the GPG key URL correctly in the command.
TA
Tatum 1 year ago
I think I remember how to use the `yum_repository` module, but I'm not sure about the exact syntax for the ad-hoc command.
SH
Shalon 1 year ago
Alright, let's do this. I'll create the shell script, run the Ansible commands, and verify the repositories are set up correctly. Shouldn't be too difficult.
GO
Goldie 1 year ago
Okay, this seems doable. I'll need to be careful with the URLs and GPG key details, but I think I can get this done.
YO
Yolando 1 year ago
No problem, I've done this kind of thing before. I'll just need to make sure I have the repository details correct and that the script runs without any issues.
DE
Dewitt 1 year ago
Hmm, I'm a bit unsure about the exact syntax for the Ansible ad-hoc commands. I'll need to review the module documentation to make sure I get the parameters right.
JU
Junita 1 year ago
This looks pretty straightforward. I think I can handle this. I'll just need to create the shell script and run the Ansible ad-hoc commands as specified.
IR
Irving 1 year ago
I bet the person who wrote this script has a Ph.D. in 'Ansible Awesomeness'. I mean, who else would come up with such a slick solution? Kudos to them!
ST
Staci 1 year ago
↳ replying to Irving
It's impressive how they managed to make the whole process so efficient.
BE
Bettyann 1 year ago
↳ replying to Irving
I wish I had the skills to come up with something like this.
JU
Juliann 1 year ago
↳ replying to Irving
Definitely! Whoever wrote this script must be an Ansible genius.
WI
Wilda 1 year ago
↳ replying to Irving
I know right! This script is so well-written, it's like a work of art.
TE
Terrilyn 1 year ago
This is exactly the kind of task I was hoping to learn about. I can see how using Ansible ad-hoc commands can make our lives as sysadmins much easier. Time to start practicing!
MI
Mitzie 1 year ago
↳ replying to Terrilyn
I agree, practicing with Ansible ad-hoc commands will definitely help us become more efficient sysadmins.
SA
Samira 1 year ago
↳ replying to Terrilyn
Yes, Ansible ad-hoc commands definitely simplify the process of managing configurations across multiple servers.
VA
Valda 1 year ago
↳ replying to Terrilyn
That script looks really useful for setting up yum repositories on multiple nodes.
BR
Brande 2 years ago
Haha, I love the idea of running 'yum repolist all' at the end to verify that everything worked as expected. It's like a built-in quality check!
JE
Jerry 1 year ago
↳ replying to Brande
Carmela: Plus, it gives you peace of mind knowing everything is set up as intended.
CA
Carmela 1 year ago
↳ replying to Brande
User 2: Definitely, it's always good to have a verification step in place.
VE
Verda 1 year ago
↳ replying to Brande
User 1: I agree, it's a smart way to make sure the repositories were created correctly.
EL
Elke 2 years ago
Hmm, I wonder if there's a way to make the script more dynamic, so we can easily add or modify the repo details without having to update the script itself. Maybe using a config file or something?
VI
Virgie 1 year ago
↳ replying to Elke
User1
NA
Natalya 1 year ago
↳ replying to Elke
User2
DO
Dominga 2 years ago
↳ replying to Elke
User1
EL
Elke 2 years ago
Wow, this is a great way to automate the creation of Yum repositories across multiple nodes. I like how the script uses Ansible ad-hoc commands to make it easy to deploy and manage the repos.
TA
Tammara 2 years ago
↳ replying to Elke
Absolutely, it saves a lot of time and ensures consistency across all nodes.
EL
Ellen 2 years ago
I feel confident about running the shell script yum-pack.sh as it simplifies the task of creating and enabling repositories on multiple nodes.
ME
Meaghan 2 years ago
I agree with you, Omer. It helps in automating the process and ensures consistency across all managed nodes.
OM
Omer 2 years ago
I think creating the Ansible ad-hoc command for setting up yum repositories is important for managing nodes efficiently.
0/2000 characters

Save Cancel