summaryrefslogtreecommitdiffstats
path: root/manifests/reprepro/reverse_proxy.pp
blob: 8f317caa12382bffee0d3b1ead051503ecfc4b27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Manage a nginx vhost that reverse proxies one of our APT repositories to another web server.
define tails::reprepro::reverse_proxy (
  Stdlib::Fqdn $public_hostname,
  String $onion_hostname            = '',
  Stdlib::Httpurl $upstream_address = 'http://apt.lizard/',
  ) {

  nginx::vhostsd { $public_hostname:
    content => template('tails/reprepro/nginx_reverse_proxy.erb'),
    require => [
        Package[nginx],
        Tails::Letsencrypt::Certonly[$public_hostname],
    ],
  }

  tails::letsencrypt::certonly { $public_hostname: }

}