Browse Source

Moving logrotate directory setup from jobs.sls and config.sls to init.sls. Closes #8

patch-1
nmadhok 9 years ago
parent
commit
c335f5edbc
3 changed files with 11 additions and 20 deletions
  1. +0
    -10
      logrotate/config.sls
  2. +11
    -0
      logrotate/init.sls
  3. +0
    -10
      logrotate/jobs.sls

+ 0
- 10
logrotate/config.sls View File

include: include:
- logrotate - logrotate


logrotate_directory:
file.directory:
- name: {{ logrotate.include_dir }}
- user: {{ salt['pillar.get']('logrotate:config:user', logrotate.user) }}
- group: {{ salt['pillar.get']('logrotate:config:group', logrotate.group) }}
- mode: 755
- makedirs: True
- require:
- pkg: logrotate

logrotate_config: logrotate_config:
file.managed: file.managed:
- name: {{ logrotate.conf_file }} - name: {{ logrotate.conf_file }}

+ 11
- 0
logrotate/init.sls View File

- name: {{ logrotate.service }} - name: {{ logrotate.service }}
- enable: True - enable: True
- reload: True - reload: True

logrotate_directory:
file.directory:
- name: {{ logrotate.include_dir }}
- user: {{ salt['pillar.get']('logrotate:config:user', logrotate.user) }}
- group: {{ salt['pillar.get']('logrotate:config:group', logrotate.group) }}
- mode: 755
- makedirs: True
- require:
- pkg: logrotate


+ 0
- 10
logrotate/jobs.sls View File

include: include:
- logrotate - logrotate


logrotate_directory:
file.directory:
- name: {{ logrotate.include_dir }}
- user: {{ salt['pillar.get']('logrotate:config:user', logrotate.user) }}
- group: {{ salt['pillar.get']('logrotate:config:group', logrotate.group) }}
- mode: 755
- makedirs: True
- require:
- pkg: logrotate

{% for key,value in jobs.iteritems() %} {% for key,value in jobs.iteritems() %}
{{key}}: {{key}}:
file.managed: file.managed:

Loading…
Cancel
Save