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 calledwebdev.ymlin'home/sandy/ansible. 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/Webdevto /var/www/html/ webdev. Serve a file from Avebdev7index.html which displays the text "Development" Curlhttp://node1.example.com/webdev/index.htmlto test
A. See the for complete Solution below.
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/ansiblecalledhosts.ymland install the template on dev node at /root/myhosts
A. See the for complete Solution below.
CORRECT TEXT
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 back in the file and change dev_pass value to devops123. Then change the vault password of mysecret.yml to verysafepass
A. See the for complete Solution below.
CORRECT TEXT
Create a file calledrequirements.ymlin/home/sandy/ansible/rolesa file calledrole.yml in /home/sandy/ansible/.Thehaproxy-roleshould be used on theproxyhost. And when you curlhttp://node3.example.comit should display "Welcome tonode4.example.com" and when you curl again "Welcome tonode5.example.com" Thephp-roleshould be used on theprod host.
A. See the for complete Solution below.
CORRECT TEXT
Using the Simulation Program, perform the following tasks:
Ad-Hoc Ansible Commands (Number Two) Task:
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.
3.
Use the ad-hoc command to make sure that httpd is installed.
4.
Use the ad-hoc command to remove httpd fromthe servers.
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
Create a file in/home/sandy/ansible/calledreport.yml.Using this playbook, get a filecalled report.txt(make it look exactly as below). Copy this file over to all remote hosts at /root/report.txt.Then edit the lines in the file to provide the real informationofthehosts. Ifa disk does not exist then write NONE.
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
Using the Simulation Program, perform the following tasks:
Static Inventories Task:
1.
Add a new group to your default ansible host file. call the group [ec2]
2.
Add a newhost to the new group you created.
3.
Add a variable to a new host entry in the /etc/ansible/hosts file. Add the following. localhost http_port=80 maxRequestsPerChild=808
4.
Check to see if maxRequestsPerChild is pulled out with an ad-hoccommand.
5.
Create a local host file and put a target group and then a host into it. Then ping it with an ad-hoc command.
A. See the for complete Solution below.