From dd28dcf3d620a4ac7d0a1532b812213cf094cd3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 12 Jan 2022 02:26:25 +0100 Subject: Revert "Move webdav into profiles." It actually reverts the non-need for the nginx module webdav_ext. Since Omnifocus requires PROPFIND. This reverts commit edf6ffe8b399679ba28cc5e558a6838919dd1ee8. --- modules/profiles/files/node-classifier.py | 44 ------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 modules/profiles/files/node-classifier.py (limited to 'modules/profiles/files/node-classifier.py') diff --git a/modules/profiles/files/node-classifier.py b/modules/profiles/files/node-classifier.py deleted file mode 100644 index 7fc096f..0000000 --- a/modules/profiles/files/node-classifier.py +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env python3 - -import yaml -import sys -import configparser - -# https://puppet.com/docs/puppet/7/nodes_external.html - - -def main(args): - if len(args) == 1: - print('usage ./node-classifier ') - return - - parser = configparser.ConfigParser() - conf_file = '/etc/node-classifier.ini' - if parser.read(conf_file) != [conf_file]: - print(f'Configuration file missing, expected {conf_file}') - return 1 - - try: - fmt = parser.get('common', 'node_fmt') - if fmt != 'yaml': - print(f'Unknown format {fmt}') - return 1 - filename = parser.get('common', 'nodes') - except configparser.NoSectionError as e: - print(e) - return 1 - except NoOptionError as e: - print(e) - return 1 - - with open(filename) as f: - data = yaml.load(f) - - nodename = sys.argv[1] - instance = data.get(nodename) - if not instance: - instance = data.get('default') - print(yaml.dump(instance)) - -if __name__ == '__main__': - sys.exit(main(sys.argv)) -- cgit v1.2.3