Created
March 5, 2016 09:44
-
-
Save ju5t/62aca37fbb92b2908966 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# | |
# Patch exim.conf version 2.1.1 to include keep_environment=PWD | |
# | |
- hosts: directadmin | |
serial: 10 | |
max_fail_percentage: 20 | |
tasks: | |
- name: "patch: check exim.conf version" | |
shell: "grep -c 'SpamBlocker.exim.conf.2.1.*-release' /etc/exim.conf" | |
register: exim_conf_2_1_1 | |
changed_when: False | |
failed_when: False | |
- name: "patch: /etc/exim.conf" | |
lineinfile: | |
dest=/etc/exim.conf | |
state=present | |
insertbefore="^(#)?\.include_if_exists\ \/etc\/exim\.clamav\.load\.conf" | |
line="keep_environment=PWD" | |
register: exim_patch | |
when: exim_conf_2_1_1.rc == 0 | |
- name: "patch: restart exim" | |
service: | |
name=exim | |
state=restarted | |
when: exim_patch.changed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment