Skip to content

Commit

Permalink
Merge pull request #8 from Oefenweb/syslogon
Browse files Browse the repository at this point in the history
Add variable to enable and support syslog
  • Loading branch information
tersmitten committed Mar 24, 2016
2 parents 80cc99d + a8c5862 commit b3c986c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ None
* `cron_apt_mailto`: [default: `root`]: The email address to send mail to
* `cron_apt_mailon`: [default: `upgrade`]: When to send email about the cron-apt results
* `cron_apt_options`: [optional]: General apt options that will be passed to all `APTCOMMAND` calls
* `cron_apt_syslogon`: [optional]: When to send the cron-apt results to syslog (e.g. `upgrade`, `changes`)

## Dependencies

Expand Down
10 changes: 8 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
state: latest
update_cache: true
cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}"
tags: [configuration, cron-apt, cron-apt-install]
tags:
- configuration
- cron-apt
- cron-apt-install

- name: update configuration file
template:
Expand All @@ -15,4 +18,7 @@
owner: root
group: root
mode: 0644
tags: [configuration, cron-apt, cron-apt-configuration]
tags:
- configuration
- cron-apt
- cron-apt-configuration
4 changes: 3 additions & 1 deletion templates/etc/cron-apt/config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ MAILON="{{ cron_apt_mailon }}"
# output (syslog when output is generated)
# always (always syslog)
# (else never syslog)
# SYSLOGON="upgrade"
{% if cron_apt_syslogon is defined %}
SYSLOGON="{{ cron_apt_syslogon }}"
{% endif %}

# Value: error (exit on error only)
# (else never exit)
Expand Down

0 comments on commit b3c986c

Please sign in to comment.