Add no_args parameter on defined own services to allow create also
internal services without 'user= argv='.
This commit is contained in:
parent
097d149322
commit
dada652f3e
17
.kitchen.yml
17
.kitchen.yml
@ -43,6 +43,23 @@ provisioner:
|
|||||||
postfix.sls:
|
postfix.sls:
|
||||||
postfix:
|
postfix:
|
||||||
manage_master_config: True
|
manage_master_config: True
|
||||||
|
master_config:
|
||||||
|
services:
|
||||||
|
relay1:
|
||||||
|
wrap: True
|
||||||
|
command: smtp
|
||||||
|
chroot: false
|
||||||
|
type: unix
|
||||||
|
extras: '-o smtp_bind_address=127.0.0.1 -o syslog_name=relay1'
|
||||||
|
no_args: True
|
||||||
|
relay2:
|
||||||
|
wrap: True
|
||||||
|
command: smtp
|
||||||
|
chroot: false
|
||||||
|
type: unix
|
||||||
|
extras: '-o smtp_bind_address=127.0.0.2 -o syslog_name=relay2'
|
||||||
|
no_args: True
|
||||||
|
|
||||||
|
|
||||||
verifier:
|
verifier:
|
||||||
name: inspec
|
name: inspec
|
||||||
|
@ -45,6 +45,9 @@ postfix:
|
|||||||
user: mail
|
user: mail
|
||||||
# Wrap the output in master.cf at 78 chars for better readability
|
# Wrap the output in master.cf at 78 chars for better readability
|
||||||
wrap: True
|
wrap: True
|
||||||
|
# Avoid user and arvg settings to allow define internal processes
|
||||||
|
# needed for randomizing relay IP (randmap functionality)
|
||||||
|
no_args: True
|
||||||
|
|
||||||
# Backwards compatible definition of dovecot delivery in master.cf
|
# Backwards compatible definition of dovecot delivery in master.cf
|
||||||
enable_dovecot: False
|
enable_dovecot: False
|
||||||
|
@ -130,6 +130,9 @@ y
|
|||||||
service_param(service, service_name, 'wakeup'),
|
service_param(service, service_name, 'wakeup'),
|
||||||
service_param(service, service_name, 'maxproc'),
|
service_param(service, service_name, 'maxproc'),
|
||||||
service_param(service, service_name, 'command', service_name)) }}
|
service_param(service, service_name, 'command', service_name)) }}
|
||||||
|
{%- if 'no_args' in service -%}
|
||||||
|
{%- set parameter_str = "%s %s" | format(comment,service_param(service, service_name, 'extras', '')) -%}
|
||||||
|
{%- else -%}
|
||||||
{%- if 'flags' in service or 'flags' in postfix_master_services.defaults[service_name] -%}
|
{%- if 'flags' in service or 'flags' in postfix_master_services.defaults[service_name] -%}
|
||||||
{%- set parameter_str = "%s flags=%s user=%s argv=%s %s" | format(comment,
|
{%- set parameter_str = "%s flags=%s user=%s argv=%s %s" | format(comment,
|
||||||
service_param(service, service_name, 'flags'),
|
service_param(service, service_name, 'flags'),
|
||||||
@ -142,6 +145,7 @@ y
|
|||||||
service_param(service, service_name, 'argv'),
|
service_param(service, service_name, 'argv'),
|
||||||
service_param(service, service_name, 'extras', '')) -%}
|
service_param(service, service_name, 'extras', '')) -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
{%- endif -%}{# if 'no_args' in service #}
|
||||||
{%- if wrap %}
|
{%- if wrap %}
|
||||||
{{ parameter_str | wordwrap(width=wrap, break_long_words=False, wrapstring='\n%s ' | format(comment)) }}
|
{{ parameter_str | wordwrap(width=wrap, break_long_words=False, wrapstring='\n%s ' | format(comment)) }}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
|
Loading…
Reference in New Issue
Block a user