aboutsummaryrefslogtreecommitdiff
path: root/pyenc/enc.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyenc/enc.py')
-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
-