# @summary # Configures the Swagger UI # # https://swagger.io/tools/swagger-ui/ # # @param local # Local component of where we want to be published. # @param zone # Zone where we want to be published. # @param www_root # Location in filesystem where entry can be found. class profiles::swagger_ui ( String $zone = $facts['domain'], String $local = 'swagger-ui', String $www_root = '/usr/share/webapps/swagger-ui', ) { $server_name = "${local}.${zone}" include ::php_fpm ensure_packages([ # Available in AUR 'swagger-ui', ]) @@dns::record { "AAAA ${server_name}": type => 'AAAA', zone => $zone, key => $local, value => $facts['ipaddress6'], } nginx::resource::server { $server_name: ipv6_enable => true, ipv6_listen_options => '', www_root => $www_root, use_default_location => false, access_log => absent, error_log => absent, * => letsencrypt::conf::nginx($server_name), } php_fpm::nginx { 'swagger-ui': server => $server_name, www_root => $www_root, } }