Skip to content
Browse files

[debops.locales] Fix fact script on Python 3

  • Loading branch information...
drybjed committed Aug 11, 2019
1 parent 65128da commit 4e2c62c1f3a95da820b4a279f8b2faab394f3cf0
Showing with 2 additions and 2 deletions.
  1. +2 −2 ansible/roles/debops.monit/templates/etc/ansible/facts.d/monit.fact.j2
@@ -27,11 +27,11 @@ except subprocess.CalledProcessError:

if monit_stdout:
for line in monit_stdout.split('\n'):
for line in monit_stdout.decode('utf-8').split('\n'):
if 'This is Monit version' in line:
output['version'] = line.split()[4]

if monit_services:
output['services'] = monit_services.strip().split('\n')
output['services'] = monit_services.decode('utf-8').strip().split('\n')

print(dumps(output, sort_keys=True, indent=2))

0 comments on commit 4e2c62c

Please sign in to comment.
You can’t perform that action at this time.