diff options
Diffstat (limited to 'manifests/repomaster.pp')
-rw-r--r-- | manifests/repomaster.pp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/manifests/repomaster.pp b/manifests/repomaster.pp index 671b16f..d7143f6 100644 --- a/manifests/repomaster.pp +++ b/manifests/repomaster.pp @@ -2,10 +2,17 @@ class profiles::repomaster ( String $directory, String $hostname = "repo.${::fqdn}", + Boolean $publish_dns = false, + Optional[String] $dns_zone = undef, ) { include ::nginx + include ::profiles::certificate + letsencrypt::domain { $hostname: + cert_name => $profiles::certificate::cert_name, + } + nginx::resource::server { $hostname: www_root => $directory, autoindex => 'on', @@ -13,7 +20,24 @@ class profiles::repomaster ( ipv6_enable => true, ipv6_listen_options => '', listen_options => '', - # TODO ssl + * => letsencrypt::conf::nginx($hostname), } + if $publish_dns { + # TODO Separate toggles for ipv4 and ipv6 + # Since ipv4 might be internal and shouldn't be exported. + # @@dns_record { "${hostname} A": + # type => 'A', + # zone => $dns_zone, + # key => $hostname, + # value => $facts['ipaddress'], + # } + + @@dns_record { "${hostname} AAAA": + type => 'AAAA', + zone => $dns_zone, + key => $hostname, + value => $facts['ipaddress6'], + } + } } |