Ansible Sample Exam For EX407
Ansible Sample Exam For EX407
Ansible Sample Exam For EX407
Posted on 07/05/2019 by Tomas
This is a sample Ansible exam that I’ve created to prepare for EX407. I have not taken the
EX407 exam yet.
You can also use it for the new RHCE 8 exam EX294.
As with the real exam, no answers to the sample exam questions will be provided.
Requirements
There are 18 questions in total.
You will need five RHEL 7 (or CentOS 7) virtual machines to be able to successfully complete
all questions.
One VM will be configured as an Ansible control node. Other four VMs will be used to apply
playbooks to solve the sample exam questions. The following FQDNs will be used throughout
the sample exam.
Some questions may depend on the outcome of others. Please read all questions before
proceeding.
Note that the purpose of the sample exam is to test your skills. Please don’t post your
playbooks in the comments section.
users:
- username: alice
uid: 1201
- username: vincent
uid: 1202
- username: sandy
uid: 2201
- username: patrick
uid: 2202
bind_address = {{ ansible_default_ipv4.address }}
skip_name_resolve
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
symbolic-links=0
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
Task 11: Download Roles From Ansible Galaxy and Use Them
Use Ansible Galaxy to download and install geerlingguy.haproxy role
in /home/automation/plays/roles.
Create a playbook /home/automation/plays/haproxy.yml that runs on servers in
the proxy host group and does the following:
o Use geerlingguy.haproxy role to load balance request between hosts in
the webservers host group.
o Use roundrobin load balancing method.
o HAProxy backend servers should be configured for HTTP only (port 80).
o Firewall is configured to allow all incoming traffic on port TCP 80.
If your playbook works, then doing “curl http://ansible2.hl.local/” should return
output from the web server (see task #10). Running the command again should return
output from the other web server.
ansible3.hl.local
ansible4.hl.local
ansible5.hl.local
Note: if the FQDN of any inventory host changes, re-running the playbook should update the
file with the new values.