EX407 Dumps

EX407 Free Practice Test

Red-Hat EX407: Red Hat Certified Specialist in Ansible Automation exam

QUESTION 1

CORRECT TEXT
=====================================================================
==============
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.
=====================================================================
==============
Modify file content.
------------------------
Create a playbook called /home/admin/ansible/modify.yml as follows:
* The playbook runs on all inventory hosts
* The playbook replaces the contents of /etc/issue with a single line of text as follows:
--> On hosts in the dev host group, the line reads: ??Development??
--> On hosts in the test host group, the line reads: ??Test??
--> On hosts in the prod host group, the line reads: ??Production??
Solution:
Solution as:
# pwd
/home/admin/ansible
# vim modify.yml
---
- name: hosts: all tasks:
- name: copy:
content: "Development" dest: /etc/issue
when: inventory_hostname in groups['dev']
- name: copy:
content: "Test" dest: /etc/issue
when: inventory_hostname in groups['test']
- name: copy:
content: "Production" dest: /etc/issue
when: inventory_hostname in groups['prod'] wq
# ansible-playbook modify.yml –-syntax-check
# ansible-playbook modify.yml

Does this meet the goal?

Correct Answer: A

QUESTION 2

CORRECT TEXT
Create a jinja template in /home/sandy/ansible/ and name it hosts.j2. Edit this file so it looks like the one below. The order of the nodes doesn't matter. Then create a playbook in
/home/sandy/ansible called hosts.yml and install the template on dev node at
/root/myhosts
EX407 dumps exhibit
Solution:
Solution as:
EX407 dumps exhibit

Does this meet the goal?

Correct Answer: A

QUESTION 3

CORRECT TEXT
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.
Solution:
* 1. ansible all -m ping
* 2. ansible all -a "/bin/df -h"
* 3. ansible all -a "/usr/bin/free"
* 4. ansible all -a "ls -l /var/log/messages"
* 5. ansible local -b -a "tail /var/log/messages"

Does this meet the goal?

Correct Answer: A

QUESTION 4

CORRECT TEXT
Create a file called packages.yml in /home/sandy/ansible to install some packages for the following hosts. On dev, prod and webservers install packages httpd, mod_ssl, and mariadb. On dev only install the development tools package. Also, on dev host update all the packages to the latest.
Solution:
Solution as:
EX407 dumps exhibit
** NOTE 1 a more acceptable answer is likely 'present' since it's not asking to install the latest
state: present
** NOTE 2 need to update the development node
- name: update all packages on development node yum:
name: '*' state: latest

Does this meet the goal?

Correct Answer: A

QUESTION 5

CORRECT TEXT
Create a playbook called timesvnc.yml in /home/sandy/ansible using rhel system role timesync. Set the time to use currently configured nip with the server 0.uk.pool.ntp.org. Enable burst. Do this on all hosts.
Solution:
Solution as:
EX407 dumps exhibit

Does this meet the goal?

Correct Answer: A