文件
<VirtualHost :80>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.) https://%{SERVER_NAME}/$1 [R,L]
命题
substitute the * with the $fqdn facter variable on the first line
答案
include stdlib
$fqdn = $facts['fqdn']
file_line { 'virtual_host':
ensure => present,
path => '/path/to/httpd.conf',
line => "<VirtualHost ${fqdn}:80>",
match => '<VirtualHost \*:80>',
}