client-pull-installation/roles/prereq/templates/noderole.fact

9 lines
234 B
Plaintext
Raw Normal View History

#!/usr/bin/env python
from urllib import urlopen
from yaml import load
from json import dumps
with urlopen('http://' + {{ ansible_local.domain.serverfqdn }} + ':3000/ansible_host?host=localhost') as file:
print(dumps(load(file)))