projects
/
ansible.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
2f2bd68
)
migrate things to python3
author
Ralf Jung
<post@ralfj.de>
Tue, 3 Jan 2023 12:37:44 +0000
(13:37 +0100)
committer
Ralf Jung
<post@ralfj.de>
Tue, 3 Jan 2023 12:37:44 +0000
(13:37 +0100)
roles/apache/files/log-anon
patch
|
blob
|
history
roles/apache/tasks/main.yml
patch
|
blob
|
history
roles/email/tasks/dovecot.yml
patch
|
blob
|
history
roles/email/templates/changepw
patch
|
blob
|
history
roles/email/templates/newmail/newmail
patch
|
blob
|
history
diff --git
a/roles/apache/files/log-anon
b/roles/apache/files/log-anon
index 32b6c1e58b61d417495b463b82a37bec71a2fd64..0b8466832f1b8e21494fbe2b37c600a5e1061f06 100644
(file)
--- a/
roles/apache/files/log-anon
+++ b/
roles/apache/files/log-anon
@@
-1,9
+1,9
@@
-#!/usr/bin/python
+#!/usr/bin/python
3
import sys, re
from netaddr import IPAddress, AddrFormatError
if len(sys.argv) != 2:
import sys, re
from netaddr import IPAddress, AddrFormatError
if len(sys.argv) != 2:
- print
>>sys.stderr, "Usage: %s filename" % sys.argv[0]
+ print
("Usage: %s filename" % sys.argv[0], file=sys.stderr)
sys.exit(1)
log = open(sys.argv[1], "a")
sys.exit(1)
log = open(sys.argv[1], "a")
diff --git
a/roles/apache/tasks/main.yml
b/roles/apache/tasks/main.yml
index 6878845d87552c709d8c52abd25322272d01945c..8d1382c179fc857faaa5d0d36fd6acb615f6acac 100644
(file)
--- a/
roles/apache/tasks/main.yml
+++ b/
roles/apache/tasks/main.yml
@@
-1,5
+1,5
@@
- name: install apache
- name: install apache
- apt: name=apache2,python-netaddr state=latest
+ apt: name=apache2,python
3
-netaddr state=latest
- name: enable apache
service: name=apache2 enabled=yes
# apache config
- name: enable apache
service: name=apache2 enabled=yes
# apache config
diff --git
a/roles/email/tasks/dovecot.yml
b/roles/email/tasks/dovecot.yml
index 5d8ef0c38f051744879021508f2a84d821d24f02..1766ede7caa9f4fefbe9b6167a0c69e5d5f3db6a 100644
(file)
--- a/
roles/email/tasks/dovecot.yml
+++ b/
roles/email/tasks/dovecot.yml
@@
-1,5
+1,5
@@
- name: install dovecot
- name: install dovecot
- apt: name=dovecot-imapd,dovecot-lmtpd,dovecot-mysql,dovecot-pop3d,dovecot-sieve,dovecot-managesieved state=latest
+ apt: name=dovecot-imapd,dovecot-lmtpd,dovecot-mysql,dovecot-pop3d,dovecot-sieve,dovecot-managesieved
,python3-mysqldb
state=latest
- name: enable dovecot
service: name=dovecot enabled=yes
# configuration
- name: enable dovecot
service: name=dovecot enabled=yes
# configuration
diff --git
a/roles/email/templates/changepw
b/roles/email/templates/changepw
index 96eef60078492b36fdc1ad3451e7b8793b0811db..7a1b6003ffbd44176d69402300aa46f46d7aeea9 100644
(file)
--- a/
roles/email/templates/changepw
+++ b/
roles/email/templates/changepw
@@
-1,5
+1,5
@@
-#!/usr/bin/env python
2
-from __future__ import print_function
+#!/usr/bin/env python
3
+
import os, cgi, MySQLdb, subprocess, time
# settings
import os, cgi, MySQLdb, subprocess, time
# settings
diff --git
a/roles/email/templates/newmail/newmail
b/roles/email/templates/newmail/newmail
index 86a1d99de21dc73e0f33d8aac0883327d49f11fc..4f3785909c30159c4b91b8915aabd31b5b8a4e2b 100755
(executable)
--- a/
roles/email/templates/newmail/newmail
+++ b/
roles/email/templates/newmail/newmail
@@
-1,8
+1,8
@@
-#!/usr/bin/env python
2
+#!/usr/bin/env python
3
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
-from __future__ import print_function
+
import sys, os, random, MySQLdb, subprocess, time, string, argparse
import sys, os, random, MySQLdb, subprocess, time, string, argparse
-import
urllib,
smtplib, email.mime.text, email.utils
+import smtplib, email.mime.text, email.utils
from settings import *
from templates import *
from settings import *
from templates import *