#!{{ ansible_python['executable'] }}

# {{ ansible_managed }}

from __future__ import print_function
from json import dumps
from sys import exit
from glob import glob

output = {'installed': True}
instances = []

for name in glob('/etc/default/saslauthd-*'):
    instances.append(name.replace('/etc/default/saslauthd-', ''))

output.update({'instances': instances})

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