Yorokobi
10/21/2022, 2:34 PMYorokobi
10/21/2022, 2:35 PMLumiere
10/21/2022, 2:37 PMYorokobi
10/21/2022, 2:39 PMchcon and ownership from root to puppet -> πYorokobi
10/21/2022, 2:40 PMSlackbot
10/21/2022, 3:57 PMbastelfreak
10/21/2022, 4:02 PMvchepkov
10/21/2022, 5:50 PMWilliam Myers
10/21/2022, 5:52 PMWilliam Myers
10/21/2022, 5:52 PMWilliam Myers
10/21/2022, 5:54 PMSlackbot
10/21/2022, 8:26 PMWilliam Myers
10/21/2022, 8:27 PM# /etc/puppetlabs/code/environments/production/site/profile/manifests/webserver/example.pp
class profile::webserver::example (
String $content = "Hello from vhost\\n",
Array[String] $ports = ['80']
Array[String] $ips = ['127.0.0.1','127.0.0.2'],
)
{
class { 'apache':
default_vhost => false,
}
{
apache::vhost { '<http://example.com|example.com>':
port => $ports,
ip => $ips,
ip_based => true,
docroot => '/var/www/html',
}
file { '/var/www/html/index.html':
ensure => file,
content => $content,
}
firewall { '100 allow http and https access':
dport => $ports,
proto => tcp,
action => accept
}
}vchepkov
10/21/2022, 8:27 PMvchepkov
10/21/2022, 8:28 PM{} in your codeWilliam Myers
10/21/2022, 8:28 PMWilliam Myers
10/21/2022, 8:28 PMWilliam Myers
10/21/2022, 8:28 PMWilliam Myers
10/21/2022, 8:28 PMvchepkov
10/21/2022, 8:28 PMWilliam Myers
10/21/2022, 8:28 PMWilliam Myers
10/21/2022, 8:28 PMvchepkov
10/21/2022, 8:29 PM{ after apache is extraWilliam Myers
10/21/2022, 8:29 PM{ <---------------- this?
apache::vhost { '<http://example.com|example.com>':vchepkov
10/21/2022, 8:29 PMWilliam Myers
10/21/2022, 8:29 PMWilliam Myers
10/21/2022, 8:29 PMvchepkov
10/21/2022, 8:29 PMWilliam Myers
10/21/2022, 8:30 PMSlackbot
10/21/2022, 8:30 PM