mirror of
https://github.com/status-im/ansible-role-mongodb.git
synced 2025-01-11 14:04:17 +00:00
switch to python3
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
b3a1cf4059
commit
b6fad71e0c
@ -4,7 +4,7 @@ dist: trusty
|
||||
sudo: required
|
||||
language: python
|
||||
python:
|
||||
- "2.7.15"
|
||||
- "3.6"
|
||||
env:
|
||||
- >
|
||||
DISTRIBUTION=ubuntu
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python2
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# (c) 2015-2018, Sergei Antipov, 2GIS LLC
|
||||
#
|
||||
@ -156,7 +156,7 @@ host_type:
|
||||
type: string
|
||||
sample: "replica"
|
||||
'''
|
||||
import ConfigParser
|
||||
import configparser
|
||||
import ssl as ssl_lib
|
||||
import time
|
||||
from datetime import datetime as dtdatetime
|
||||
@ -287,7 +287,7 @@ def remove_host(module, client, host_name, timeout=180):
|
||||
time.sleep(5)
|
||||
|
||||
def load_mongocnf():
|
||||
config = ConfigParser.RawConfigParser()
|
||||
config = configparser.RawConfigParser()
|
||||
mongocnf = os.path.expanduser('~/.mongodb.cnf')
|
||||
|
||||
try:
|
||||
@ -296,7 +296,7 @@ def load_mongocnf():
|
||||
user=config.get('client', 'user'),
|
||||
password=config.get('client', 'pass')
|
||||
)
|
||||
except (ConfigParser.NoOptionError, IOError):
|
||||
except (configparser.NoOptionError, IOError):
|
||||
return False
|
||||
|
||||
return creds
|
||||
|
@ -18,7 +18,7 @@ cat << EOF > ansible.cfg
|
||||
[defaults]
|
||||
pipelining = True
|
||||
strategy = mitogen_linear
|
||||
strategy_plugins = /home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/ansible_mitogen/plugins/strategy
|
||||
strategy_plugins = /home/travis/virtualenv/python3.6.9/lib/python3.6/site-packages/ansible_mitogen/plugins/strategy
|
||||
EOF
|
||||
|
||||
# Pull docker image or build it
|
||||
|
Loading…
x
Reference in New Issue
Block a user