Skip to content

Instantly share code, notes, and snippets.

@cwage
Created November 5, 2016 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cwage/5bdff89951c44cb37b50e81bbc509801 to your computer and use it in GitHub Desktop.
Save cwage/5bdff89951c44cb37b50e81bbc509801 to your computer and use it in GitHub Desktop.
# puppet apply -v manifests/site.pp --modulepath=modules/ --noop --test
# puppet apply -v manifests/site.pp --modulepath=modules/
node default {
class { 'apache': }
# The non-ssl virtual host
apache::vhost { 'ssltest.quietlife.net non-ssl':
servername => 'ssltest.quietlife.net',
port => '80',
docroot => '/var/www/ssltest.quietlife.net',
}
# The SSL virtual host at the same domain
apache::vhost { 'ssltest.quietlife.net ssl':
servername => 'ssltest.quietlife.net',
port => '443',
docroot => '/var/www/ssltest.quietlife.net',
ssl => true,
ssl_key => '/etc/letsencrypt/live/ssltest.quietlife.net/privkey.pem',
ssl_cert => '/etc/letsencrypt/live/ssltest.quietlife.net/cert.pem',
}
class { ::letsencrypt:
email => 'cwage@quietlife.net',
}
letsencrypt::certonly { 'foo':
domains => ['ssltest.quietlife.net'],
plugin => 'apache',
manage_cron => true
}
# misc packages
package { [
'vim',
'git-core',
]:
ensure => 'installed',
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment