Skip to content
Snippets Groups Projects
Commit 752c3e56 authored by Eric Veiras Galisson's avatar Eric Veiras Galisson
Browse files

moving specific FreeBSD code to map.jinja, updating pillar.example

parent 2b83ca08
No related branches found
No related tags found
No related merge requests found
...@@ -7,9 +7,6 @@ haproxy.config: ...@@ -7,9 +7,6 @@ haproxy.config:
- source: {{ haproxy.config_file_source }} - source: {{ haproxy.config_file_source }}
- template: jinja - template: jinja
- user: {{ haproxy.user }} - user: {{ haproxy.user }}
{% if salt['grains.get']('os_family') == 'FreeBSD' %}
- group: wheel
{% else %}
- group: {{ haproxy.group }} - group: {{ haproxy.group }}
{% endif %} {% endif %}
- mode: 644 - mode: 644
......
{% set haproxy = salt['grains.filter_by']({ {% set haproxy = salt['grains.filter_by']({
'Debian': { 'default': {
'package': 'haproxy', 'package': 'haproxy',
'config_file': '/etc/haproxy/haproxy.cfg', 'config_file': '/etc/haproxy/haproxy.cfg',
'config_file_source': 'salt://haproxy/templates/haproxy.jinja', 'config_file_source': 'salt://haproxy/templates/haproxy.jinja',
...@@ -7,5 +7,8 @@ ...@@ -7,5 +7,8 @@
'group': 'root', 'group': 'root',
'service': 'haproxy', 'service': 'haproxy',
}, },
}, merge=salt['pillar.get']('haproxy:lookup')) %} 'FreeBSD': {
'group': 'wheel',
},
}, merge=salt['pillar.get']('haproxy:lookup'), base='default') %}
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
# #
haproxy: haproxy:
# use lookup section to override 'map.jinja' values
#lookup:
#user: 'custom-user'
#group: 'custom-group'
enabled: True enabled: True
overwrite: True # Overwrite an existing config file if present (default behaviour unless set to false) overwrite: True # Overwrite an existing config file if present (default behaviour unless set to false)
config_file_path: /etc/haproxy/haproxy.cfg config_file_path: /etc/haproxy/haproxy.cfg
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment