forked from ungleich-public/cdist
		
	add dry run hint
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
		
					parent
					
						
							
								fe5c99b143
							
						
					
				
			
			
				commit
				
					
						3c14f7e2f5
					
				
			
		
					 1 changed files with 7 additions and 1 deletions
				
			
		| 
						 | 
					@ -143,7 +143,13 @@ class ConfigInstall(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def object_run(self, cdist_object, dry_run=False):
 | 
					    def object_run(self, cdist_object, dry_run=False):
 | 
				
			||||||
        """Run gencode and code for an object"""
 | 
					        """Run gencode and code for an object"""
 | 
				
			||||||
        self.log.debug("Trying to run object " + cdist_object.name)
 | 
					
 | 
				
			||||||
 | 
					        if self.dry_run:
 | 
				
			||||||
 | 
					            dry_run = ""
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            dry_run = "(dry run)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        self.log.debug("Trying to run object %s%s" % (cdist_object.name, dry_run))
 | 
				
			||||||
        if cdist_object.state == core.CdistObject.STATE_DONE:
 | 
					        if cdist_object.state == core.CdistObject.STATE_DONE:
 | 
				
			||||||
            raise cdist.Error("Attempting to run an already finished object: %s", cdist_object)
 | 
					            raise cdist.Error("Attempting to run an already finished object: %s", cdist_object)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue