I just took the RHCSA yesterday and unfortunately I didn't pass by a couple questions. I was wondering if the dnf config-manager --add-repo would be counted as correct instead of adding the repo file manually?
It matters not how you get there, as long as it is done in accordance with the instructions. You must achieve the stated objective, which may include specific settings.
I'll put this in the context of the RH124 class, which covers this topic.
Using just dnf config-manager --add-repo may not result in the desired settings. For example, RH124 lab instructions say this:
On the serverb machine, configure a software repository to obtain updates. Name the repository errata and configure the repository in the /etc/yum.repos.d/errata.repo file. Configure the errata.repo file to use the http://content.example.com/rhel9.0/x86_64/rhcsa-practice/errata repository. Do not verify GPG signatures.
If you were to only use this command, you will not have achieved the objective:
dnf config-manager --add-repo=http://content.example.com/rhel9.0/x86_64/rhcsa-practice/errata
So why doesn't this meet the requirement? Well, for a number of reasons:
> The file name in /etc/yum.repos.d/ will be incorrect. Instead of being named as errata.repo, in accordance with the instructions, it will be named: content.example.com_rhel9.0_x86_64_rhcsa-practice_errata.repo
> The repoID will be incorrect. Intead of [errata], it'll be [content.example.com_rhel9.0_x86_64_rhcsa-practice_errata]
> The name directive may be incorrect (it depends on the instructions). Instead of something like name=Red Hat Updates, it'll be: name=created by dnf config-manager from http://content.example.com/rhel9.0/x86_64/rhcsa-practice/errata
> the command does do anything with this instruction: Do not verify GPG signatures. The following line will be missing: gpgcheck=0
So what do you do? Well, you'd have to rename and edit the repo file.
I like to use dnf config-manager --add-repo to first create the file, then go behind it and rename / edit it to meet the instructions.
Incidentally, will the file still work (assuming no typos un the URL)? Sure it will. However, it won't meet the specific requirements as set forth in the instructions.
@ckowasic AFAIK, you can use anything available in the exam env and at the end all that matters is you fulfill the objective and the configuration survives reboot. RH exam does not favour any particular method to achieve an objective unless it is specifically and explicitly mentioned in the question.
It matters not how you get there, as long as it is done in accordance with the instructions. You must achieve the stated objective, which may include specific settings.
I'll put this in the context of the RH124 class, which covers this topic.
Using just dnf config-manager --add-repo may not result in the desired settings. For example, RH124 lab instructions say this:
On the serverb machine, configure a software repository to obtain updates. Name the repository errata and configure the repository in the /etc/yum.repos.d/errata.repo file. Configure the errata.repo file to use the http://content.example.com/rhel9.0/x86_64/rhcsa-practice/errata repository. Do not verify GPG signatures.
If you were to only use this command, you will not have achieved the objective:
dnf config-manager --add-repo=http://content.example.com/rhel9.0/x86_64/rhcsa-practice/errata
So why doesn't this meet the requirement? Well, for a number of reasons:
> The file name in /etc/yum.repos.d/ will be incorrect. Instead of being named as errata.repo, in accordance with the instructions, it will be named: content.example.com_rhel9.0_x86_64_rhcsa-practice_errata.repo
> The repoID will be incorrect. Intead of [errata], it'll be [content.example.com_rhel9.0_x86_64_rhcsa-practice_errata]
> The name directive may be incorrect (it depends on the instructions). Instead of something like name=Red Hat Updates, it'll be: name=created by dnf config-manager from http://content.example.com/rhel9.0/x86_64/rhcsa-practice/errata
> the command does do anything with this instruction: Do not verify GPG signatures. The following line will be missing: gpgcheck=0
So what do you do? Well, you'd have to rename and edit the repo file.
I like to use dnf config-manager --add-repo to first create the file, then go behind it and rename / edit it to meet the instructions.
Incidentally, will the file still work (assuming no typos un the URL)? Sure it will. However, it won't meet the specific requirements as set forth in the instructions.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.