EX294 · Question #2
EX294 Question #2: Real Exam Question with Answer & Explanation
The objective is to configure a system to use specific DNF/Yum repositories, ensuring they are enabled and GPG signature checks are enforced.
Question
02. Configure your system to use default repositories As a system administrator, you need to install software on managed nodes. Description: EX294 base software GPG signature check: Enabled Repository: Enabled Repository 2: Repository Name: EX294_STREAM Description: EX294 stream software GPG signature check: Enabled Repository: Enabled Correct Answer: See the below explanation Explanation Explanation/Reference: Solution: [Virtual Machine: 172.25.250.254|control] # Confirm all managed nodes [greg@control ansible]$ ansible-inventory --graph # Look up module names # Check module usage. ==/EX==, search for EXAMPLE in the manual [greg@control ansible]$ ansible-doc yum_repository # Set vim editor's indentation format [greg@control ansible]$ echo set nu ts=2 et cuc sw=2 autoindent > ~/.vimrc # Edit playbook [greg@control ansible]$ vim /home/greg/ansible/yum_repo.yml --- - name: create repository hosts: all tasks: - name: add BaseOS repo yum_repository: name: EX294_BASE description: "EX294 base software" gpgcheck: yes enabled: yes - name: add AppStream repo yum_repository: name: EX294_STREAM description: "EX294 stream software" gpgcheck: yes enabled: yes # Run playbook (New way of running playbook in Ansible, must do commands in lines 44-47 of Question 01) [greg@control ansible]$ ansible-navigator run yum_repo.yml -m stdout # Verify both repositories (BaseOS, AppStream, mandatory operation) # Verification: Check all nodes, if software installation is complete, it indicates successful configuration. [greg@control ansible]$ ansible all -a 'yum repoinfo' [greg@control ansible]$ ansible all -a 'yum -y install ftp' [greg@control ansible]$ ansible all -a 'rpm -q ftp'
Explanation
The objective is to configure a system to use specific DNF/Yum repositories, ensuring they are enabled and GPG signature checks are enforced.
Concept tested. Managing Yum/DNF repositories with Ansible
Reference. https://docs.ansible.com/ansible/latest/collections/ansible/builtin/yum_repository_module.html
Topics
Community Discussion
No community discussion yet for this question.