mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-21 20:30:21 -07:00
using get_bin_path() on atomic modules (#2144)
* using get_bin_path() on atomic modules * added changelog fragment * Update changelogs/fragments/2144-atomic_get_bin_path.yml Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
3312ae08af
commit
c8885fdfbd
4 changed files with 28 additions and 28 deletions
|
@ -57,18 +57,14 @@ from ansible.module_utils._text import to_native
|
|||
|
||||
def core(module):
|
||||
revision = module.params['revision']
|
||||
args = []
|
||||
atomic_bin = module.get_bin_path('atomic', required=True)
|
||||
|
||||
module.run_command_environ_update = dict(LANG='C', LC_ALL='C', LC_MESSAGES='C')
|
||||
|
||||
if revision == 'latest':
|
||||
args = ['atomic', 'host', 'upgrade']
|
||||
args = [atomic_bin, 'host', 'upgrade']
|
||||
else:
|
||||
args = ['atomic', 'host', 'deploy', revision]
|
||||
|
||||
out = {}
|
||||
err = {}
|
||||
rc = 0
|
||||
args = [atomic_bin, 'host', 'deploy', revision]
|
||||
|
||||
rc, out, err = module.run_command(args, check_rc=False)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue