Skip to content

Commit

Permalink
feat(suse): skip directory management
Browse files Browse the repository at this point in the history
On SUSE based distributions the chroot/data directory is managed
by the distribution package. Skip superfluous management and
permission overwriting through the formula states.

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
  • Loading branch information
tacerus committed Mar 14, 2024
1 parent 19821b9 commit 118f5cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion haproxy/config.sls
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ haproxy.config:
- test -e {{ config_file }}
{% endif %}
{% if salt['pillar.get']('haproxy:global:chroot:enable', False) and
{% if haproxy.manage_directories and
salt['pillar.get']('haproxy:global:chroot:enable', False) and
salt['pillar.get']('haproxy:global:chroot:path', '') %}
haproxy-chroot-directory:
file.directory:
Expand Down
4 changes: 4 additions & 0 deletions haproxy/map.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
'user': 'root',
'group': 'root',
'service': 'haproxy',
'manage_directories': True,
},
'FreeBSD': {
'config_file': '/usr/local/etc/haproxy.conf',
'group': 'wheel',
},
'Suse': {
'manage_directories': False,
},
}, merge=salt['pillar.get']('haproxy:lookup'), base='default') %}

0 comments on commit 118f5cf

Please sign in to comment.