A thumbs up will be awarded ! Write a puppet module to accomplish the following:
ID: 3836239 • Letter: A
Question
A thumbs up will be awarded !
Write a puppet module to accomplish the following: Automatically install and run apache with a default HTML page that gives information about the system. That information should be: Operating System name, uptime, load averages, and 3 others of your choice from the facter command.
Some Helpful steps:
Shutdown httpd if running.
Test your module to see if nginx is installed successfully.
Ensure that nginx is running as well. ---- systemctl status …?
Find out where the default index.html page is stored.-------- Somewhere in /var?
Modify your puppet module to use a template for said index.html
Create a template file for index.html to include the information from facter.
DON’T MODIFY THE /VAR ONE, create a template file in your module.
Recall the brief mention of the tag language stuff from the lecture.
Operating System name
Uptime
Load averages
and 3 other facts you find interesting from facter.
Explanation / Answer
apache intallation
$ mkdir -p puppet/modules/apache2/manifests
$ cd puppet/
$ nano modules/apache2/manifests/init.pp
apache run
class apache2 {
package {'apache2':
ensure => present,
}
service {'apache2':
ensure => "running",
enable => "true",
require => Package["apache2"],
}
file { '/etc/apache2/mods-enabled/userdir.load':
ensure => 'link',
target => '/etc/apache2/mods-available/userdir.load',
notify => Service["apache2"],
require => Package["apache2"],
}
file { '/etc/apache2/mods-enabled/userdir.conf':
ensure => 'link',
target => '/etc/apache2/mods-available/userdir.conf',
notify => Service["apache2"],
require => Package["apache2"],
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.