classsites::example_com {
http::site {"www.example.com":
serveralias => "example.com",
}
http::redirect {"/old-file":
site => "www.example.com",
to => "/new-file",
}
}
First site.pp
node etch {
$httpdtype="nginx"include http
include sites::example_com
}
First puppet output
notice:Adding redirect from /old-file to /new-file for www.example.com
notice://sites::example_com/Http::Redirect[/old-file]/Nginx::Webserver::Redirect[/old-file]/Notify[Adding redirect from /old-file to /new-file for www.example.com]/message: defined 'message' as 'Adding redirect from /old-file to /new-file for www.example.com'notice:Creating www.example.com with serveralias example.com.
notice://sites::example_com/Http::Site[www.example.com]/Nginx::Webserver::Vhost[www.example.com]/Notify[Creating www.example.com with serveralias example.com.]/message: defined 'message' as 'Creating www.example.com with serveralias example.com.'notice:Finished catalog run in0.04 seconds
Second site.pp
node etch {
$httpdtype="apache"include http
include sites::example_com
}
Second puppet output
notice:Adding redirect from /old-file to /new-file for www.example.com
notice://sites::example_com/Http::Redirect[/old-file]/Apache::Webserver::Redirect[/old-file]/Notify[Adding redirect from /old-file to /new-file for www.example.com]/message: defined 'message' as 'Adding redirect from /old-file to /new-file for www.example.com'notice:Creating www.example.com with serveralias example.com.
notice://sites::example_com/Http::Site[www.example.com]/Apache::Webserver::Vhost[www.example.com]/Notify[Creating www.example.com with serveralias example.com.]/message: defined 'message' as 'Creating www.example.com with serveralias example.com.'notice:Finished catalog run in0.04 seconds