Thomas Buck пре 5 година
родитељ
комит
be280210b5

+ 0
- 1
roles/mailserver/files/etc_rspamd_local.d_redis.conf Прегледај датотеку

1
 servers = "127.0.0.1";
1
 servers = "127.0.0.1";
2
-

roles/mailserver/files/etc_tomcat7_server.xml → roles/mailserver/files/etc_tomcat8_server.xml Прегледај датотеку

1
-<?xml version='1.0' encoding='utf-8'?>
1
+<?xml version="1.0" encoding="UTF-8"?>
2
 <!--
2
 <!--
3
   Licensed to the Apache Software Foundation (ASF) under one or more
3
   Licensed to the Apache Software Foundation (ASF) under one or more
4
   contributor license agreements.  See the NOTICE file distributed with
4
   contributor license agreements.  See the NOTICE file distributed with
20
      Documentation at /docs/config/server.html
20
      Documentation at /docs/config/server.html
21
  -->
21
  -->
22
 <Server port="8005" shutdown="SHUTDOWN">
22
 <Server port="8005" shutdown="SHUTDOWN">
23
+  <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
23
   <!-- Security listener. Documentation at /docs/config/listeners.html
24
   <!-- Security listener. Documentation at /docs/config/listeners.html
24
   <Listener className="org.apache.catalina.security.SecurityListener" />
25
   <Listener className="org.apache.catalina.security.SecurityListener" />
25
   -->
26
   -->
26
   <!--APR library loader. Documentation at /docs/apr.html -->
27
   <!--APR library loader. Documentation at /docs/apr.html -->
27
-  <!--
28
   <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
28
   <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
29
-  -->
30
-  <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
31
-  <Listener className="org.apache.catalina.core.JasperListener" />
32
   <!-- Prevent memory leaks due to use of particular java/javax APIs-->
29
   <!-- Prevent memory leaks due to use of particular java/javax APIs-->
33
   <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
30
   <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
34
   <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
31
   <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
64
 
61
 
65
     <!-- A "Connector" represents an endpoint by which requests are received
62
     <!-- A "Connector" represents an endpoint by which requests are received
66
          and responses are returned. Documentation at :
63
          and responses are returned. Documentation at :
67
-         Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
64
+         Java HTTP Connector: /docs/config/http.html
68
          Java AJP  Connector: /docs/config/ajp.html
65
          Java AJP  Connector: /docs/config/ajp.html
69
          APR (HTTP/AJP) Connector: /docs/apr.html
66
          APR (HTTP/AJP) Connector: /docs/apr.html
70
-         Define a non-SSL HTTP/1.1 Connector on port 8080
67
+         Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
71
     -->
68
     -->
72
     <Connector address="127.0.0.1" port="8080" protocol="HTTP/1.1"
69
     <Connector address="127.0.0.1" port="8080" protocol="HTTP/1.1"
73
                connectionTimeout="20000"
70
                connectionTimeout="20000"
74
-               URIEncoding="UTF-8"
75
                redirectPort="8443" />
71
                redirectPort="8443" />
76
     <!-- A "Connector" using the shared thread pool-->
72
     <!-- A "Connector" using the shared thread pool-->
77
     <!--
73
     <!--
80
                connectionTimeout="20000"
76
                connectionTimeout="20000"
81
                redirectPort="8443" />
77
                redirectPort="8443" />
82
     -->
78
     -->
83
-    <!-- Define a SSL HTTP/1.1 Connector on port 8443
84
-         This connector uses the BIO implementation that requires the JSSE
85
-         style configuration. When using the APR/native implementation, the
86
-         OpenSSL style configuration is required as described in the APR/native
87
-         documentation -->
79
+    <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
80
+         This connector uses the NIO implementation. The default
81
+         SSLImplementation will depend on the presence of the APR/native
82
+         library and the useOpenSSL attribute of the
83
+         AprLifecycleListener.
84
+         Either JSSE or OpenSSL style configuration may be used regardless of
85
+         the SSLImplementation selected. JSSE style configuration is used below.
86
+    -->
87
+    <!--
88
+    <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
89
+               maxThreads="150" SSLEnabled="true">
90
+        <SSLHostConfig>
91
+            <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
92
+                         type="RSA" />
93
+        </SSLHostConfig>
94
+    </Connector>
95
+    -->
96
+    <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
97
+         This connector uses the APR/native implementation which always uses
98
+         OpenSSL for TLS.
99
+         Either JSSE or OpenSSL style configuration may be used. OpenSSL style
100
+         configuration is used below.
101
+    -->
88
     <!--
102
     <!--
89
-    <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
90
-               maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
91
-               clientAuth="false" sslProtocol="TLS" />
103
+    <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
104
+               maxThreads="150" SSLEnabled="true" >
105
+        <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
106
+        <SSLHostConfig>
107
+            <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
108
+                         certificateFile="conf/localhost-rsa-cert.pem"
109
+                         certificateChainFile="conf/localhost-rsa-chain.pem"
110
+                         type="RSA" />
111
+        </SSLHostConfig>
112
+    </Connector>
92
     -->
113
     -->
93
 
114
 
94
     <!-- Define an AJP 1.3 Connector on port 8009 -->
115
     <!-- Define an AJP 1.3 Connector on port 8009 -->
139
              Documentation at: /docs/config/valve.html
160
              Documentation at: /docs/config/valve.html
140
              Note: The pattern used is equivalent to using pattern="common" -->
161
              Note: The pattern used is equivalent to using pattern="common" -->
141
         <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
162
         <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
142
-               prefix="localhost_access_log." suffix=".txt"
163
+               prefix="localhost_access_log" suffix=".txt"
143
                pattern="%h %l %u %t &quot;%r&quot; %s %b" />
164
                pattern="%h %l %u %t &quot;%r&quot; %s %b" />
144
 
165
 
145
       </Host>
166
       </Host>

+ 1
- 1
roles/mailserver/handlers/main.yml Прегледај датотеку

8
   service: name=opendkim state=restarted
8
   service: name=opendkim state=restarted
9
 
9
 
10
 - name: restart solr
10
 - name: restart solr
11
-  service: name=tomcat7 state=restarted
11
+  service: name=tomcat8 state=restarted
12
 
12
 
13
 - name: import sql postfix
13
 - name: import sql postfix
14
   action: shell PGPASSWORD='{{ mail_db_password }}' psql -h localhost -d {{ mail_db_database }} -U {{ mail_db_username }} -f /etc/postfix/import.sql --set ON_ERROR_STOP=1
14
   action: shell PGPASSWORD='{{ mail_db_password }}' psql -h localhost -d {{ mail_db_database }} -U {{ mail_db_username }} -f /etc/postfix/import.sql --set ON_ERROR_STOP=1

+ 25
- 6
roles/mailserver/tasks/solr.yml Прегледај датотеку

2
 # Installs and configures the Solr full-text-search.
2
 # Installs and configures the Solr full-text-search.
3
 
3
 
4
 - name: Install Solr and related packages
4
 - name: Install Solr and related packages
5
-  apt: pkg={{ item }} state=present
6
-  with_items:
5
+  apt:
6
+    name: "{{ packages }}"
7
+    state: present
8
+  vars:
9
+    packages:
7
     - dovecot-solr
10
     - dovecot-solr
8
     - solr-tomcat
11
     - solr-tomcat
9
   tags:
12
   tags:
10
     - dependencies
13
     - dependencies
11
 
14
 
12
 - name: Work around Debian bug and copy Solr schema file into place
15
 - name: Work around Debian bug and copy Solr schema file into place
13
-  copy: src=solr-schema.xml dest=/etc/solr/conf/schema.xml group=root owner=root
16
+  copy:
17
+    src=solr-schema.xml
18
+    dest=/etc/solr/conf/schema.xml
19
+    owner=root
20
+    group=root
14
 
21
 
15
 - name: Copy tweaked Tomcat config file into place
22
 - name: Copy tweaked Tomcat config file into place
16
-  copy: src=etc_tomcat7_server.xml dest=/etc/tomcat7/server.xml group=tomcat7 owner=root
23
+  copy:
24
+    src=etc_tomcat8_server.xml
25
+    dest=/etc/tomcat8/server.xml
26
+    owner=root
27
+    group=tomcat8
17
   notify: restart solr
28
   notify: restart solr
18
 
29
 
19
 - name: Copy tweaked Solr config file into place
30
 - name: Copy tweaked Solr config file into place
20
-  copy: src=etc_solr_conf_solrconfig.xml dest=/etc/solr/conf/solrconfig.xml group=root owner=root
31
+  copy:
32
+    src=etc_solr_conf_solrconfig.xml
33
+    dest=/etc/solr/conf/solrconfig.xml
34
+    owner=root
35
+    group=root
21
   notify: restart solr
36
   notify: restart solr
22
 
37
 
23
 - name: Create Solr index directory
38
 - name: Create Solr index directory
24
-  file: state=directory path=/data/solr group=tomcat7 owner=tomcat7
39
+  file:
40
+    state=directory
41
+    path=/data/solr
42
+    owner=tomcat8
43
+    group=tomcat8
25
   notify: restart solr
44
   notify: restart solr

Loading…
Откажи
Сачувај