Move _ansible directory into main directory
This commit is contained in:
		
							parent
							
								
									519882db43
								
							
						
					
					
						commit
						40742e3214
					
				
					 124 changed files with 246 additions and 141 deletions
				
			
		
							
								
								
									
										24
									
								
								filter_plugins/map_backup_volumes.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								filter_plugins/map_backup_volumes.py
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,24 @@
 | 
			
		|||
class FilterModule(object):
 | 
			
		||||
    def filters(self):
 | 
			
		||||
        return {
 | 
			
		||||
            'map_backup_volumes': self.map_backup_volumes,
 | 
			
		||||
            'map_backup_volumes_service': self.map_backup_volumes_service
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    def map_backup_volumes(self, volumes):
 | 
			
		||||
        result = {}
 | 
			
		||||
 | 
			
		||||
        for volume in volumes:
 | 
			
		||||
            result[volume] = {
 | 
			
		||||
                "external": True,
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        return result
 | 
			
		||||
 | 
			
		||||
    def map_backup_volumes_service(self, volumes):
 | 
			
		||||
        result = []
 | 
			
		||||
 | 
			
		||||
        for volume in volumes:
 | 
			
		||||
            result.append("{volume_name}:/backup/volumes/{volume_name}".format(volume_name=volume))
 | 
			
		||||
 | 
			
		||||
        return result
 | 
			
		||||
		Reference in a new issue