Fix sa-update key import.

This commit is contained in:
Markus 2016-04-06 23:47:14 +02:00
parent ae42cedb2c
commit 1d2836001e

View File

@ -127,16 +127,15 @@
become_user: amavis become_user: amavis
- name: Download GPG key for Sought ruleset - name: Download GPG key for Sought ruleset
get_url: url=http://yerp.org/rules/GPG.KEY dest=/etc/spamassassin/sought_ruleset.key get_url: url=http://yerp.org/rules/GPG.KEY dest=/etc/spamassassin/sought.key
- name: Import GPG key for Sought ruleset - name: Import GPG key for Sought ruleset
become: yes
become_user: debian-spamd become_user: debian-spamd
register: gpg_import shell: sa-update --gpghomedir /var/lib/spamassassin/sa-update-keys --import /etc/spamassassin/sought.key && touch sought.imported chdir=/var/lib/spamassassin creates=sought.imported
command: sa-update --import /etc/spamassassin/sought_ruleset.key
changed_when: 'gpg_import.stderr.find("imported") != -1'
- name: Enable sa-update cron-job - name: Enable sa-update cron-job
cron: name=sa-update minute="0" hour="*/6" job="/usr/bin/sa-update -v --gpgkey 6C6191E3 --channel sought.rules.yerp.org --channel updates.spamassassin.org" cron: name=sa-update minute="0" hour="*/6" job="/usr/bin/sa-update -v --gpghomedir /var/lib/spamassassin/sa-update-keys --gpgkey 6C6191E3 --channel sought.rules.yerp.org --channel updates.spamassassin.org"
- name: Enable spamd cron-job - name: Enable spamd cron-job
copy: src={{ item }} dest=/etc/{{ item }} copy: src={{ item }} dest=/etc/{{ item }}