Skip to content

Commit

Permalink
Add some pillar data to openrc.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
niku64 committed Mar 26, 2018
1 parent ad72171 commit 89d9df5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions sls/openrc/conf.sls
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
include:
- augeas.lenses

{% set rc_conf = salt['pillar.get']('rc:conf', {}) %}

manage-rc-conf:
augeas.change:
- name: /etc/rc.conf
- context: /files/etc/rc.conf
- changes:
- set rc_parallel {{ 'YES' if salt['pillar.get']('rc:parallel', True) else 'NO' }}
- set rc_logger YES
- set rc_log_path /var/log/rc.log
- set rc_parallel {{ 'YES' if rc_conf.get('parallel', True) else 'NO' }}
- set rc_logger {{ 'YES' if rc_conf.get('logger', True) else 'NO' }}
- set rc_log_path {{ rc_conf.get('log_path', '/var/log/rc.log') }}
- set rc_crashed_start {{ 'YES' if rc_conf.get('crashed_start', True) else 'NO' }}
- set rc_crashed_stop {{ 'YES' if rc_conf.get('crashed_stop', False) else 'NO' }}
{% if salt['grains.get']('hwclass', False) == 'container' %}
{% set container_type = salt['grains.get']('container_type', False) %}
{% if container_type == 'docker' %}
Expand Down

0 comments on commit 89d9df5

Please sign in to comment.