瀏覽代碼

Merge pull request #281 from lvillani/ocd

Merge pull request #281. Awesome.
Alex Payne 10 年之前
父節點
當前提交
7e470e077b

+ 1
- 1
roles/common/tasks/encfs.yml 查看文件

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

+ 2
- 2
roles/common/tasks/google_auth.yml 查看文件

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

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

+ 10
- 10
roles/common/tasks/main.yml 查看文件

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

+ 1
- 1
roles/common/tasks/security.yml 查看文件

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

+ 1
- 1
roles/common/tasks/ufw.yml 查看文件

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

+ 2
- 2
roles/git/tasks/cgit.yml 查看文件

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

+ 7
- 7
roles/ircbouncer/tasks/znc.yml 查看文件

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

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

+ 2
- 3
roles/mailserver/tasks/dspam.yml 查看文件

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

+ 11
- 11
roles/mailserver/tasks/postfix.yml 查看文件

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

+ 1
- 1
roles/mailserver/tasks/solr.yml 查看文件

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

+ 3
- 3
roles/mailserver/tasks/z-push.yml 查看文件

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

+ 1
- 1
roles/monitoring/tasks/logwatch.yml 查看文件

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

+ 1
- 1
roles/monitoring/tasks/monit.yml 查看文件

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

+ 1
- 1
roles/owncloud/tasks/owncloud.yml 查看文件

38
 - name: Install PHP dependencies
38
 - name: Install PHP dependencies
39
   apt: pkg={{ item }} state=present
39
   apt: pkg={{ item }} state=present
40
   with_items:
40
   with_items:
41
-    - php-apc
42
     - libapache2-mod-php5
41
     - libapache2-mod-php5
42
+    - php-apc
43
 
43
 
44
 - name: Owncloud www directory
44
 - name: Owncloud www directory
45
   file: state=directory path=/var/www/owncloud
45
   file: state=directory path=/var/www/owncloud

+ 3
- 3
roles/readlater/tasks/wallabag.yml 查看文件

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

+ 1
- 1
roles/tarsnap/tasks/tarsnap.yml 查看文件

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

+ 1
- 1
roles/vpn/tasks/openvpn.yml 查看文件

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

+ 3
- 4
roles/webmail/tasks/roundcube.yml 查看文件

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

Loading…
取消
儲存