CORRECT TEXT
Create an empty encrypted file calledmyvault.yml in /home/sandy/ansibleand set the passwordtonotsafepw. Rekey the passwordtoiwejfj2221.
A. See the for complete Solution below.
CORRECT TEXT
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 FQDN of each host
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 database host group the line should be "Welcome to MySQL Server FQDN".
A. See the for complete Solution below.
CORRECT TEXT
Create a file calledpackages.yml in/home/sandy/ansibleto 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 tothe latest.
A. See the for complete Solution below.
CORRECT TEXT
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'
A. See the for complete Solution below.
CORRECT TEXT
Install and configure ansible
Userbobhas been created on your control node. Give him the appropriate permissions on the control node.Install the necessary packages to run ansible on the control node.
Create a configuration file /home/bob/ansible/ansible.cfg to meet the following requirements:
The roles path should include /home/bob/ansible/roles, as well as any other path that maybe required for the course of the sample exam.
The inventory file path is /home/bob/ansible/inventory.
Ansible should be able to manage 10 hosts at a single time.
Ansible should connect to all managed nodes using the bob user.
Create an inventory file for the following five nodes:
nodel.example.com
node2.example.com
node3.example.com
node4.example.com
node5.example.com
Configure these nodes to be in an inventory file where node1 is a member of groupdev. nodc2 is a member of group test, nodc3 is a member of groupproxy,nodc4 and node 5 are members of groupprod.Also,prodis a member of group
webservers.
A. See the for complete Solution below.
CORRECT TEXT
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.j2that displays "Welcome to the server HOSTNAME"
In a play called apache.yml in /home/bob/ansible/ run the sample-apache role.
A. See the for complete Solution below.
CORRECT TEXT
Create a playbookthatchanges the default target onallnodes tomulti-usertarqet. Do this in playbook file called target.yml in /home/sandy/ansible
A. See the for complete Solution below.
CORRECT TEXT
In /home/sandy/ansible/create a playbook calledlogvol.yml. Inthe play create a logical volume calledIv0and make it of size 1500MiB on volume groupvgOIf there is not enough space in the volume groupprinta message"Not enough space for logical volume"and then make a 800MiBIv0instead. If the volume group still doesn't exist, create a message "Volume group doesn't exist"Create anxfsfilesystem on allIv0logical volumes. Don't mount the logical volume.
A. See the for complete Solution below.
CORRECT TEXT
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.
A. See the for complete Solution below.
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.
A. See the for complete Solution below.