From c335f5edbc6a1a5a8b2de7d3d66d857fb13e949d Mon Sep 17 00:00:00 2001 From: nmadhok Date: Fri, 20 Mar 2015 16:05:14 -0400 Subject: [PATCH] Moving logrotate directory setup from jobs.sls and config.sls to init.sls. Closes #8 --- logrotate/config.sls | 10 ---------- logrotate/init.sls | 11 +++++++++++ logrotate/jobs.sls | 10 ---------- 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/logrotate/config.sls b/logrotate/config.sls index 48cade5..d4341a5 100644 --- a/logrotate/config.sls +++ b/logrotate/config.sls @@ -3,16 +3,6 @@ include: - 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: file.managed: - name: {{ logrotate.conf_file }} diff --git a/logrotate/init.sls b/logrotate/init.sls index 6e3c5cd..e2fb8e3 100644 --- a/logrotate/init.sls +++ b/logrotate/init.sls @@ -7,3 +7,14 @@ logrotate: - name: {{ logrotate.service }} - enable: 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 + diff --git a/logrotate/jobs.sls b/logrotate/jobs.sls index e11483d..6b154b4 100644 --- a/logrotate/jobs.sls +++ b/logrotate/jobs.sls @@ -5,16 +5,6 @@ include: - 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() %} {{key}}: file.managed: