aboutsummaryrefslogtreecommitdiff
path: root/pyenc/enc.py
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-08-08 04:41:11 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-08-08 04:41:11 +0200
commitba1516c255f7167b696ca7f4c6db2846cf6bb046 (patch)
treec1794abe263034300efce07bb629cb10edc5ddd5 /pyenc/enc.py
parentwork (diff)
downloadpuppet-classifier-ba1516c255f7167b696ca7f4c6db2846cf6bb046.tar.gz
puppet-classifier-ba1516c255f7167b696ca7f4c6db2846cf6bb046.tar.xz
work
Diffstat (limited to '')
-rw-r--r--pyenc/enc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyenc/enc.py b/pyenc/enc.py
index 8732af2..3f7a0b2 100644
--- a/pyenc/enc.py
+++ b/pyenc/enc.py
@@ -5,6 +5,7 @@ Command line entry point for Puppet External Node Classifier (enc).
import yaml
from . import model
+
def run_enc(fqdn):
"""
Run the puppet node classifier.
@@ -16,9 +17,8 @@ def run_enc(fqdn):
print(f"No host with name {fqdn}")
return 1
out = {
- 'environment': host.environment,
+ 'environment': host.environment.name,
'classes': [cls.class_name for cls in host.classes],
}
print(yaml.dump(out))
return 0
-