Add derived env vars for target hostname and fqdn.
This commit is contained in:
parent
9ce8f6bbb0
commit
dbcc94ab65
23 changed files with 181 additions and 59 deletions
|
|
@ -83,7 +83,7 @@ class Local(object):
|
|||
return None
|
||||
|
||||
def _init_log(self):
|
||||
self.log = logging.getLogger(self.target_host)
|
||||
self.log = logging.getLogger(self.target_host[0])
|
||||
|
||||
def _init_permissions(self):
|
||||
# Setup file permissions using umask
|
||||
|
|
@ -184,8 +184,11 @@ class Local(object):
|
|||
|
||||
if env is None:
|
||||
env = os.environ.copy()
|
||||
# Export __target_host for use in __remote_{copy,exec} scripts
|
||||
env['__target_host'] = self.target_host
|
||||
# Export __target_host, __target_hostname, __target_fqdn
|
||||
# for use in __remote_{copy,exec} scripts
|
||||
env['__target_host'] = self.target_host[0]
|
||||
env['__target_hostname'] = self.target_host[1]
|
||||
env['__target_fqdn'] = self.target_host[2]
|
||||
|
||||
# Export for emulator
|
||||
env['__cdist_object_marker'] = self.object_marker_name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue