Browse Source

remove nodemeta __virtual__

master
Sean Johnson 1 year ago
parent
commit
11faf3f83c
  1. 14
      _modules/nodemeta.py

14
_modules/nodemeta.py

@ -24,20 +24,6 @@ _VALID_SOURCES = ["hostname", "nodename", "fqdn"] @@ -24,20 +24,6 @@ _VALID_SOURCES = ["hostname", "nodename", "fqdn"]
log = logging.getLogger(__name__)
def __virtual__():
""" Checks if the system's hostname can be matched by this module.
"""
cfg = _get_config()
hostname = _get_hostname(cfg)
results = _regex.findall(hostname)
if results is not None and len(results) > 0:
return __virtualname__
return False, "from_node_name grain generator refuses to load: hostname format mismatch"
def _get_config(opts=None):
if opts is None:

Loading…
Cancel
Save