Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/311644
Change subject: labs: Make puppet-enc read from the config file ...................................................................... labs: Make puppet-enc read from the config file Change-Id: I2e2bf176993f22c6c805f8118147f6e961f70655 --- M modules/role/files/labs/puppet-enc.py 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/44/311644/1 diff --git a/modules/role/files/labs/puppet-enc.py b/modules/role/files/labs/puppet-enc.py index 8e29e1d..83b4c49 100644 --- a/modules/role/files/labs/puppet-enc.py +++ b/modules/role/files/labs/puppet-enc.py @@ -43,6 +43,9 @@ print('Invalid hostname', hostname) sys.exit(-1) + with open('/etc/puppet-enc.yaml', encoding='utf-8') as f: + encconfig = yaml.safe_load(f) + with open('/etc/ldap.yaml', encoding='utf-8') as f: ldapconfig = yaml.safe_load(f) @@ -75,7 +78,8 @@ attrs = conn.response[0]['attributes'] classes.update(attrs.get('puppetClass', [])) - url = 'http://localhost:8100/v1/{project}/node/{fqdn}'.format( + url = 'http://{host}:8100/v1/{project}/node/{fqdn}'.format( + host=encconfig['host'], project=hostname.split('.')[1], fqdn=hostname ) -- To view, visit https://gerrit.wikimedia.org/r/311644 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e2bf176993f22c6c805f8118147f6e961f70655 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda <yuvipa...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits