settings.py 408 Bytes
Newer Older
Olav Morken's avatar
Olav Morken committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
import subprocess

def _puppet_config(name):
    output = subprocess.check_output(['puppet', 'config', 'print', name])
    return str(output, 'utf-8').strip()

puppet_key = _puppet_config('hostprivkey')
puppet_crt = _puppet_config('hostcert')
puppet_ca = _puppet_config('localcacert')

puppet_ca_host = 'puppet-ca.uninett.no'
puppet_ca_port = 8140
puppetdb_host = 'puppetdb.uninett.no'
puppetdb_port = 8081