|
|
@ -90,7 +90,8 @@ def main():
|
|
|
|
default=False,
|
|
|
|
default=False,
|
|
|
|
aliases=['accept_licences', 'accept'],
|
|
|
|
aliases=['accept_licences', 'accept'],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
),
|
|
|
|
|
|
|
|
supports_check_mode=True,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
params = module.params
|
|
|
|
params = module.params
|
|
|
@ -136,6 +137,11 @@ def ensure(module, state, packages, params):
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if module.check_mode:
|
|
|
|
|
|
|
|
dry_run = ['-n']
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
dry_run = []
|
|
|
|
|
|
|
|
|
|
|
|
if params['accept_licenses']:
|
|
|
|
if params['accept_licenses']:
|
|
|
|
accept_licenses = ['--accept']
|
|
|
|
accept_licenses = ['--accept']
|
|
|
|
else:
|
|
|
|
else:
|
|
|
@ -147,6 +153,7 @@ def ensure(module, state, packages, params):
|
|
|
|
[
|
|
|
|
[
|
|
|
|
'pkg', behaviour[state]['subcommand']
|
|
|
|
'pkg', behaviour[state]['subcommand']
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
+ dry_run
|
|
|
|
+ accept_licenses
|
|
|
|
+ accept_licenses
|
|
|
|
+ [
|
|
|
|
+ [
|
|
|
|
'-q', '--'
|
|
|
|
'-q', '--'
|
|
|
|