moving specific FreeBSD code to map.jinja, updating pillar.example
This commit is contained in:
parent
2b83ca0860
commit
752c3e5641
3 changed files with 9 additions and 5 deletions
|
@ -7,9 +7,6 @@ haproxy.config:
|
|||
- source: {{ haproxy.config_file_source }}
|
||||
- template: jinja
|
||||
- user: {{ haproxy.user }}
|
||||
{% if salt['grains.get']('os_family') == 'FreeBSD' %}
|
||||
- group: wheel
|
||||
{% else %}
|
||||
- group: {{ haproxy.group }}
|
||||
{% endif %}
|
||||
- mode: 644
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% set haproxy = salt['grains.filter_by']({
|
||||
'Debian': {
|
||||
'default': {
|
||||
'package': 'haproxy',
|
||||
'config_file': '/etc/haproxy/haproxy.cfg',
|
||||
'config_file_source': 'salt://haproxy/templates/haproxy.jinja',
|
||||
|
@ -7,5 +7,8 @@
|
|||
'group': 'root',
|
||||
'service': 'haproxy',
|
||||
},
|
||||
}, merge=salt['pillar.get']('haproxy:lookup')) %}
|
||||
'FreeBSD': {
|
||||
'group': 'wheel',
|
||||
},
|
||||
}, merge=salt['pillar.get']('haproxy:lookup'), base='default') %}
|
||||
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
#
|
||||
|
||||
haproxy:
|
||||
# use lookup section to override 'map.jinja' values
|
||||
#lookup:
|
||||
#user: 'custom-user'
|
||||
#group: 'custom-group'
|
||||
enabled: True
|
||||
overwrite: True # Overwrite an existing config file if present (default behaviour unless set to false)
|
||||
config_file_path: /etc/haproxy/haproxy.cfg
|
||||
|
|
Loading…
Reference in a new issue