Question: 1. Write a BASH script get-ec2-bios.sh that retrieves the console logs from a given AWS instance. The script should only display the BIOS portions of

1. Write a BASH script get-ec2-bios.sh that retrieves the "console logs" from a given AWS instance. The script should only display the "BIOS" portions of the console logs (use the grep command). The first parameter given to get-ec2-bios.sh should be the "Instance-id" of the AWS instance. In the "aws ec2 get-console-output" command include the --option text. The "-- option" is so the output is readable in text format. 2. Using ansible, write a script to install the apache webserver "httpd". It should use ansible's "yum:" command. It should also start the httpd service. Use ansible's "service:" command to make the "state" to be "started". After you run the script, try to learn what other RPMs were installed. Look at the scripts RPM runs: rpm -q --scripts httpd What do the RPM scripts do to install the webserver? What do the RPM scripts do to uninstall it? 3. Change the zkill script to generate logs of priority "info" facility "daemon". Change the rsyslog configuration to forward such logs to /var/log/zkill. Change the logrotate configuration to compress and roll over such those logs every week. 1. Write a BASH script get-ec2-bios.sh that retrieves the "console logs" from a given AWS instance. The script should only display the "BIOS" portions of the console logs (use the grep command). The first parameter given to get-ec2-bios.sh should be the "Instance-id" of the AWS instance. In the "aws ec2 get-console-output" command include the --option text. The "-- option" is so the output is readable in text format. 2. Using ansible, write a script to install the apache webserver "httpd". It should use ansible's "yum:" command. It should also start the httpd service. Use ansible's "service:" command to make the "state" to be "started". After you run the script, try to learn what other RPMs were installed. Look at the scripts RPM runs: rpm -q --scripts httpd What do the RPM scripts do to install the webserver? What do the RPM scripts do to uninstall it? 3. Change the zkill script to generate logs of priority "info" facility "daemon". Change the rsyslog configuration to forward such logs to /var/log/zkill. Change the logrotate configuration to compress and roll over such those logs every week
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
