Closed kmkramer closed 7 years ago
thanks
interesting, I thought that would be enough but oddly on SL file management doesn't appear to be working. it won't update /etc/logrotate.conf or update/create any jobs in /etc/logrotate.d/
and the minion shows the correct job info
local:
----------
logrotate:
----------
jobs:
----------
syslog:
----------
config:
- sharedscripts
- postrotate
- /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
- endscript
path:
- /var/log/cron
- /var/log/maillog
- /var/log/messages
- /var/log/secure
- /var/log/spooler
- /var/log/slapd.log
lookup:
----------
pkg:
logrotate
service:
crond
@kmkramer could you please edit your comment with "```" code blocks, otherwise I can't see the indentations.
@kmkramer could you show me the states you have added to the minion? are they logrotate, logrotate.config and logrotate.jobs ? or only logrotate.
Only
On Thu, Feb 9, 2017 at 3:01 PM Niels Abspoel notifications@github.com wrote:
@kmkramer https://github.com/kmkramer could you show me the states you have added to the minion? are they logrotate and logrotate.jobs ? or only logrotate.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/saltstack-formulas/logrotate-formula/pull/25#issuecomment-278772494, or mute the thread https://github.com/notifications/unsubscribe-auth/AA9fuwHEFIe0MkO1fIKqgYNKMymdUNOZks5ra37BgaJpZM4L7fIF .
Then that's the reason, the config state manages the conf file. The jobs state the jobs,
Op do 9 feb. 2017 22:56 schreef Kevin Kramer notifications@github.com:
- logrotate
Only
On Thu, Feb 9, 2017 at 3:01 PM Niels Abspoel notifications@github.com wrote:
@kmkramer https://github.com/kmkramer could you show me the states you have added to the minion? are they logrotate and logrotate.jobs ? or only logrotate.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/saltstack-formulas/logrotate-formula/pull/25#issuecomment-278772494 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AA9fuwHEFIe0MkO1fIKqgYNKMymdUNOZks5ra37BgaJpZM4L7fIF
.
— You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub https://github.com/saltstack-formulas/logrotate-formula/pull/25#issuecomment-278786709, or mute the thread https://github.com/notifications/unsubscribe-auth/ABt51GjzWO0UCwIOtbalf1IIeunn70Xzks5ra4uCgaJpZM4L7fIF .
duh! sorry about that.
salt-call state.apply logrotate.config is working now salt-call state.apply logrotate.jobs is not
local:
- Rendering SLS 'base:logrotate.jobs' failed: Jinja syntax error: no test named 'mapping'; line 20
---
[...]
- group: {{ salt['pillar.get']('logrotate:config:group', logrotate.group) }}
- mode: {{ salt['pillar.get']('logrotate:config:mode', '644') }}
- require:
- pkg: logrotate
- context:
{% if value is mapping %} <======================
path: {{ value.get('path', []) }}
data: {{ value.get('config', []) }}
{% else %}
path: {{ key }}
data: {{ value }}
[...]
---
@kmkramer to old version of salt that's the reason for the mapping error.
We would to add support for Scientific Linux. Please review. Thanks