summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2018-12-03 03:21:42 +0100
committerGuilhem Moulin <guilhem@fripost.org>2018-12-03 03:43:42 +0100
commitcfedc9e785831d54195b120300932f74f9808daf (patch)
tree3f906311a6d2a7340b9d9012f23c07c95e8015b2
parentf01876604da167b36780e53ce54cd89c8f9d5f85 (diff)
Upgrade syntax to Ansible 2.7 (apt module).
-rw-r--r--roles/IMAP/tasks/imap.yml5
-rw-r--r--roles/IMAP/tasks/mda.yml5
-rw-r--r--roles/IMAP/tasks/spam.yml5
-rw-r--r--roles/MSA/tasks/main.yml5
-rw-r--r--roles/MX/tasks/main.yml5
-rw-r--r--roles/amavis/tasks/main.yml5
-rw-r--r--roles/bacula-dir/tasks/main.yml5
-rw-r--r--roles/common-LDAP/tasks/main.yml5
-rw-r--r--roles/common-SQL/tasks/main.yml5
-rw-r--r--roles/common/tasks/apt.yml5
-rw-r--r--roles/common/tasks/clamav.yml5
-rw-r--r--roles/common/tasks/firewall.yml5
-rw-r--r--roles/common/tasks/ipsec.yml5
-rw-r--r--roles/common/tasks/logging.yml5
-rw-r--r--roles/common/tasks/mail.yml5
-rw-r--r--roles/common/tasks/main.yml5
-rw-r--r--roles/common/tasks/munin-node.yml5
-rw-r--r--roles/common/tasks/rkhunter.yml5
-rw-r--r--roles/git/tasks/cgit.yml5
-rw-r--r--roles/lists/tasks/mail.yml5
-rw-r--r--roles/lists/tasks/mlmmj.yml5
-rw-r--r--roles/lists/tasks/sympa.yml5
-rw-r--r--roles/munin-master/tasks/main.yml5
-rw-r--r--roles/webmail/tasks/roundcube.yml15
-rw-r--r--roles/wiki/tasks/main.yml5
25 files changed, 81 insertions, 54 deletions
diff --git a/roles/IMAP/tasks/imap.yml b/roles/IMAP/tasks/imap.yml
index 75b250d..18aa910 100644
--- a/roles/IMAP/tasks/imap.yml
+++ b/roles/IMAP/tasks/imap.yml
@@ -1,23 +1,24 @@
- name: Install Dovecot
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- dovecot-core
- dovecot-ldap
- dovecot-imapd
- dovecot-lmtpd
- dovecot-antispam
- dovecot-managesieved
- dovecot-sieve
- name: Create a user 'vmail'
user: name=vmail system=yes
createhome=no
home=/home/mail
shell=/usr/sbin/nologin
password=!
state=present
- name: Copy dovecot auth proxy
copy: src=usr/local/bin/dovecot-auth-proxy.pl
dest=/usr/local/bin/dovecot-auth-proxy.pl
owner=root group=staff
diff --git a/roles/IMAP/tasks/mda.yml b/roles/IMAP/tasks/mda.yml
index 1510103..f705fe7 100644
--- a/roles/IMAP/tasks/mda.yml
+++ b/roles/IMAP/tasks/mda.yml
@@ -1,23 +1,24 @@
- name: Install Postfix
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- postfix
- postfix-ldap
- name: Configure Postfix
template: src=etc/postfix/{{ item }}.j2
dest=/etc/postfix-{{ postfix_instance[inst].name }}/{{ item }}
owner=root group=root
mode=0644
with_items:
- main.cf
- master.cf
notify:
- Reload Postfix
- name: Copy the transport and recipient canonical maps
copy: src=etc/postfix/{{ item }}
dest=/etc/postfix-{{ postfix_instance[inst].name }}/{{ item }}
owner=root group=root
mode=0644
with_items:
diff --git a/roles/IMAP/tasks/spam.yml b/roles/IMAP/tasks/spam.yml
index 3091b85..c275b55 100644
--- a/roles/IMAP/tasks/spam.yml
+++ b/roles/IMAP/tasks/spam.yml
@@ -1,23 +1,24 @@
- name: Install spamassassin
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
# The following two lines are for the policy lookup (made by amavis)
- libnet-ldap-perl
- libauthen-sasl-perl
- razor
- spamassassin
- spamc
- libdbi-perl
- re2c
- libc6-dev
- gcc
- make
notify:
- Compile Spamassassin rules
- Restart Amavis
- name: Create a 'spamassassin' database
mysql_db: name=spamassassin state=present
encoding=latin1 collation=latin1_general_ci
notify:
- Copy SQL tables for spamassassin
diff --git a/roles/MSA/tasks/main.yml b/roles/MSA/tasks/main.yml
index 4f32df3..65d1dae 100644
--- a/roles/MSA/tasks/main.yml
+++ b/roles/MSA/tasks/main.yml
@@ -1,23 +1,24 @@
- name: Install Postfix
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- postfix
- postfix-pcre
- name: Copy Postfix sender login socketmap
copy: src=usr/local/bin/postfix-sender-login.pl
dest=/usr/local/bin/postfix-sender-login.pl
owner=root group=staff
mode=0755
- name: Copy Postfix sender login socketmap systemd unit files
copy: src=etc/systemd/system/{{ item }}
dest=/etc/systemd/system/{{ item }}
owner=root group=root
mode=0644
with_items:
- postfix-sender-login.service
- postfix-sender-login.socket
notify:
- systemctl daemon-reload
diff --git a/roles/MX/tasks/main.yml b/roles/MX/tasks/main.yml
index 6092301..507a4f2 100644
--- a/roles/MX/tasks/main.yml
+++ b/roles/MX/tasks/main.yml
@@ -1,23 +1,24 @@
- name: Install Postfix
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- postfix
- postfix-pcre
- postfix-ldap
- postfix-lmdb
# The following is for reserved-alias.pl
- libnet-ldap-perl
- libauthen-sasl-perl
- name: Configure Postfix
template: src=etc/postfix/{{ item }}.j2
dest=/etc/postfix-{{ postfix_instance[inst].name }}/{{ item }}
owner=root group=root
mode=0644
with_items:
- main.cf
- master.cf
- access-list.cidr
notify:
- Reload Postfix
diff --git a/roles/amavis/tasks/main.yml b/roles/amavis/tasks/main.yml
index ce43c9c..936703a 100644
--- a/roles/amavis/tasks/main.yml
+++ b/roles/amavis/tasks/main.yml
@@ -1,23 +1,24 @@
- name: Install amavis and its decoders
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- amavisd-new
- libnet-ldap-perl
# Mail::DKIM
- libmail-dkim-perl
- gzip
- bzip2
- xz-utils
- lzop
- rpm2cpio
- pax
- binutils
- p7zip-full
- unrar-free
- arj
- nomarch
- zoo
- ripole
- cabextract
- unar
- tnef
diff --git a/roles/bacula-dir/tasks/main.yml b/roles/bacula-dir/tasks/main.yml
index 4cacc6e..723aa22 100644
--- a/roles/bacula-dir/tasks/main.yml
+++ b/roles/bacula-dir/tasks/main.yml
@@ -1,23 +1,24 @@
- name: Install bacula-director
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- bacula-console
- bacula-director-mysql
- name: Create a 'bacula' SQL user
mysql_user2: name=bacula password= auth_plugin=unix_socket
state=present
notify:
- Restart bacula-director
# Create with:
# echo bconsole $(pwgen -sn 64 1) | sudo tee -a /etc/bacula/passwords-dir
# echo $sd-sd $(pwgen -sn 64 1) | sudo tee -a /etc/bacula/passwords-dir
# echo $fd-fd $(pwgen -sn 64 1) | sudo tee -a /etc/bacula/passwords-dir
#
# then add the password for each FD / SD:
# echo $director-dir $password | sudo tee /etc/bacula/passwords-sd
# echo $director-dir $password | sudo tee /etc/bacula/passwords-fd
- name: Ensure /etc/bacula/passwords-dir exists
file: path=/etc/bacula/passwords-dir
state=file
diff --git a/roles/common-LDAP/tasks/main.yml b/roles/common-LDAP/tasks/main.yml
index 22265cd..5255cdf 100644
--- a/roles/common-LDAP/tasks/main.yml
+++ b/roles/common-LDAP/tasks/main.yml
@@ -1,25 +1,26 @@
# XXX If #742056 gets fixed, we should preseed slapd to use peercreds as
# RootDN once the fix enters stable.
- name: Install OpenLDAP
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- slapd
- ldap-utils
- ldapvi
- db-util
- python-ldap
# for the 'slapd2' munin plugin
- libnet-ldap-perl
- libauthen-sasl-perl
- name: Configure slapd
template: src=etc/default/slapd.j2
dest=/etc/default/slapd
owner=root group=root
mode=0644
register: r1
notify:
- Restart slapd
- name: Create directory /etc/ldap/ssl
file: path=/etc/ldap/ssl
diff --git a/roles/common-SQL/tasks/main.yml b/roles/common-SQL/tasks/main.yml
index 73b6878..d6ab1c4 100644
--- a/roles/common-SQL/tasks/main.yml
+++ b/roles/common-SQL/tasks/main.yml
@@ -1,23 +1,24 @@
- name: Install MariaDB
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- mariadb-common
- mariadb-server
- python-mysqldb
# for the 'mysql_' munin plugin
- libcache-cache-perl
- name: Copy MySQL's configuration
copy: src=etc/mysql/my.cnf
dest=/etc/mysql/my.cnf
owner=root group=root
mode=0644
register: r
notify:
- Restart MySQL
# We need to restart now and load the relevant authplugin before we
# connect to the database.
- meta: flush_handlers
# XXX Dirty fix for #742046
diff --git a/roles/common/tasks/apt.yml b/roles/common/tasks/apt.yml
index 2f5a62a..8df3e8f 100644
--- a/roles/common/tasks/apt.yml
+++ b/roles/common/tasks/apt.yml
@@ -1,23 +1,24 @@
- name: Install various APT tools
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- apt
- apt-listchanges
- apt-show-versions
- debian-archive-keyring
- debian-goodies
- needrestart
- unattended-upgrades
- debfoster
- deborphan
- debsums
- name: Configure APT (1)
template: src=etc/apt/{{ item }}.j2
dest=/etc/apt/{{ item }}
owner=root group=root
mode=0644
with_items:
- sources.list
- preferences
notify:
diff --git a/roles/common/tasks/clamav.yml b/roles/common/tasks/clamav.yml
index 28a8460..437387b 100644
--- a/roles/common/tasks/clamav.yml
+++ b/roles/common/tasks/clamav.yml
@@ -1,23 +1,24 @@
- name: Install ClamAV
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- clamav
- clamav-daemon
- clamav-freshclam
- name: Configure FreshClam
template: src=etc/clamav/freshclam.conf.j2
dest=/etc/clamav/freshclam.conf
owner=clamav group=adm
mode=0444
tags: freshclam
notify:
- Restart freshclam
- name: Start ClamAV
service: name={{ item }} state=started
with_items:
- clamav-daemon
- clamav-freshclam
- name: Add a 'clamav' alias
diff --git a/roles/common/tasks/firewall.yml b/roles/common/tasks/firewall.yml
index d418326..133b631 100644
--- a/roles/common/tasks/firewall.yml
+++ b/roles/common/tasks/firewall.yml
@@ -1,23 +1,24 @@
- name: Install some packages required for the firewall
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- iptables
- netmask
- bsdutils
- name: Create directory /etc/iptables
file: path=/etc/iptables
state=directory
owner=root group=root
mode=0755
- name: Generate /etc/iptables/services
template: src=etc/iptables/services.j2
dest=/etc/iptables/services
owner=root group=root
mode=0600
- name: Copy /usr/local/sbin/update-firewall.sh
copy: src=usr/local/sbin/update-firewall.sh
dest=/usr/local/sbin/update-firewall.sh
owner=root group=staff
diff --git a/roles/common/tasks/ipsec.yml b/roles/common/tasks/ipsec.yml
index ce158fe..989541b 100644
--- a/roles/common/tasks/ipsec.yml
+++ b/roles/common/tasks/ipsec.yml
@@ -1,23 +1,24 @@
- name: Install strongSwan
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- strongswan-charon
# for the GCM and openssl plugins
- libstrongswan-standard-plugins
notify:
- Update firewall
- Restart IPsec
- name: Auto-create a dedicated virtual subnet for IPsec
template: src=etc/network/if-up.d/ipsec.j2
dest=/etc/network/if-up.d/ipsec
owner=root group=root
mode=0755
notify:
- Reload networking
- name: Auto-deactivate the dedicated virtual subnet for IPsec
file: src=../if-up.d/ipsec
dest=/etc/network/if-down.d/ipsec
owner=root group=root state=link force=yes
diff --git a/roles/common/tasks/logging.yml b/roles/common/tasks/logging.yml
index b27fc41..b602a49 100644
--- a/roles/common/tasks/logging.yml
+++ b/roles/common/tasks/logging.yml
@@ -1,23 +1,24 @@
- name: Install logging server & utilities
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- rsyslog
- syslog-summary
- logcheck
- logcheck-database
- logrotate
- name: Configure rsyslog
copy: src=etc/rsyslog.conf
dest=/etc/rsyslog.conf
owner=root group=root
mode=0644
register: r1
notify:
- Restart rsyslog
tags:
- syslog
- name: Configure postfix's custom rsyslog rules
template: src=etc/rsyslog.d/postfix.conf.j2
dest=/etc/rsyslog.d/postfix.conf
diff --git a/roles/common/tasks/mail.yml b/roles/common/tasks/mail.yml
index 49815f5..139386f 100644
--- a/roles/common/tasks/mail.yml
+++ b/roles/common/tasks/mail.yml
@@ -1,23 +1,24 @@
- name: Install Postfix
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
# That one is nicer than GNU mailutils' mailx(1)
- s-nail
- postfix
- postfix-lmdb
- name: Create Postfix instances
postmulti: instance={{ postfix_instance[item].name }}
group={{ postfix_instance[item].group | default('') }}
register: r1
with_items: "{{ postfix_instance.keys() | intersect(group_names) | list }}"
notify:
- Restart Postfix
- name: Link the dynamic maps of each children to the master's
# main.cf and master.cf are specialized to each dedicated role, though
file: src=../postfix/dynamicmaps.cf
dest=/etc/postfix-{{ postfix_instance[item].name }}/dynamicmaps.cf
owner=root group=root
state=link force=yes
register: r2
diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml
index c978e91..7795da8 100644
--- a/roles/common/tasks/main.yml
+++ b/roles/common/tasks/main.yml
@@ -52,31 +52,32 @@
- ipsec
when: "groups.all | length > 1"
- import_tasks: logging.yml
tags: logging
- import_tasks: ntp.yml
tags: ntp
- import_tasks: mail.yml
tags:
- mail
- postfix
- import_tasks: bacula.yml
tags:
- bacula-fd
- bacula
- import_tasks: munin-node.yml
tags:
- munin-node
- munin
- name: Install common packages
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- ca-certificates
- etckeeper
- ethtool
- git
- htop
- molly-guard
- rsync
- screen
- telnet-ssl
diff --git a/roles/common/tasks/munin-node.yml b/roles/common/tasks/munin-node.yml
index d4f8d95..f43094a 100644
--- a/roles/common/tasks/munin-node.yml
+++ b/roles/common/tasks/munin-node.yml
@@ -1,23 +1,24 @@
- name: Install munin-node
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- munin-node
- munin-plugins-extra
###
- acpi
- lm-sensors
- ethtool
- hdparm
- libwww-perl
- libxml-simple-perl
- logtail
- name: Create directory /usr/local/share/munin/plugins
file: path=/usr/local/share/munin/plugins
state=directory
owner=root group=root
mode=0755
- name: Copy our own Munin plugins
copy: src={{ item }}
dest=/usr/local/share/munin/plugins/
diff --git a/roles/common/tasks/rkhunter.yml b/roles/common/tasks/rkhunter.yml
index c9d26fa..64f2aac 100644
--- a/roles/common/tasks/rkhunter.yml
+++ b/roles/common/tasks/rkhunter.yml
@@ -1,23 +1,24 @@
- name: Install rkhunter
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- rkhunter
- curl
- iproute2
- lsof
- unhide
# To test the configuration:
# ansible all -m command -a '/usr/bin/rkhunter -c --nomow --rwo'
- name: Configure rkhunter
copy: src=etc/{{ item }}
dest=/etc/{{ item }}
owner=root group=root
mode=0644
with_items:
- rkhunter.conf
- default/rkhunter
notify:
# This might not always be necessary, but it's not like we would
# change the config every day...
- Update rkhunter's data file
diff --git a/roles/git/tasks/cgit.yml b/roles/git/tasks/cgit.yml
index 1dd2cd6..160ede6 100644
--- a/roles/git/tasks/cgit.yml
+++ b/roles/git/tasks/cgit.yml
@@ -1,23 +1,24 @@
- name: Install cgit
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- cgit
- highlight
- uwsgi
- name: Configure cgit
copy: src=etc/cgitrc
dest=/etc/cgitrc
owner=root group=root
mode=0644
register: r1
notify:
- Restart uWSGI
- name: Copy /usr/lib/cgit/filters/syntax-highlighting2.sh
copy: src=usr/lib/cgit/filters/syntax-highlighting2.sh
dest=/usr/lib/cgit/filters/syntax-highlighting2.sh
owner=root group=root
mode=0755
register: r2
notify:
diff --git a/roles/lists/tasks/mail.yml b/roles/lists/tasks/mail.yml
index 8705f91..44b96e5 100644
--- a/roles/lists/tasks/mail.yml
+++ b/roles/lists/tasks/mail.yml
@@ -1,23 +1,24 @@
- name: Install Postfix
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- postfix
- postfix-ldap
- name: Configure Postfix
template: src=etc/postfix/{{ item }}.j2
dest=/etc/postfix-{{ postfix_instance[inst].name }}/{{ item }}
owner=root group=root
mode=0644
with_items:
- main.cf
- master.cf
notify:
- Reload Postfix
- name: Copy the transport maps
copy: src=etc/postfix/transport
dest=/etc/postfix-{{ postfix_instance[inst].name }}/transport
owner=root group=root
mode=0644
# no need to reload upon change, as cleanup(8) is short-running
diff --git a/roles/lists/tasks/mlmmj.yml b/roles/lists/tasks/mlmmj.yml
index 45fc8f4..aeaaedc 100644
--- a/roles/lists/tasks/mlmmj.yml
+++ b/roles/lists/tasks/mlmmj.yml
@@ -1,23 +1,24 @@
- name: Install MLMMJ
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- mlmmj
# Weird the debian package doesn't do it by itself...
- name: Create a user 'mlmmj'
user: name=mlmmj system=yes
createhome=no
home=/var/spool/mlmmj
shell=/usr/sbin/nologin
password=!
state=present
- name: Add 'www-data' to the group 'mlmmj'
user: name=www-data groups=mlmmj append=yes
- name: Create a home directory for user 'mlmmj'
file: path=/var/spool/mlmmj
state=directory
owner=mlmmj group=mlmmj
mode=0700
diff --git a/roles/lists/tasks/sympa.yml b/roles/lists/tasks/sympa.yml
index 3b4ac9f..284f320 100644
--- a/roles/lists/tasks/sympa.yml
+++ b/roles/lists/tasks/sympa.yml
@@ -1,22 +1,23 @@
-- apt: pkg={{ item }} install_recommends=no
- with_items:
+- apt: pkg={{ packages }} install_recommends=no
+ vars:
+ packages:
- mariadb-server
- sympa
- libnet-dns-perl
- libnet-dns-sec-perl
- libmail-dkim-perl
- libcrypt-smime-perl
- libcrypt-openssl-x509-perl
- name: Make the 'sympa' MySQL user use unix_socket
mysql_user2: name=sympa password= auth_plugin=unix_socket
state=present
# XXX We want to change the retun-path for sendpasswd notices from
# 'sympa-request@$robot' to 'noreply@fripost.org'.
# * /usr/lib/cgi-bin/sympa/wwsympa.fcgi
# do_requestpasswd, do_subrequest
# add $param->{'return_path'}='noreply@fripost.org';
# * /usr/share/sympa/lib/List.pm
# send_global_file
# $data->{'return_path'} //= &Conf::get_robot_conf($robot, 'request');
diff --git a/roles/munin-master/tasks/main.yml b/roles/munin-master/tasks/main.yml
index 8c7a6a6..9ed3577 100644
--- a/roles/munin-master/tasks/main.yml
+++ b/roles/munin-master/tasks/main.yml
@@ -1,23 +1,24 @@
- name: Install munin
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- munin
- rrdcached
- libcgi-fast-perl
- name: Configure rrdcached
lineinfile: "dest=/etc/default/rrdcached
regexp='^#?OPTS='
line='OPTS=\"-s munin -m 660 -l unix:/var/run/rrdcached.sock -w 1800 -z 1800 -f 3600 -j /var/lib/rrdcached/journal -F -b /var/lib/munin -B\"'"
register: r
notify:
- Restart rrdcached
- name: Start rrdcached
service: name=rrdcached state=started
when: not r.changed
- meta: flush_handlers
- name: Create directory /var/lib/munin/cgi-tmp/munin-cgi-graph
file: path=/var/lib/munin/cgi-tmp/munin-cgi-graph
diff --git a/roles/webmail/tasks/roundcube.yml b/roles/webmail/tasks/roundcube.yml
index 5f41ba0..699815a 100644
--- a/roles/webmail/tasks/roundcube.yml
+++ b/roles/webmail/tasks/roundcube.yml
@@ -1,70 +1,73 @@
- name: Install PHP
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- php5-fpm
- php5-ldap
- php5-gd
- php5-apcu
# spell-checking
- php5-enchant
- name: Configure PHP5 APCu
copy: src=etc/php5/mods-available/apcu.ini
dest=/etc/php5/mods-available/apcu.ini
owner=root group=root
mode=0644
notify:
- Restart php5
- name: Configure PHP5 Zend opcache
lineinfile: dest=/etc/php5/fpm/php.ini
regexp='^;?{{ item.var }}\\s*='
line="{{ item.var }} = {{ item.value }}"
owner=root group=root
mode=0644
with_items:
- { var: opcache.enable, value: 1 }
- { var: opcache.enable_cli, value: 1 }
- { var: opcache.memory_consumption, value: 128 }
- { var: opcache.interned_strings_buffer, value: 8 }
- { var: opcache.max_accelerated_files, value: 2048 }
- { var: opcache.revalidate_freq, value: 60 }
- { var: opcache.fast_shutdown, value: 1 }
notify:
- Restart php5
- name: Install GNU Aspell and some dictionaries
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- aspell
- aspell-da
- aspell-de
- aspell-en
- aspell-es
- aspell-fr
- aspell-no
- aspell-sv
- name: Install Roundcube
- apt: pkg={{ item }} default_release={{ ansible_lsb.codename }}-backports
- with_items:
+ apt: pkg={{ packages }} default_release={{ ansible_lsb.codename }}-backports
+ vars:
+ packages:
- roundcube-core
- roundcube-mysql
- roundcube-plugins
- php-net-sieve
- php-net-ldap3
- 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 }};'
owner=root group=www-data
diff --git a/roles/wiki/tasks/main.yml b/roles/wiki/tasks/main.yml
index 3cd3e51..718b433 100644
--- a/roles/wiki/tasks/main.yml
+++ b/roles/wiki/tasks/main.yml
@@ -1,23 +1,24 @@
- name: Install ikiwiki
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- ikiwiki
- libauthen-passphrase-perl
- highlight-common
- libhighlight-perl
- libimage-magick-perl
- libmail-sendmail-perl
- libnet-dns-sec-perl
- fcgiwrap
- pandoc
- name: Create a user 'ikiwiki'
user: name=ikiwiki system=yes
home=/var/lib/ikiwiki
shell=/usr/sbin/nologin
password=!
state=present
generate_ssh_key=yes
ssh_key_comment=ikiwiki@{{ ansible_fqdn }}
- name: Add 'www-data' to the group 'ikiwiki'