Merge "Use network-based fqdn entry from hiera instead of the custom fact"
[apex-tripleo-heat-templates.git] / puppet / services / apache-internal-tls-certmonger.yaml
1 heat_template_version: 2016-10-14
2
3 description: >
4   Apache service TLS configurations.
5
6 parameters:
7   ServiceNetMap:
8     default: {}
9     description: Mapping of service_name -> network name. Typically set
10                  via parameter_defaults in the resource registry.  This
11                  mapping overrides those in ServiceNetMapDefaults.
12     type: json
13   # The following parameters are not needed by the template but are
14   # required to pass the pep8 tests
15   DefaultPasswords:
16     default: {}
17     type: json
18   EndpointMap:
19     default: {}
20     description: Mapping of service endpoint -> protocol. Typically set
21                  via parameter_defaults in the resource registry.
22     type: json
23
24 outputs:
25   role_data:
26     description: Role data for the Apache role.
27     value:
28       service_name: apache_internal_tls_certmonger
29       config_settings:
30         generate_service_certificates: true
31         apache_certificates_specs:
32           map_merge:
33             repeat:
34               template:
35                 httpd-NETWORK:
36                   service_certificate: '/etc/pki/tls/certs/httpd-NETWORK.crt'
37                   service_key: '/etc/pki/tls/private/httpd-NETWORK.key'
38                   hostname: "%{hiera('fqdn_NETWORK')}"
39                   principal: "HTTP/%{hiera('fqdn_NETWORK')}"
40               for_each:
41                 NETWORK:
42                   # NOTE(jaosorior) Get unique network names to create
43                   # certificates for those. We skip the tenant network since
44                   # we don't need a certificate for that, and the external
45                   # network will be handled in another template.
46                   yaql:
47                     expression: list($.data.map.items().map($1[1])).distinct().where($ != external and $ != tenant)
48                     data:
49                       map:
50                         get_param: ServiceNetMap