Browse Source

Calm OCD by sorting almost every with_items block in alphabetical order

Lorenzo Villani 9 years ago
parent
commit
d5ecf673d3

+ 1
- 1
roles/common/tasks/encfs.yml View File

@@ -2,8 +2,8 @@
2 2
   apt: pkg={{ item }} state=installed
3 3
   with_items:
4 4
     - encfs
5
-    - libfuse-dev
6 5
     - fuse
6
+    - libfuse-dev
7 7
 
8 8
 - name: Create encrypted directory
9 9
   file: state=directory path=/encrypted

+ 2
- 2
roles/common/tasks/google_auth.yml View File

@@ -4,9 +4,9 @@
4 4
 - name: Ensure required packages are installed
5 5
   apt: pkg={{ item }} state=present
6 6
   with_items:
7
-    - libqrencode3
8
-    - libpam0g-dev
9 7
     #- libpam-google-authenticator    wasn't available in wheezy
8
+    - libpam0g-dev
9
+    - libqrencode3
10 10
 
11 11
 - name: Download Google authenticator pam module
12 12
   get_url: url=https://google-authenticator.googlecode.com/files/libpam-google-authenticator-{{ google_auth_version }}-source.tar.bz2

+ 2
- 2
roles/common/tasks/google_auth_mod.yml View File

@@ -5,9 +5,9 @@
5 5
 - name: Ensure required packages are installed
6 6
   apt: pkg={{ item }} state=present
7 7
   with_items:
8
-    - libqrencode3
9
-    - libpam0g-dev
10 8
     - libpam-google-authenticator
9
+    - libpam0g-dev
10
+    - libqrencode3
11 11
 
12 12
 - name: Update sshd config to enable challenge responses
13 13
   lineinfile: dest=/etc/ssh/sshd_config

+ 10
- 10
roles/common/tasks/main.yml View File

@@ -10,23 +10,23 @@
10 10
 - name: Install necessities and nice-to-haves
11 11
   apt: pkg={{ item }} state=installed
12 12
   with_items:
13
-    - sudo
14
-    - vim
13
+    - apache2
14
+    - apt-transport-https
15
+    - apticron
16
+    - build-essential
17
+    - debian-goodies
18
+    - git
15 19
     - htop
16 20
     - iftop
17 21
     - iotop
18 22
     - mosh
19
-    - zsh
20
-    - git
23
+    - python-software-properties
21 24
     - ruby1.9.3
22 25
     - screen
23
-    - apache2
24
-    - build-essential
25
-    - apticron
26
+    - sudo
26 27
     - update-notifier-common
27
-    - debian-goodies
28
-    - apt-transport-https
29
-    - python-software-properties
28
+    - vim
29
+    - zsh
30 30
 
31 31
 - name: Install unattended upgrades (Debian/Ubuntu only)
32 32
   apt: pkg=unattended-upgrades state=installed

+ 1
- 1
roles/common/tasks/security.yml View File

@@ -2,8 +2,8 @@
2 2
   apt: pkg={{ item }} state=installed
3 3
   with_items:
4 4
     - fail2ban
5
-    - rkhunter
6 5
     - lynis
6
+    - rkhunter
7 7
 
8 8
 - name: Copy fail2ban configuration into place
9 9
   template: src=etc_fail2ban_jail.local.j2 dest=/etc/fail2ban/jail.local

+ 1
- 1
roles/common/tasks/ufw.yml View File

@@ -17,9 +17,9 @@
17 17
 - name: Set firewall rules for web traffic and SSH
18 18
   ufw: rule=allow port={{ item }} proto=tcp
19 19
   with_items:
20
-    - ssh
21 20
     - http
22 21
     - https
22
+    - ssh
23 23
 
24 24
 - name: Check config of ufw
25 25
   command: cat /etc/ufw/ufw.conf

+ 2
- 2
roles/git/tasks/cgit.yml View File

@@ -3,14 +3,14 @@
3 3
   apt: pkg={{ item }} state=installed
4 4
   with_items:
5 5
     - groff
6
-    - python-pip
7 6
     - libssl-dev
7
+    - python-pip
8 8
 
9 9
 - name: Install cgit pip dependencies
10 10
   pip: name={{ item }}
11 11
   with_items:
12
-    - pygments
13 12
     - docutils
13
+    - pygments
14 14
 
15 15
 - name: Download cgit release
16 16
   get_url: url=http://git.zx2c4.com/cgit/snapshot/cgit-{{ cgit_version }}.tar.xz

+ 7
- 7
roles/ircbouncer/tasks/znc.yml View File

@@ -3,18 +3,18 @@
3 3
 - name: Install znc dependencies
4 4
   apt: pkg={{ item }} state=installed
5 5
   with_items:
6
-    - build-essential
7
-    - libssl-dev
8
-    - openssl
9
-    - swig
10 6
     - automake
11
-    - libtool
12
-    - libsasl2-dev
7
+    - build-essential
13 8
     - checkinstall
14 9
     - g++
10
+    - libperl-dev
11
+    - libsasl2-dev
12
+    - libssl-dev
13
+    - libtool
14
+    - openssl
15 15
     - pkg-config
16 16
     - python3-dev
17
-    - libperl-dev
17
+    - swig
18 18
 
19 19
 - name: Download znc release
20 20
   get_url: url=http://znc.in/releases/archive/znc-{{ znc_version }}.tar.gz dest=/root/znc-{{ znc_version }}.tar.gz

+ 7
- 7
roles/mailserver/tasks/dovecot.yml View File

@@ -3,11 +3,11 @@
3 3
   with_items:
4 4
     - dovecot-core
5 5
     - dovecot-imapd
6
-    - dovecot-pop3d
7 6
     - dovecot-lmtpd
8 7
     - dovecot-managesieved
9
-    - postgresql-9.1
10 8
     - dovecot-pgsql
9
+    - dovecot-pop3d
10
+    - postgresql-9.1
11 11
   when: ansible_distribution_release != 'trusty'
12 12
 
13 13
 - name: Install Dovecot and related packages for Ubuntu trusty
@@ -15,11 +15,11 @@
15 15
   with_items:
16 16
     - dovecot-core
17 17
     - dovecot-imapd
18
-    - dovecot-pop3d
19 18
     - dovecot-lmtpd
20 19
     - dovecot-managesieved
21
-    - postgresql-9.3
22 20
     - dovecot-pgsql
21
+    - dovecot-pop3d
22
+    - postgresql-9.3
23 23
   when: ansible_distribution_release == 'trusty'
24 24
 
25 25
 - name: Create vmail group
@@ -42,11 +42,11 @@
42 42
 - name: Copy additional Dovecot configuration files in place
43 43
   copy: src=etc_dovecot_conf.d_{{ item }} dest=/etc/dovecot/conf.d/{{ item }}
44 44
   with_items:
45
-    - 10-mail.conf
46 45
     - 10-auth.conf
47
-    - auth-sql.conf.ext
46
+    - 10-mail.conf
48 47
     - 10-master.conf
49 48
     - 10-ssl.conf
49
+    - auth-sql.conf.ext
50 50
   notify: restart dovecot
51 51
 
52 52
 - name: Template 15-lda.conf
@@ -65,5 +65,5 @@
65 65
 - name: Set firewall rules for dovecot
66 66
   ufw: rule=allow port={{ item }} proto=tcp
67 67
   with_items:
68
-    - pop3s
69 68
     - imaps
69
+    - pop3s

+ 2
- 3
roles/mailserver/tasks/dspam.yml View File

@@ -1,10 +1,10 @@
1 1
 - name: Install dspam and related packages
2 2
   apt: pkg={{ item }} state=installed
3 3
   with_items:
4
-    - dspam
5 4
     - dovecot-antispam
6
-    - postfix-pcre
7 5
     - dovecot-sieve
6
+    - dspam
7
+    - postfix-pcre
8 8
 
9 9
 - name: Create dspam directory
10 10
   file: state=directory path=/decrypted/dspam group=dspam owner=dspam
@@ -28,4 +28,3 @@
28 28
     - 20-imap.conf
29 29
     - 90-plugin.conf
30 30
   notify: restart dovecot
31
-

+ 11
- 11
roles/mailserver/tasks/postfix.yml View File

@@ -1,27 +1,27 @@
1 1
 - name: Install Postfix 9.1 and related packages
2 2
   apt: pkg={{ item }} state=installed
3 3
   with_items:
4
-    - postfix
5 4
     - libsasl2-modules
6
-    - sasl2-bin
7
-    - postgrey
8
-    - postgresql-9.1
5
+    - postfix
6
+    - postfix-pcre
9 7
     - postfix-pgsql
8
+    - postgresql-9.1
9
+    - postgrey
10 10
     - python-psycopg2
11
-    - postfix-pcre
11
+    - sasl2-bin
12 12
   when: ansible_distribution_release != 'trusty'
13 13
 
14 14
 - name: Install Postfix 9.3 and related packages for Ubuntu Trusty
15 15
   apt: pkg={{ item }} state=installed
16 16
   with_items:
17
-    - postfix
18 17
     - libsasl2-modules
19
-    - sasl2-bin
20
-    - postgrey
21
-    - postgresql-9.3
18
+    - postfix
19
+    - postfix-pcre
22 20
     - postfix-pgsql
21
+    - postgresql-9.3
22
+    - postgrey
23 23
     - python-psycopg2
24
-    - postfix-pcre
24
+    - sasl2-bin
25 25
   when: ansible_distribution_release == 'trusty'
26 26
 
27 27
 - name: Set postgres password
@@ -59,9 +59,9 @@
59 59
 - name: Copy additional postfix configuration files
60 60
   template: src=etc_postfix_{{ item }}.j2 dest=/etc/postfix/{{ item }} owner=root group=root
61 61
   with_items:
62
+    - pgsql-virtual-alias-maps.cf
62 63
     - pgsql-virtual-mailbox-domains.cf
63 64
     - pgsql-virtual-mailbox-maps.cf
64
-    - pgsql-virtual-alias-maps.cf
65 65
   notify: restart postfix
66 66
 
67 67
 - name: Set firewall rules for postfix

+ 1
- 1
roles/mailserver/tasks/solr.yml View File

@@ -1,8 +1,8 @@
1 1
 - name: Install Solr and related packages
2 2
   apt: pkg={{ item }} state=installed
3 3
   with_items:
4
-    - solr-tomcat
5 4
     - dovecot-solr
5
+    - solr-tomcat
6 6
 
7 7
 - name: Work around Debian bug and copy Solr schema file into place
8 8
   copy: src=solr-schema.xml dest=/etc/solr/conf/schema.xml group=root owner=root

+ 3
- 3
roles/mailserver/tasks/z-push.yml View File

@@ -1,13 +1,13 @@
1 1
 - name: Install required packages for z-push
2 2
   apt: pkg={{ item }} state=installed
3 3
   with_items:
4
+    - php-soap
4 5
     - php5
5 6
     - php5-cli
6
-    - php-soap
7 7
     - php5-imap
8
-    
8
+
9 9
 - name: Download z-push release
10
-  get_url: 
10
+  get_url:
11 11
     url=http://download.z-push.org/final/2.1/z-push-{{ zpush_version }}.tar.gz
12 12
     dest=/root/z-push-{{ zpush_version }}.tar.gz
13 13
 

+ 1
- 1
roles/monitoring/tasks/logwatch.yml View File

@@ -1,8 +1,8 @@
1 1
 - name: Install logwatch
2 2
   apt: pkg={{ item }} state=installed
3 3
   with_items:
4
-    - logwatch
5 4
     - libdate-manip-perl
5
+    - logwatch
6 6
 
7 7
 - name: Configure logwatch
8 8
   template: src=etc_logwatch_conf_logwatch.conf.j2 dest=/etc/logwatch/conf/logwatch.conf

+ 1
- 1
roles/monitoring/tasks/monit.yml View File

@@ -8,8 +8,8 @@
8 8
   copy: src=etc_monit_conf.d_{{ item }} dest=/etc/monit/conf.d/{{ item }}
9 9
   with_items:
10 10
     - apache2
11
-    - pgsql
12 11
     - dovecot
12
+    - pgsql
13 13
     - postfix
14 14
     - sshd
15 15
     - tomcat

+ 1
- 1
roles/owncloud/tasks/owncloud.yml View File

@@ -22,8 +22,8 @@
22 22
 - name: Install PHP dependencies
23 23
   apt: pkg={{ item }} state=present
24 24
   with_items:
25
-    - php-apc
26 25
     - libapache2-mod-php5
26
+    - php-apc
27 27
 
28 28
 - name: Owncloud www directory
29 29
   file: state=directory path=/var/www/owncloud

+ 3
- 3
roles/readlater/tasks/wallabag.yml View File

@@ -15,11 +15,11 @@
15 15
   apt: pkg={{ item }} state=present
16 16
   with_items:
17 17
     - php5
18
-    - php5-mcrypt
19
-    - php5-tidy
20 18
     - php5-curl
19
+    - php5-mcrypt
21 20
     - php5-pgsql
22
-    
21
+    - php5-tidy
22
+
23 23
 - name: Create database user for wallabag
24 24
   postgresql_user: login_host=localhost
25 25
                    login_user={{ db_admin_username }}

+ 1
- 1
roles/tarsnap/tasks/tarsnap.yml View File

@@ -8,9 +8,9 @@
8 8
   when: tarnsap_installed|failed
9 9
   apt: pkg={{ item }} state=installed
10 10
   with_items:
11
+    - e2fslibs-dev
11 12
     - libssl-dev
12 13
     - zlib1g-dev
13
-    - e2fslibs-dev
14 14
 
15 15
 - name: Download the current tarsnap code signing key
16 16
   when: tarnsap_installed|failed

+ 1
- 1
roles/vpn/tasks/openvpn.yml View File

@@ -5,9 +5,9 @@
5 5
 - name: Install OpenVPN and dependencies from apt
6 6
   apt: pkg={{ item }} state=installed
7 7
   with_items:
8
+    - dnsmasq
8 9
     - openvpn
9 10
     - udev
10
-    - dnsmasq
11 11
 
12 12
 - name: Generate RSA keys for the CA and Server
13 13
   command: openssl genrsa -out {{ item }}.key {{ openvpn_key_size }}

+ 3
- 4
roles/webmail/tasks/roundcube.yml View File

@@ -2,8 +2,8 @@
2 2
   apt: pkg={{ item }} state=latest
3 3
   with_items:
4 4
     - roundcube
5
-    - roundcube-plugins
6 5
     - roundcube-pgsql
6
+    - roundcube-plugins
7 7
 
8 8
 - name: Configure Roundcube database
9 9
   template: src={{ item.src }} dest={{ item.dest }} group={{ item.group }} mode={{ item.mode }} owner=root force=yes
@@ -44,13 +44,12 @@
44 44
 - name: Configure roundcube
45 45
   copy: src={{ item.src }} dest={{ item.dest }} group=www-data owner=root mode=640 force=yes
46 46
   with_items:
47
+  - { src: 'etc_roundcube_global.sieve',                                          dest: '/etc/roundcube/global.sieve' }
47 48
   - { src: 'etc_roundcube_main.inc.php',                                          dest: '/etc/roundcube/main.inc.php' }
48
-  - { src: 'usr_share_roundcube_plugins_managesieve_config.inc.php',              dest: '/usr/share/roundcube/plugins/managesieve/config.inc.php' }
49 49
   - { src: 'usr_share_roundcube_plugins_carddav_config.inc.php',                  dest: '/usr/share/roundcube/plugins/carddav/config.inc.php' }
50
+  - { src: 'usr_share_roundcube_plugins_managesieve_config.inc.php',              dest: '/usr/share/roundcube/plugins/managesieve/config.inc.php' }
50 51
   - { src: 'usr_share_roundcube_plugins_twofactor_gauthenticator_config.inc.php', dest: '/usr/share/roundcube/plugins/twofactor_gauthenticator/config.inc.php' }
51
-  - { src: 'etc_roundcube_global.sieve',                                          dest: '/etc/roundcube/global.sieve' }
52 52
 
53 53
 - name: Enable roundcube site
54 54
   command: a2ensite roundcube.conf creates=/etc/apache2/sites-enabled/roundcube.conf
55 55
   notify: restart apache
56
-

Loading…
Cancel
Save