New Year Sale 2026! 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

Actual exam question for RedHat's EX294 exam
Question #: 62
Topic #: 5
[All EX294 Questions]

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

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

0/2000 characters
Elvera
2 months ago
Not sure if I trust that base URL, looks sketchy.
upvoted 0 times
...
Merilyn
2 months ago
I thought you had to manually create repos, this is a game changer!
upvoted 0 times
...
Carlton
2 months ago
Just ran the command, worked like a charm!
upvoted 0 times
...
Shelton
3 months ago
Wait, did you say GPG checking is enabled? That's awesome!
upvoted 0 times
...
Adria
3 months ago
I love how simple Ansible makes this!
upvoted 0 times
...
Tamesha
3 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.
upvoted 0 times
...
Stephaine
3 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?
upvoted 0 times
...
Carol
4 months 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.
upvoted 0 times
...
Tatum
4 months 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.
upvoted 0 times
...
Shalon
4 months 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.
upvoted 0 times
...
Goldie
4 months 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.
upvoted 0 times
...
Yolando
4 months 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.
upvoted 0 times
...
Dewitt
5 months 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.
upvoted 0 times
...
Junita
5 months 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.
upvoted 0 times
...
Irving
9 months 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!
upvoted 0 times
Staci
8 months ago
It's impressive how they managed to make the whole process so efficient.
upvoted 0 times
...
Bettyann
8 months ago
I wish I had the skills to come up with something like this.
upvoted 0 times
...
Juliann
9 months ago
Definitely! Whoever wrote this script must be an Ansible genius.
upvoted 0 times
...
Wilda
9 months ago
I know right! This script is so well-written, it's like a work of art.
upvoted 0 times
...
...
Terrilyn
9 months 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!
upvoted 0 times
Mitzie
8 months ago
I agree, practicing with Ansible ad-hoc commands will definitely help us become more efficient sysadmins.
upvoted 0 times
...
Samira
8 months ago
Yes, Ansible ad-hoc commands definitely simplify the process of managing configurations across multiple servers.
upvoted 0 times
...
Valda
9 months ago
That script looks really useful for setting up yum repositories on multiple nodes.
upvoted 0 times
...
...
Brande
10 months 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!
upvoted 0 times
Jerry
9 months ago
Carmela: Plus, it gives you peace of mind knowing everything is set up as intended.
upvoted 0 times
...
Carmela
9 months ago
User 2: Definitely, it's always good to have a verification step in place.
upvoted 0 times
...
Verda
9 months ago
User 1: I agree, it's a smart way to make sure the repositories were created correctly.
upvoted 0 times
...
...
Elke
10 months 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?
upvoted 0 times
Virgie
9 months ago
User1
upvoted 0 times
...
Natalya
9 months ago
User2
upvoted 0 times
...
Dominga
10 months ago
User1
upvoted 0 times
...
...
Elke
10 months 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.
upvoted 0 times
Tammara
10 months ago
Absolutely, it saves a lot of time and ensures consistency across all nodes.
upvoted 0 times
...
...
Ellen
11 months 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.
upvoted 0 times
...
Meaghan
11 months ago
I agree with you, Omer. It helps in automating the process and ensures consistency across all managed nodes.
upvoted 0 times
...
Omer
11 months ago
I think creating the Ansible ad-hoc command for setting up yum repositories is important for managing nodes efficiently.
upvoted 0 times
...

Save Cancel