mirror of https://github.com/kewlfft/ansible-aur
shorten var names
parent
cb3ff71f3c
commit
0c083b7899
8
aur.py
8
aur.py
|
@ -16,10 +16,10 @@ def upgrade(module, helper):
|
||||||
|
|
||||||
cmd = helper_cmd[helper] + ['-u']
|
cmd = helper_cmd[helper] + ['-u']
|
||||||
|
|
||||||
rc, stdout, stderr = module.run_command(cmd, check_rc=True)
|
rc, out, err = module.run_command(cmd, check_rc=True)
|
||||||
|
|
||||||
module.exit_json(
|
module.exit_json(
|
||||||
changed=not (stdout == '' or 'there is nothing to do' in stdout or 'No AUR update found' in stdout),
|
changed=not (out == '' or 'there is nothing to do' in out or 'No AUR update found' in out),
|
||||||
msg='upgraded system',
|
msg='upgraded system',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -32,10 +32,10 @@ def install_packages(module, package_name, helper):
|
||||||
if upgrade:
|
if upgrade:
|
||||||
cmd += ['-u']
|
cmd += ['-u']
|
||||||
|
|
||||||
rc, stdout, stderr = module.run_command(cmd, check_rc=True)
|
rc, out, err = module.run_command(cmd, check_rc=True)
|
||||||
|
|
||||||
module.exit_json(
|
module.exit_json(
|
||||||
changed=not (stdout == '' or '-- skipping' in stdout),
|
changed=not (out == '' or '-- skipping' in out),
|
||||||
msg='installed package',
|
msg='installed package',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue