Simplify qdrouterd and snmp service templates

Change-Id: I5ec1ebde2b363af1dc1809864cafc6fc2c60da42
This commit is contained in:
ramishra 2021-05-23 00:20:10 +05:30
parent 7a9cc5c831
commit 85bc69916b
2 changed files with 8 additions and 9 deletions

View File

@ -50,7 +50,6 @@ parameters:
type: string
resources:
ContainersCommon:
type: ../containers-common.yaml
@ -122,8 +121,7 @@ outputs:
volumes:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- /var/lib/kolla/config_files/qdrouterd.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/kolla/config_files/qdrouterd.json:/var/lib/kolla/config_files/config.json:ro
- /var/lib/config-data/puppet-generated/qdrouterd:/var/lib/kolla/config_files/src:ro
- /var/lib/qdrouterd:/var/lib/qdrouterd:z
- /var/log/containers/qdrouterd:/var/log/qdrouterd:z

View File

@ -51,7 +51,8 @@ parameters:
will be taken.
type: string
conditions:
snmpd_network_unset: {equals : [{get_param: SnmpdIpSubnet}, '']}
snmpd_network_set:
not: {equals : [{get_param: SnmpdIpSubnet}, '']}
outputs:
role_data:
@ -60,7 +61,11 @@ outputs:
service_name: snmp
firewall_rules:
if:
- snmpd_network_unset
- snmpd_network_set
- '124 snmp':
dport: 161
proto: 'udp'
source: {get_param: SnmpdIpSubnet}
- map_merge:
repeat:
for_each:
@ -74,10 +79,6 @@ outputs:
dport: 161
proto: 'udp'
source: <%net_cidr%>
- '124 snmp':
dport: 161
proto: 'udp'
source: {get_param: SnmpdIpSubnet}
config_settings:
tripleo::profile::base::snmp::snmpd_user: {get_param: SnmpdReadonlyUserName}
tripleo::profile::base::snmp::snmpd_password: {get_param: SnmpdReadonlyUserPassword}