diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2016-02-12 15:25:31 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2016-02-12 20:06:22 +0100 |
commit | fa8d2b668550259e6f78d16fc209c4da1a20b842 (patch) | |
tree | cfa56bc2941f14626cbecf7e785d6c3a9c000e0d /roles/webmail | |
parent | ce731cb119b501b2de58473c6fb0d205d772c004 (diff) |
Upgrade playbooks to Ansible 2.0.
Diffstat (limited to 'roles/webmail')
-rw-r--r-- | roles/webmail/tasks/main.yml | 10 | ||||
-rw-r--r-- | roles/webmail/tasks/roundcube.yml | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/roles/webmail/tasks/main.yml b/roles/webmail/tasks/main.yml index 030a547..8ee50bd 100644 --- a/roles/webmail/tasks/main.yml +++ b/roles/webmail/tasks/main.yml @@ -1,3 +1,9 @@ -- include: mail.yml tags=postfix,mail +- include: mail.yml when: "'out' not in group_names" -- include: roundcube.yml tags=roundcube,webmail + tags: + - postfix + - mail +- include: roundcube.yml + tags: + - roundcube + - webmail diff --git a/roles/webmail/tasks/roundcube.yml b/roles/webmail/tasks/roundcube.yml index 3eaf766..eb04ba1 100644 --- a/roles/webmail/tasks/roundcube.yml +++ b/roles/webmail/tasks/roundcube.yml @@ -23,42 +23,42 @@ apt: pkg={{ item }} default_release={{ ansible_lsb.codename }}-backports with_items: - roundcube-core - roundcube-mysql - roundcube-plugins - php-net-sieve - php-net-ldap3 - php-mail-mimedecode - name: Copy fripost's logo copy: src=usr/share/roundcube/skins/{{ item }}/images/fripost_logo.png dest=/usr/share/roundcube/skins/{{ item }}/images/fripost_logo.png owner=root group=root mode=0644 with_items: - classic - larry - name: Configure Roundcube lineinfile: dest=/etc/roundcube/config.inc.php - "regexp=^\\s*\\$config\\['{{ item.var }}'\\]\\s*=" - "line=$config['{{ item.var }}'] = {{ item.value }};" + regexp='^\\s*\\$config\\[\'{{ item.var }}\'\\]\\s*=' + line='$config[\'{{ item.var }}\'] = {{ item.value }};' owner=root group=www-data mode=0640 with_items: # Logging/Debugging - { var: smtp_log, value: "false" } # IMAP - { var: default_host, value: "'localhost'" } - { var: default_port, value: "143" } - { var: imap_auth_type, value: "'PLAIN'" } - { var: imap_cache, value: "null" } - { var: imap_timeout, value: "180" } - { var: messages_cache, value: "false" } # SMTP - { var: smtp_server, value: "'localhost'" } - { var: smtp_port, value: "2525" } # System - { var: force_https, value: "true" } - { var: login_autocomplete, value: "2" } - { var: skin_logo, value: "'/images/fripost_logo.png'" } - { var: username_domain, value: "'fripost.org'" } @@ -112,27 +112,27 @@ notify: - Restart Nginx - name: Create /etc/nginx/sites-enabled/roundcube file: src=../sites-available/roundcube dest=/etc/nginx/sites-enabled/roundcube owner=root group=root state=link force=yes register: r2 notify: - Restart Nginx - name: Start Nginx service: name=nginx state=started when: not (r1.changed or r2.changed) - meta: flush_handlers - name: Fetch Nginx's X.509 certificate # Ensure we don't fetch private data - sudo: False + become: False fetch: src=/etc/nginx/ssl/mail.fripost.org.pem dest=certs/public/ fail_on_missing=yes flat=yes tags: - genkey |