forked from ungleich-public/cdist
		
	Merge branch 'master' into 4.0-pre-not-stable
This commit is contained in:
		
				commit
				
					
						ba0c56efbd
					
				
			
		
					 6 changed files with 58 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -188,7 +188,7 @@ class Local(object):
 | 
			
		|||
        Return the output as a string.
 | 
			
		||||
 | 
			
		||||
        """
 | 
			
		||||
        command = ["/bin/sh", "-e"]
 | 
			
		||||
        command = [ os.environ.get('CDIST_LOCAL_SHELL',"/bin/sh") , "-e"]
 | 
			
		||||
        command.append(script)
 | 
			
		||||
 | 
			
		||||
        return self.run(command=command, env=env, return_output=return_output, message_prefix=message_prefix)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -113,7 +113,7 @@ class Remote(object):
 | 
			
		|||
 | 
			
		||||
        """
 | 
			
		||||
 | 
			
		||||
        command = ["/bin/sh", "-e"]
 | 
			
		||||
        command = [ os.environ.get('CDIST_REMOTE_SHELL',"/bin/sh") , "-e"]
 | 
			
		||||
        command.append(script)
 | 
			
		||||
 | 
			
		||||
        return self.run(command, env, return_output)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -45,10 +45,7 @@ class Shell(object):
 | 
			
		|||
        """Select shell to execute, if not specified by user"""
 | 
			
		||||
 | 
			
		||||
        if not self.shell:
 | 
			
		||||
            if 'SHELL' in os.environ:
 | 
			
		||||
                self.shell = os.environ['SHELL']
 | 
			
		||||
            else:
 | 
			
		||||
                self.shell = "/bin/sh"
 | 
			
		||||
            self.shell = os.environ.get('SHELL',"/bin/sh")
 | 
			
		||||
 | 
			
		||||
    def _init_files_dirs(self):
 | 
			
		||||
        self.local.create_files_dirs()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,6 +10,7 @@ Changelog
 | 
			
		|||
 | 
			
		||||
3.0.3:
 | 
			
		||||
	* Core: Enhance error message when requirement is missing object id
 | 
			
		||||
	* Core: Add environment variable to select shell for executing scripts (Daniel Heule)
 | 
			
		||||
	* Explorer hostname: Return host name by using uname -n
 | 
			
		||||
	* New Type: __hostname (Steven Armstrong)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										44
									
								
								docs/dev/logs/2014-01-20.environments
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								docs/dev/logs/2014-01-20.environments
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,44 @@
 | 
			
		|||
raw quote from irc
 | 
			
		||||
 | 
			
		||||
16:00 < sar> telmich: btw, ich denke nicht dass man install schon zu gross bewerben 
 | 
			
		||||
             sollte
 | 
			
		||||
16:00 < telmich> sar: ack
 | 
			
		||||
16:00 < sar> telmich: imho sollten wir erst die cdist environments implementieren, 
 | 
			
		||||
             install waere dann eines davon
 | 
			
		||||
16:00 < sar> config ein anderes
 | 
			
		||||
16:01 < sar> foobar noch ein anderes
 | 
			
		||||
16:01 < sar> es macht einfach keinen sinn auf type ebene install vs nicht-install zu 
 | 
			
		||||
             unterscheiden
 | 
			
		||||
16:02 < telmich> sar: environments sind bei mir noch nicht ganz im gehirn (ganicht?) 
 | 
			
		||||
                 angelangt - hast du (nochmal?) kurz eine idee, was du damit meinst?
 | 
			
		||||
16:02 < sar> telmich: wenn man cdist anschaut, dann macht es eigentlich folgendes:
 | 
			
		||||
16:03 < sar> - definiere objekte mit hilfe von types
 | 
			
		||||
16:03 < sar> - deps zwischen objekten
 | 
			
		||||
16:03 < sar> - queue von objekten abarbeiten und auf $etwas anwenden
 | 
			
		||||
16:03 < sar> das ist alles
 | 
			
		||||
16:04 < sar> telmich: das ist eigentlich ziemlich generisch
 | 
			
		||||
16:04 < sar> telmich: fuer mich wuerde es sich hier anbieten das auch so zu 
 | 
			
		||||
             abstrahieren
 | 
			
		||||
16:05 < sar> telmich: ein environment (nenn das mal so weil kein besserer name zzt) 
 | 
			
		||||
             koennte das wie $objekt auf $etwas bestimmen
 | 
			
		||||
16:05 < sar> telmich: und auch was fuer types es in diesem environment gibt
 | 
			
		||||
16:06 < telmich> sar: klingt gut
 | 
			
		||||
16:06 < sar> telmich: e.g. es gibt ein environment fuer config -> was wir jetzt haben
 | 
			
		||||
16:06 < sar> eins fuer install -> += was im install branch ist (nur die types), den 
 | 
			
		||||
             python code brauchts nacher nicht mehr
 | 
			
		||||
16:07 < sar> eins fuer cisco-switch -> hat types um mit cisco zu spielen
 | 
			
		||||
16:07 < sar> usw
 | 
			
		||||
16:07 < sar> ein environment hat auch eigene remote-{exec,copy} scripte
 | 
			
		||||
16:08 < sar> und vielleicht globale explorer, vielleicht auch nicht
 | 
			
		||||
16:08 < sar> ein enviroment ist ein cconfig style directory
 | 
			
		||||
16:09 < sar> wo man cdist drueber laufen laesst
 | 
			
		||||
16:09 < sar> so was in der art
 | 
			
		||||
16:13 < telmich> sar: hmmja...klingt gut
 | 
			
		||||
16:15 < telmich> vielleicht etwas für cdist 4 oder cdist 5 :-)
 | 
			
		||||
16:15 < telmich> aber ich denke auf jeden fall als grundgedanke behaltbar
 | 
			
		||||
16:16 < telmich> ok für dich, wenn ich den chat ins docs/dev/logs kopiere als 
 | 
			
		||||
                 erinnerungs
 | 
			
		||||
16:16 < telmich> s/s$/?/?
 | 
			
		||||
16:16 < telmich> s/?$//
 | 
			
		||||
16:20 < sar> klar
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -132,6 +132,12 @@ TMPDIR, TEMP, TMP::
 | 
			
		|||
    more information. This is rather useful, if the standard
 | 
			
		||||
    directory used does not allow executables.
 | 
			
		||||
 | 
			
		||||
CDIST_LOCAL_SHELL::
 | 
			
		||||
    Selects shell for local script execution, defaults to /bin/sh
 | 
			
		||||
 | 
			
		||||
CDIST_REMOTE_SHELL::
 | 
			
		||||
    Selects shell for remote scirpt execution, defaults to /bin/sh
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
EXIT STATUS
 | 
			
		||||
-----------
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue