Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Make global explorers available to initial manifest #169

Merged
merged 2 commits into from

2 participants

@arkaitzj

As they are ran before the initial manifest? Is there any reason why they should not be available?
It works great for using hostnames for example to pattern match and choose what config to apply, $__target_host might not always be the actual hostname.

Also, I included a fix to the hostname global explorer, "command -v hostname" was printing to stdout and breaking the result, also used "-f" to get the fqdn for the host.

@telmich
Owner

Looks good, but for merging the documentation at docs/man/cdist-reference.text.sh should be adjusted to reflect this change (otherwise the information won't be seen by anybody using cdist)

@telmich telmich merged commit 002537f into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
4 cdist/conf/explorer/hostname
@@ -20,6 +20,6 @@
#
#
-if command -v hostname; then
- hostname
+if command -v hostname >/dev/null; then
+ hostname -f
fi
View
1  cdist/core/manifest.py
@@ -106,6 +106,7 @@ def env_initial_manifest(self, initial_manifest):
env.update(self.env)
env['__cdist_manifest'] = initial_manifest
env['__manifest'] = self.local.manifest_path
+ env['__explorer'] = self.local.global_explorer_out_path
return env
View
2  docs/man/cdist-reference.text.sh
@@ -179,7 +179,7 @@ ENVIRONMENT VARIABLES
---------------------
__explorer::
Directory that contains all global explorers.
- Available for: explorer, type explorer
+ Available for: initial manifest, explorer, type explorer
__manifest::
Directory that contains the initial manifest.
Available for: initial manifest, type manifest
Something went wrong with that request. Please try again.