summaryrefslogtreecommitdiff
path: root/manifests/cert.pp
blob: 81a5f4b072db435355a7cffe2afe213566b48fb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
define nginx::cert(
  $address
)
{
  ssl::cert { "$address":
    main   => true,
    notify => Service['nginx'],
  }

  ssl::check { "$address":
    file => true,
  }

  Service["nginx"] {
    require => [ Package["nginx"],
                 File["/etc/nginx/sites-enabled/${address}"],
                 File["/etc/ssl/private/${address}.pem"],
                 File["/etc/ssl/certs/${address}.crt"] ],
  }
}