Simplify conditions in heat service templates
This is part of a series of patches to reduce the template complexity. Change-Id: I685ec7d7c583c9f8d9f04b0f1027136ed042487c
This commit is contained in:
parent
c9991c2e31
commit
4ee0f18947
@ -59,9 +59,8 @@ parameters:
|
||||
type: string
|
||||
|
||||
conditions:
|
||||
|
||||
internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
|
||||
heat_workers_zero: {equals : [{get_param: HeatWorkers}, 0]}
|
||||
heat_workers_set:
|
||||
not: {equals : [{get_param: HeatWorkers}, 0]}
|
||||
|
||||
resources:
|
||||
|
||||
@ -142,10 +141,8 @@ outputs:
|
||||
"%{hiera('fqdn_$NETWORK')}"
|
||||
params:
|
||||
$NETWORK: {get_param: [ServiceNetMap, HeatApiCfnNetwork]}
|
||||
-
|
||||
if:
|
||||
- heat_workers_zero
|
||||
- {}
|
||||
- heat_workers_set
|
||||
- heat::wsgi::apache_api_cfn::workers: {get_param: HeatWorkers}
|
||||
service_config_settings:
|
||||
rsyslog:
|
||||
@ -203,13 +200,9 @@ outputs:
|
||||
- /var/lib/kolla/config_files/heat_api_cfn.json:/var/lib/kolla/config_files/config.json:ro
|
||||
- /var/lib/config-data/puppet-generated/heat_api_cfn:/var/lib/kolla/config_files/src:ro
|
||||
- if:
|
||||
- internal_tls_enabled
|
||||
- - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
|
||||
- []
|
||||
- if:
|
||||
- internal_tls_enabled
|
||||
- - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
|
||||
- []
|
||||
- {get_param: EnableInternalTLS}
|
||||
- - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
|
||||
- /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
|
||||
environment:
|
||||
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
|
||||
host_prep_tasks: {get_attr: [HeatApiCfnLogging, host_prep_tasks]}
|
||||
|
@ -77,9 +77,8 @@ parameters:
|
||||
hidden: true
|
||||
|
||||
conditions:
|
||||
|
||||
internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
|
||||
heat_workers_zero: {equals : [{get_param: HeatWorkers}, 0]}
|
||||
heat_workers_set:
|
||||
not: {equals : [{get_param: HeatWorkers}, 0]}
|
||||
|
||||
resources:
|
||||
|
||||
@ -172,11 +171,9 @@ outputs:
|
||||
"%{hiera('fqdn_$NETWORK')}"
|
||||
params:
|
||||
$NETWORK: {get_param: [ServiceNetMap, HeatApiNetwork]}
|
||||
-
|
||||
if:
|
||||
- heat_workers_zero
|
||||
- {}
|
||||
- heat::wsgi::apache_api::workers: {get_param: HeatWorkers}
|
||||
- heat_workers_set
|
||||
- heat::wsgi::apache_api::workers: {get_param: HeatWorkers}
|
||||
service_config_settings:
|
||||
rsyslog:
|
||||
tripleo_logging_sources_heat_api:
|
||||
@ -241,17 +238,12 @@ outputs:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
- {get_attr: [HeatApiLogging, volumes]}
|
||||
- {get_param: HeatApiOptVolumes}
|
||||
-
|
||||
- /var/lib/kolla/config_files/heat_api.json:/var/lib/kolla/config_files/config.json:ro
|
||||
- - /var/lib/kolla/config_files/heat_api.json:/var/lib/kolla/config_files/config.json:ro
|
||||
- /var/lib/config-data/puppet-generated/heat_api:/var/lib/kolla/config_files/src:ro
|
||||
- if:
|
||||
- internal_tls_enabled
|
||||
- - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
|
||||
- []
|
||||
- if:
|
||||
- internal_tls_enabled
|
||||
- - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
|
||||
- []
|
||||
- {get_param: EnableInternalTLS}
|
||||
- - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
|
||||
- /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
|
||||
environment:
|
||||
map_merge:
|
||||
- {get_param: HeatApiOptEnvVars}
|
||||
|
@ -141,7 +141,8 @@ conditions:
|
||||
and:
|
||||
- {get_param: EnableCache}
|
||||
- {get_param: MemcachedTLS}
|
||||
cors_allowed_origin_unset: {equals : [{get_param: HeatCorsAllowedOrigin}, '']}
|
||||
cors_allowed_origin_set:
|
||||
not: {equals : [{get_param: HeatCorsAllowedOrigin}, '']}
|
||||
|
||||
outputs:
|
||||
role_data:
|
||||
@ -152,8 +153,7 @@ outputs:
|
||||
map_merge:
|
||||
-
|
||||
if:
|
||||
- cors_allowed_origin_unset
|
||||
- {}
|
||||
- cors_allowed_origin_set
|
||||
- heat::cors::allowed_origin: {get_param: HeatCorsAllowedOrigin}
|
||||
- heat::notification_driver: {get_param: NotificationDriver}
|
||||
heat::logging::debug:
|
||||
|
@ -115,8 +115,8 @@ parameters:
|
||||
description: Client retries for transient errors.
|
||||
|
||||
conditions:
|
||||
heat_workers_unset: {equals : [{get_param: HeatWorkers}, 0]}
|
||||
enable_sqlalchemy_collectd: {equals : [{get_param: EnableSQLAlchemyCollectd}, true]}
|
||||
heat_workers_set:
|
||||
not: {equals : [{get_param: HeatWorkers}, 0]}
|
||||
|
||||
resources:
|
||||
|
||||
@ -176,16 +176,14 @@ outputs:
|
||||
path: /heat
|
||||
query:
|
||||
if:
|
||||
- enable_sqlalchemy_collectd
|
||||
-
|
||||
read_default_file: /etc/my.cnf.d/tripleo.cnf
|
||||
read_default_group: tripleo
|
||||
plugin: collectd
|
||||
collectd_program_name: heat
|
||||
collectd_host: localhost
|
||||
-
|
||||
read_default_file: /etc/my.cnf.d/tripleo.cnf
|
||||
read_default_group: tripleo
|
||||
- {get_param: EnableSQLAlchemyCollectd}
|
||||
- read_default_file: /etc/my.cnf.d/tripleo.cnf
|
||||
read_default_group: tripleo
|
||||
plugin: collectd
|
||||
collectd_program_name: heat
|
||||
collectd_host: localhost
|
||||
- read_default_file: /etc/my.cnf.d/tripleo.cnf
|
||||
read_default_group: tripleo
|
||||
|
||||
heat::keystone_ec2_uri:
|
||||
list_join:
|
||||
@ -195,10 +193,8 @@ outputs:
|
||||
heat::keystone::domain::domain_password: {get_param: HeatStackDomainAdminPassword}
|
||||
heat::engine::auth_encryption_key: {get_param: HeatAuthEncryptionKey}
|
||||
heat::engine::plugin_dirs: {get_param: HeatEnginePluginDirs}
|
||||
-
|
||||
if:
|
||||
- heat_workers_unset
|
||||
- {}
|
||||
- heat_workers_set
|
||||
- heat::engine::num_engine_workers: {get_param: HeatWorkers}
|
||||
service_config_settings:
|
||||
rsyslog:
|
||||
|
Loading…
Reference in New Issue
Block a user