4.7/5 - (4 votes)

[Dec-2022] Latest RedHat EX407 Certification Practice Test Questions

Verified EX407 Dumps Q&As – 1 Year Free & Quickly Updates

NEW QUESTION 15
Which of the following are valid ways to populate an Ansible Tower project with your source files?
(Choose all that apply.)

 
 
 
 

NEW QUESTION 16
Consider the following playbook:
# playbook name: /home/ansible/web.yml

– hosts: webservers
become: yes
tasks:
– name: edit file 1
lineinfile:
path: /var/www/content.hml line: “{{ text }}” tags:
– content
– name: edit file 2
lineinfile: path: /var/www/index.hml
line: “{{ text }}”
tags:
– web
– name: edit file 3
lineinfile:
path: /var/www/etc.hml
line: “{{ text }}”
tags: – content – misc
Which use of the ansible-playbook command on the provided playbook will result in ONLY editing the file / var/www/index.html?

 
 
 
 

NEW QUESTION 17
Create an ansible vault password file called lock.yml with the password reallysafepw in the /home/sandy/ansible directory. In the lock.yml file define two variables. One is pw_dev and the password is ‘dev’ and the other is pw_mgr and the password is ‘mgr’ Create a regular file called secret.txt which contains the password for lock.yml.

NEW QUESTION 18
State whether the following statement is true or false.
The following command can be used to filter facts to pull out the ip address for the target host.
ansible local -m setup -a “filter=ansible_default_ipv4”

 
 

NEW QUESTION 19
Create a playbook that changes the default target on all nodes to multi-user tarqet. Do this in playbook file called target.yml in /home/sandy/ansible

NEW QUESTION 20
===================================================================================
control.realmX.example.com _ workstation.lab.example.com
node1.realmX.example.com _ servera.lab.example.com
node2.realmX.example.com _ serverb.lab.example.com
node3.realmX.example.com _ serverc.lab.example.com
node4.realmX.example.com _ serverd.lab.example.com
node5.realmX.example.com
– username:root, password:redhat
– username:admin, password:redhat
note1. don’t change ‘root’ or ‘admin’ password.
note2. no need to create ssh-keygen for access, its pre-defined
note3. SELinux is in enforcing mode and firewalld is disabled/stop on whole managed hosts.
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

NEW QUESTION 21
Install and configure ansible
User sandy has been created on your control node with the appropriate permissions already, do not change or modify ssh keys. Install the necessary packages to run ansible on the control node. Configure ansible.cfg to be in folder /home/sandy/ansible/ansible.cfg and configure to access remote machines via the sandy user. All roles should be in the path /home/sandy/ansible/roles. The inventory path should be in /home/sandy/ansible/invenlory.
You will have access to 5 nodes.
node1.example.com
node2.example.com
node3.example.com
node4.example.com
node5.example.com
Configure these nodes to be in an inventory file where node I is a member of group dev. nodc2 is a member of group test, node3 is a member of group proxy, nodc4 and node 5 are members of group prod. Also, prod is a member of group webservers.

NEW QUESTION 22
State whether the following statement is true or false.
There is a 10 user trial available.

 
 

NEW QUESTION 23
Which of the following is a good use case for an ad-hoc command? (Choose all that apply.)

 
 
 
 

NEW QUESTION 24
Create a playbook called issue.yml in /home/sandy/ansible which changes the file /etc/issue on all managed nodes: If host is a member of (lev then write “Development” If host is a member of test then write “Test” If host is a member of prod then write “Production”

NEW QUESTION 25
State whether the following statement is true or false.
A template has a maximum of 10 variables.

 
 

NEW QUESTION 26
Which flags must be accepted as input for a dynamic inventory script?

 
 
 
 

NEW QUESTION 27
Using the Simulation Program, perform the following tasks:
1. Use an ansible ad-hoc command, check the connectivity of your servers.
2. Use an ad-hoc ansible command, find the free space of your servers.
3. Use an ad-hoc ansible command, find out the memory usage of your servers.
4. Do an ls -l on the targets /var/log/messages file.
5. Tail the contents of the targets /var/log/messages file.

NEW QUESTION 28
===================================================================================
control.realmX.example.com _ workstation.lab.example.com
node1.realmX.example.com _ servera.lab.example.com
node2.realmX.example.com _ serverb.lab.example.com
node3.realmX.example.com _ serverc.lab.example.com
node4.realmX.example.com _ serverd.lab.example.com
node5.realmX.example.com
– username:root, password:redhat
– username:admin, password:redhat
note1. don’t change ‘root’ or ‘admin’ password.
note2. no need to create ssh-keygen for access, its pre-defined
note3. SELinux is in enforcing mode and firewalld is disabled/stop on whole managed hosts.
Create user accounts
————————
–> A list of users to be created can be found in the file called user_list.yml
which you should download from http://classroom.example.com/user_list.yml and
save to /home/admin/ansible/
–> Using the password vault created elsewhere in this exam, create a playbook called
create_user.yml
that creates user accounts as follows:
–> Users with a job description of developer should be:
–> created on managed nodes in the “dev” and “test” host groups assigned the
password from the “dev_pass”
variable and these user should be member of supplementary group “devops”.
–> Users with a job description of manager should be:
–> created on managed nodes in the “prod” host group assigned the password from
the “mgr_pass” variable
and these user should be member of supplementary group “opsmgr”
–> Passwords should use the “SHA512” hash format. Your playbook should work using
the vault password file
created elsewhere in this exam.
while practising you to create these file hear. But in exam have to download as per
questation.
user_list.yml file consist:

user:
– name: user1
job: developer
– name: user2
job: manager

NEW QUESTION 29
How is Ansible Tower installed on your system?

 
 
 
 

NEW QUESTION 30
Create a role called sample-apache in /home/sandy/ansible/roles that enables and starts httpd, enables and starts the firewall and allows the webserver service. Create a template called index.html.j2 which creates and serves a message from /var/www/html/index.html Whenever the content of the file changes, restart the webserver service.
Welcome to [FQDN] on [IP]
Replace the FQDN with the fully qualified domain name and IP with the ip address of the node using ansible facts. Lastly, create a playbook in /home/sandy/ansible/ called apache.yml and use the role to serve the index file on webserver hosts.

NEW QUESTION 31
Create a file calledadhoc.shin/home/sandy/ansiblewhich will use adhoc commands to set up a new repository. The name of the repo will be ‘EPEL’ thedescription ‘RHEL8’ the baseurl 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 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.

NEW QUESTION 32
Create a role called sample-apache and store it in /home/bob/ansible/roles. The role should
satisfy the following requirements:
*In the role, install and enable httpd. Also enable the firewall to allow http. Also run the template
*index.html.j2 and make sure this runs Create a template index.html.j2 that displays “Welcome to the server HOSTNAME”
In a play called apache.yml in /home/bob/ansible/ run the sample-apache role.

NEW QUESTION 33
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 a variable 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 verysafepass

NEW QUESTION 34
Which of the following attributes specifies how a handler can be notified? (Choose all that apply.)

 
 
 
 

NEW QUESTION 35
Create a file called requirements.yml in /home/sandy/ansible/roles to install two roles. The source for 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.

NEW QUESTION 36
Create a playbook called webdev.yml . The playbook will create a directory Avcbdev on dev host. The permission of the directory are 2755 and owner is webdev. Create a symbolic link from
/Webdev to /var/www/html/webdev. Serve a file from Avebdev7index.html which displays the text
“Development” Curl http://node1.example.com/webdev/index.html to test

NEW QUESTION 37
What formats may variables specified on the command line use when not using a file with the -e flag? (Choose all that apply.)

 
 
 
 

NEW QUESTION 38
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’

NEW QUESTION 39
Create an empty encrypted file called myvault.yml in /home/sandy/ansible and set the password to notsafepw. Rekey the password to iwejfj2221.


Latest 2022 Realistic Verified EX407 Dumps – 100% Free EX407 Exam Dumps: https://www.surepassexams.com/EX407-exam-bootcamp.html

         

Related Links: myportal.utt.edu.tt myportal.utt.edu.tt www.stes.tyc.edu.tw myportal.utt.edu.tt myportal.utt.edu.tt myportal.utt.edu.tt

Leave a Reply

Your email address will not be published. Required fields are marked *

Enter the text from the image below