1 / 11

RedHat EX447 Practice Test Questions

PassQuestion team collected RedHat EX447 Practice Test Questions from real test to help you prepare for your test efficiently.

Download Presentation

RedHat EX447 Practice Test Questions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EX447 Free Questions EX447 Free Questions Red Hat Certified Specialist in Advanced Red Hat Certified Specialist in Advanced Automation: Ansible Best Practices Automation: Ansible Best Practices https://www.passquestion.com/ https://www.passquestion.com/EX447 EX447.html .html

  2. Question 1 Question 1 CORRECT TEXT CORRECT TEXT Create a file calledadhoc.shin/home/sandy/ansiblewhich will use adhoc commands to set up anew Create a file calledadhoc.shin/home/sandy/ansiblewhich will use adhoc commands to set up anew repository. The name of the repo will be 'EPEL' the description 'RHEL8' the baseurl repository. The name of the repo will be 'EPEL' the description 'RHEL8' the baseurl is'https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rmp'there is no gpgcheck, but is'https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rmp'there is no gpgcheck, but you should enable the repo. you should enable the repo. * * You should be able to use an bash script using adhoc commands to enable repos. Depending on You should be able to use an bash script using adhoc commands to enable repos. Depending on your lab setup, you may need to make this repo "state=absent" after you pass this task. your lab setup, you may need to make this repo "state=absent" after you pass this task. Answer: Answer: chmod0777adhoc.sh chmod0777adhoc.sh vim adhoc.sh vim adhoc.sh #I/bin/bash #I/bin/bash ansible all -m yum_repository -a 'name=EPEL description=RHEL8 ansible all -m yum_repository -a 'name=EPEL description=RHEL8 baseurl=https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rmp gpgcheck=no baseurl=https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rmp gpgcheck=no enabled=yes' enabled=yes'

  3. Question 2 Question 2 CORRECT TEXT CORRECT TEXT Create a file calledrequirements.ymlin/home/sandy/ansible/rolesto install two roles. The source for Create a file calledrequirements.ymlin/home/sandy/ansible/rolesto install two roles. The source for the first role is geerlingguy.haproxy and geerlingguy.php. Name the first haproxy-role and the second the first role is geerlingguy.haproxy and geerlingguy.php. Name the first haproxy-role and the second php-role. The roles should be installed in /home/sandy/ansible/roles. php-role. The roles should be installed in /home/sandy/ansible/roles. Answer: Answer: in /home/sandy/ansible/roles in /home/sandy/ansible/roles vim requirements.yml vim requirements.yml Run the requirements file from the roles directory: Run the requirements file from the roles directory: ansible-galaxy install -r requirements.yml -p /home/sandy/ansible/roles ansible-galaxy install -r requirements.yml -p /home/sandy/ansible/roles

  4. Question 3 Question 3 CORRECT TEXT CORRECT TEXT Create an empty encrypted file calledmyvault.yml in /home/sandy/ansibleand set the Create an empty encrypted file calledmyvault.yml in /home/sandy/ansibleand set the passwordtonotsafepw. Rekey the passwordtoiwejfj2221. passwordtonotsafepw. Rekey the passwordtoiwejfj2221. Answer: Answer: ansible-vault create myvault.yml ansible-vault create myvault.yml Create new password: notsafepw Confirm password: notsafepwansible-vault rekey Create new password: notsafepw Confirm password: notsafepwansible-vault rekey myvault.yml myvault.yml Current password: notsafepw New password: iwejfj2221 Confirm password: iwejfj2221 Current password: notsafepw New password: iwejfj2221 Confirm password: iwejfj2221

  5. Question 4 Question 4 CORRECT TEXT CORRECT TEXT Create a playbook /home/bob /ansible/motd.yml that runs on all inventory hosts and docs the following: The Create a playbook /home/bob /ansible/motd.yml that runs on all inventory hosts and docs the following: The playbook should replaee any existing content of/etc/motd in the following text. Use ansible facts to display the playbook should replaee any existing content of/etc/motd in the following text. Use ansible facts to display the FQDN of each host FQDN of each host On hosts in the dev host group the line should be "Welcome to Dev Server FQDN". On hosts in the dev host group the line should be "Welcome to Dev Server FQDN". On hosts in the webserver host group the line should be "Welcome to Apache Server FQDN". On hosts in the webserver host group the line should be "Welcome to Apache Server FQDN". On hosts in the database host group the line should be "Welcome to MySQL Server FQDN". On hosts in the database host group the line should be "Welcome to MySQL Server FQDN". Answer: Answer: /home/sandy/ansible/apache.yml /home/sandy/ansible/apache.yml /home/sandy/ansible/roles/sample-apache/tasks/main.yml /home/sandy/ansible/roles/sample-apache/tasks/main.yml

  6. Question 5 Question 5 CORRECT TEXT CORRECT TEXT Create an ansible vault password file calledlock.ymlwith the passwordreallysafepwin the Create an ansible vault password file calledlock.ymlwith the passwordreallysafepwin the /home/sandy/ansibledirectory. In the lock.yml file define two variables. One ispw_devand the /home/sandy/ansibledirectory. In the lock.yml file define two variables. One ispw_devand the password is 'dev' and the otherpwis_mgrand the password is 'mgr' Create a regular file password is 'dev' and the otherpwis_mgrand the password is 'mgr' Create a regular file calledsecret.txtwhich contains the password for lock.yml. calledsecret.txtwhich contains the password for lock.yml. Answer: Answer: ansible-vault create lock.yml ansible-vault create lock.yml New Vault Password: reallysafepw New Vault Password: reallysafepw Confirm: reallysafepw Confirm: reallysafepw

  7. Question 6 Question 6 CORRECT TEXT CORRECT TEXT Create a playbook /home/bob/ansible/timesync.yml that runs on hosts in the webservers host group Create a playbook /home/bob/ansible/timesync.yml that runs on hosts in the webservers host group and does the following: and does the following: • Uses thetimesync RHEL system role. • Uses thetimesync RHEL system role. • Sets the ntp server to 0.uk.pool.ntp.org • Sets the ntp server to 0.uk.pool.ntp.org • Sets the timezone to UTC • Sets the timezone to UTC Answer: Answer: Solution as: Solution as:

  8. Question 7 Question 7 CORRECT TEXT CORRECT TEXT Create a file called mysecret.yml on the control host using ansible vault in home/bob/ansible. Set the password to Create a file called mysecret.yml on the control host using ansible vault in home/bob/ansible. Set the password to 'notasafepass' and inside the file create avariable called dev_pass with the value of devops. Save the file. Then go 'notasafepass' and inside the file create avariable called dev_pass with the value of devops. Save the file. Then go back in the file and change dev_pass value to devops123. Then change the vault password of mysecret.yml to back in the file and change dev_pass value to devops123. Then change the vault password of mysecret.yml to verysafepass verysafepass Answer: Answer: ansible-vault create lock.yml ansible-vault create lock.yml New Vault Password: reallysafepw New Vault Password: reallysafepw Confirm: reallysafepw Confirm: reallysafepw

  9. Question 8 Question 8 CORRECT TEXT CORRECT TEXT Create a playbook called regulartasks.yml which has the system that append the date to /root/datefile Create a playbook called regulartasks.yml which has the system that append the date to /root/datefile every day at noon. Name is job 'datejob' every day at noon. Name is job 'datejob' Answer: Answer: Solution as: Solution as:

  10. Question 9 Question 9 CORRECT TEXT CORRECT TEXT Using the Simulation Program, perform the following tasks: Using the Simulation Program, perform the following tasks: Ad-Hoc Ansible Commands (Number Two) Task: Ad-Hoc Ansible Commands (Number Two) Task: 1.Use the ad-hoc command to make sure php is installed. 1.Use the ad-hoc command to make sure php is installed. 2. Use the ad-hoc command to make sure that php is installed and is the latest version. 2. Use the ad-hoc command to make sure that php is installed and is the latest version. 3. Use the ad-hoc command to make sure that httpd is installed. 3. Use the ad-hoc command to make sure that httpd is installed. 4. Use the ad-hoc command to remove httpd fromthe servers. 4. Use the ad-hoc command to remove httpd fromthe servers. Answer: Answer: 1. ansible all -b -m yum -a 'name=php state=present' 1. ansible all -b -m yum -a 'name=php state=present' 2. ansible all -b -m yum -a 'name=php state=latest' 2. ansible all -b -m yum -a 'name=php state=latest' 3. ansible all -b -m yum -a 'name=httpd state=latest' 3. ansible all -b -m yum -a 'name=httpd state=latest' 4. ansibleall -b -m yum -a 'name=httpd state=absent' 4. ansibleall -b -m yum -a 'name=httpd state=absent'

  11. Question 10 Question 10 CORRECT TEXT CORRECT TEXT Create a playbookthatchanges the default target onallnodes tomulti-usertarqet. Do this in playbook Create a playbookthatchanges the default target onallnodes tomulti-usertarqet. Do this in playbook file called target.yml in /home/sandy/ansible file called target.yml in /home/sandy/ansible Answer: Answer: - name: change default target hosts: all - name: change default target hosts: all tasks: tasks: - name: change target file: - name: change target file: src:/usr/lib/systemd/system/multi-user.target dest: /etc/systemd/system/default.target state: link src:/usr/lib/systemd/system/multi-user.target dest: /etc/systemd/system/default.target state: link

More Related