mirror of
				https://github.com/kewlfft/ansible-aur.git
				synced 2025-11-04 18:12:30 +03:00 
			
		
		
		
	remove aur option by default
This commit is contained in:
		
							
								
								
									
										11
									
								
								aur.py
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								aur.py
									
									
									
									
									
								
							@@ -13,14 +13,15 @@ import tempfile
 | 
				
			|||||||
def_lang = ['env', 'LC_ALL=C']
 | 
					def_lang = ['env', 'LC_ALL=C']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use_cmd = {
 | 
					use_cmd = {
 | 
				
			||||||
    'aurman': ['aurman', '-S', '--noconfirm', '--noedit', '--needed', '--aur'],
 | 
					    'aurman': ['aurman', '-S', '--noconfirm', '--noedit', '--needed'],
 | 
				
			||||||
    'pacaur': ['pacaur', '-S', '--noconfirm', '--noedit', '--needed', '--aur'],
 | 
					    'pacaur': ['pacaur', '-S', '--noconfirm', '--noedit', '--needed'],
 | 
				
			||||||
    'trizen': ['trizen', '-S', '--noconfirm', '--noedit', '--needed', '--aur'],
 | 
					    'trizen': ['trizen', '-S', '--noconfirm', '--noedit', '--needed'],
 | 
				
			||||||
    'pikaur': ['pikaur', '-S', '--noconfirm', '--noedit', '--needed'],
 | 
					    'pikaur': ['pikaur', '-S', '--noconfirm', '--noedit', '--needed'],
 | 
				
			||||||
    'yaourt': ['yaourt', '-S', '--noconfirm', '--needed'],
 | 
					    'yaourt': ['yaourt', '-S', '--noconfirm', '--needed'],
 | 
				
			||||||
    'yay': ['yay', '-S', '--noconfirm'],
 | 
					    'yay': ['yay', '-S', '--noconfirm'],
 | 
				
			||||||
    'internal': ['makepkg', '--syncdeps', '--install', '--noconfirm', '--needed']
 | 
					    'internal': ['makepkg', '--syncdeps', '--install', '--noconfirm', '--needed']
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					# optional: aurman, pacaur, trizen have a --aur option, do things only for aur
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def package_installed(module, package):
 | 
					def package_installed(module, package):
 | 
				
			||||||
@@ -101,7 +102,7 @@ def main():
 | 
				
			|||||||
                'choices': ['auto', 'aurman', 'pacaur', 'trizen', 'pikaur', 'yaourt', 'yay', 'internal'],
 | 
					                'choices': ['auto', 'aurman', 'pacaur', 'trizen', 'pikaur', 'yaourt', 'yay', 'internal'],
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            'skip_installed': {
 | 
					            'skip_installed': {
 | 
				
			||||||
                'default': 'no',
 | 
					                'default': False,
 | 
				
			||||||
                'type': 'bool',
 | 
					                'type': 'bool',
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
@@ -112,7 +113,7 @@ def main():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if params['use'] == 'auto':
 | 
					    if params['use'] == 'auto':
 | 
				
			||||||
        use = 'internal'
 | 
					        use = 'internal'
 | 
				
			||||||
        # select the first helper for which the bin is found
 | 
					        # auto: select the first helper for which the bin is found
 | 
				
			||||||
        for k in use_cmd:
 | 
					        for k in use_cmd:
 | 
				
			||||||
            if module.get_bin_path(k, False):
 | 
					            if module.get_bin_path(k, False):
 | 
				
			||||||
                use = k
 | 
					                use = k
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user