Skip to content
Permalink
Browse files

[debops.java] Fix fact script on Python3

  • Loading branch information...
drybjed committed Aug 11, 2019
1 parent a721667 commit 2678058a789f7272e033d52eb5a8d5a76c7fc1e3
Showing with 2 additions and 2 deletions.
  1. +2 −2 ansible/roles/debops.java/templates/etc/ansible/facts.d/java.fact.j2
@@ -11,13 +11,13 @@ output = {"installed": True}
try:
java_version_output = subprocess.check_output(
['java', '-version'],
stderr=subprocess.STDOUT)
stderr=subprocess.STDOUT).decode('utf-8').split('\n')

except subprocess.CalledProcessError:
pass

if java_version_output:
for line in java_version_output.split('\n'):
for line in java_version_output:
if 'version' in line:
output['version'] = line.split()[2].strip('"').split('_')[0]

0 comments on commit 2678058

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