mirror of https://github.com/kewlfft/ansible-aur
added skip pgp check for makepkg
This is useful when installing a new system and AUR packages need to be installed before GnuPG is installed and configured (to automatically retrieve public keys). E.g. cower requires PGP signature check and it needs to be installed before pacaur can be installed and used for further AUR package installationpull/3/head
parent
47769a5195
commit
034d058874
|
@ -19,6 +19,7 @@ makepkg will be used if no helper was found or if it's specified explicitly.
|
|||
|upgrade |no |no |yes, no |Whether or not to upgrade whole system.|
|
||||
|use |no |auto |auto, aurman, pacaur, trizen, pikaur, yaourt, yay, makepkg |The helper to use, 'auto' uses the first known helper found and makepkg as a fallback.|
|
||||
|skip_installed |no |no |yes, no |Skip operations if the package is present.|
|
||||
|skip_pgp_check |no |no |yes, no |Skip verification of PGP signatures. This is useful when installing packages on a host without GnuPG (properly) configured. Only valid with makepkg.|
|
||||
|
||||
### Note
|
||||
* Either *name* or *upgrade* is required, both cannot be used together.
|
||||
|
|
6
aur.py
6
aur.py
|
@ -72,6 +72,8 @@ def install_with_makepkg(module, package):
|
|||
tar.extractall()
|
||||
tar.close()
|
||||
os.chdir(format(result['Name']))
|
||||
if module.params['skip_pgp_check']:
|
||||
use_cmd['makepkg'].append('--skippgpcheck')
|
||||
rc, out, err = module.run_command(use_cmd['makepkg'], check_rc=True)
|
||||
os.chdir(current_path)
|
||||
return (rc, out, err)
|
||||
|
@ -131,6 +133,10 @@ def main():
|
|||
'default': False,
|
||||
'type': 'bool',
|
||||
},
|
||||
'skip_pgp_check': {
|
||||
'default': False,
|
||||
'type': 'bool',
|
||||
},
|
||||
},
|
||||
required_one_of=[['name', 'upgrade']],
|
||||
supports_check_mode=True
|
||||
|
|
Loading…
Reference in New Issue