diff options
Diffstat (limited to 'manifests/certbot.pp')
-rw-r--r-- | manifests/certbot.pp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/manifests/certbot.pp b/manifests/certbot.pp new file mode 100644 index 0000000..e024b32 --- /dev/null +++ b/manifests/certbot.pp @@ -0,0 +1,19 @@ +define nginx::certbot( + $aliases = '' + $ensure = 'present', + $email = hiera('nginx::certbot::email'), + $size = hiera('nginx::certbot::size', '4096'), +){ + # Certbot support + file { "/var/www/certbot/${name}": + ensure => $ensure, + owner => 'root', + group => 'www-data', + mode => '0750', + require => Package['certbot'], + } + + exec { "certbot-${name}": + command => "/usr/bin/certbot certonly --webroot -w /var/www/certbot/${name} -d ${name} -m ${email} --rsa-key-size ${size} --agree-tos", + } +} |