forked from ungleich-public/cdist
		
	Merge custom cache path pattern from beta branch.
This commit is contained in:
		
					parent
					
						
							
								b7873abf07
							
						
					
				
			
			
				commit
				
					
						2a9bd77550
					
				
			
		
					 10 changed files with 176 additions and 43 deletions
				
			
		| 
						 | 
				
			
			@ -276,4 +276,7 @@ CDIST_REMOTE_COPY
 | 
			
		|||
 | 
			
		||||
CDIST_BETA
 | 
			
		||||
    Enable beta functionalities.
 | 
			
		||||
 | 
			
		||||
CDIST_CACHE_PATH_PATTERN
 | 
			
		||||
    Custom cache path pattern.
 | 
			
		||||
eof
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,13 +15,13 @@ SYNOPSIS
 | 
			
		|||
 | 
			
		||||
    cdist banner [-h] [-d] [-v]
 | 
			
		||||
 | 
			
		||||
    cdist config [-h] [-d] [-v] [-b] [-c CONF_DIR] [-f HOSTFILE]
 | 
			
		||||
                 [-i MANIFEST] [-j [JOBS]] [-n] [-o OUT_PATH] [-p] [-s]
 | 
			
		||||
    cdist config [-h] [-d] [-v] [-b] [-C CACHE_PATH_PATTERN] [-c CONF_DIR]
 | 
			
		||||
                 [-f HOSTFILE] [-i MANIFEST] [-j [JOBS]] [-n] [-o OUT_PATH]
 | 
			
		||||
                 [--remote-copy REMOTE_COPY] [--remote-exec REMOTE_EXEC]
 | 
			
		||||
                 [host [host ...]]
 | 
			
		||||
 | 
			
		||||
    cdist install [-h] [-d] [-v] [-b] [-c CONF_DIR] [-f HOSTFILE]
 | 
			
		||||
                  [-i MANIFEST] [-j [JOBS]] [-n] [-o OUT_PATH] [-p] [-s]
 | 
			
		||||
    cdist install [-h] [-d] [-v] [-b] [-C CACHE_PATH_PATTERN] [-c CONF_DIR]
 | 
			
		||||
                  [-f HOSTFILE] [-i MANIFEST] [-j [JOBS]] [-n] [-o OUT_PATH]
 | 
			
		||||
                  [--remote-copy REMOTE_COPY] [--remote-exec REMOTE_EXEC]
 | 
			
		||||
                  [host [host ...]]
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -76,6 +76,13 @@ Configure/install one or more hosts.
 | 
			
		|||
    
 | 
			
		||||
    Can also be enabled using CDIST_BETA env var.
 | 
			
		||||
 | 
			
		||||
.. option:: -C CACHE_PATH_PATTERN, --cache-path-pattern CACHE_PATH_PATTERN
 | 
			
		||||
 | 
			
		||||
    Sepcify custom cache path pattern. It can also be set by
 | 
			
		||||
    CDIST_CACHE_PATH_PATTERN environment variable. If it is not set then
 | 
			
		||||
    default hostdir is used. For more info on format see
 | 
			
		||||
    :strong:`CACHE PATH PATTERN FORMAT` below.
 | 
			
		||||
 | 
			
		||||
.. option:: -c CONF_DIR, --conf-dir CONF_DIR
 | 
			
		||||
 | 
			
		||||
    Add a configuration directory. Can be specified multiple times.
 | 
			
		||||
| 
						 | 
				
			
			@ -91,7 +98,8 @@ Configure/install one or more hosts.
 | 
			
		|||
    Read specified file for a list of additional hosts to operate on
 | 
			
		||||
    or if '-' is given, read stdin (one host per line).
 | 
			
		||||
    If no host or host file is specified then, by default,
 | 
			
		||||
    read hosts from stdin. For the file format see below.
 | 
			
		||||
    read hosts from stdin. For the file format see
 | 
			
		||||
    :strong:`HOSTFILE FORMAT` below.
 | 
			
		||||
 | 
			
		||||
.. option:: -i MANIFEST, --initial-manifest MANIFEST
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -145,6 +153,24 @@ removed. Then all leading and trailing whitespace characters are stripped.
 | 
			
		|||
If such a line results in empty line it is ignored/skipped. Otherwise,
 | 
			
		||||
host string is used.
 | 
			
		||||
 | 
			
		||||
CACHE PATH PATTERN FORMAT
 | 
			
		||||
~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
			
		||||
Cache path pattern specifies path for a cache directory subdirectory.
 | 
			
		||||
In the path, '%N' will be substituted by the target host, '%h' will
 | 
			
		||||
be substituted by the calculated host directory, '%P' will be substituted
 | 
			
		||||
by the current process id. All format codes that
 | 
			
		||||
:strong:`python` :strong:`datetime.strftime()` function supports, except
 | 
			
		||||
'%h', are supported. These date/time directives format cdist config/install
 | 
			
		||||
start time.
 | 
			
		||||
 | 
			
		||||
If empty pattern is specified then default calculated host directory
 | 
			
		||||
is used.
 | 
			
		||||
 | 
			
		||||
Calculated host directory is a hash of a host cdist operates on.
 | 
			
		||||
 | 
			
		||||
Resulting path is used to specify cache path subdirectory under which
 | 
			
		||||
current host cache data are saved.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
SHELL
 | 
			
		||||
-----
 | 
			
		||||
| 
						 | 
				
			
			@ -247,6 +273,9 @@ CDIST_REMOTE_COPY
 | 
			
		|||
CDIST_BETA
 | 
			
		||||
    Enable beta functionality.
 | 
			
		||||
 | 
			
		||||
CDIST_CACHE_PATH_PATTERN
 | 
			
		||||
    Custom cache path pattern.
 | 
			
		||||
 | 
			
		||||
EXIT STATUS
 | 
			
		||||
-----------
 | 
			
		||||
The following exit values shall be returned:
 | 
			
		||||
| 
						 | 
				
			
			@ -261,6 +290,7 @@ AUTHORS
 | 
			
		|||
Originally written by Nico Schottelius <nico-cdist--@--schottelius.org>
 | 
			
		||||
and Steven Armstrong <steven-cdist--@--armstrong.cc>.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
CAVEATS
 | 
			
		||||
-------
 | 
			
		||||
When operating in parallel, either by operating in parallel for each host
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue