1
0
Fork 0
mirror of synced 2024-12-21 05:31:09 -05:00

Merge pull request #38 from daks/bug-jobname

integrating patch from danny-smit, fixes #33
This commit is contained in:
Nicolas Rodriguez 2018-12-06 04:13:29 +01:00 committed by GitHub
commit cc2bdaed82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -22,10 +22,10 @@ logrotate-{{ key }}:
- template: jinja - template: jinja
- context: - context:
{% if value is mapping %} {% if value is mapping %}
path: {{ value.get('path', []) }} path: {{ value.get('path', [key]) }}
data: {{ value.get('config', []) }} data: {{ value.get('config', []) }}
{% else %} {% else %}
path: {{ key }} path: [ {{ key }} ]
data: {{ value }} data: {{ value }}
{% endif %} {% endif %}
{% endif %} {% endif %}

View file

@ -7,8 +7,7 @@ describe file('/etc/logrotate.d/error') do
it { should be_owned_by 'root' } it { should be_owned_by 'root' }
it { should be_grouped_into 'root' } it { should be_grouped_into 'root' }
its('mode') { should cmp '0644' } its('mode') { should cmp '0644' }
# FIXME its('content') { should include '/tmp/var/log/mysql/error' }
#its('content') { should include '/tmp/var/log/mysql/error' }
its('content') { should include 'weekly' } its('content') { should include 'weekly' }
its('content') { should include 'missingok' } its('content') { should include 'missingok' }
its('content') { should include 'rotate 52' } its('content') { should include 'rotate 52' }