mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-13 08:05:19 +01:00
Compare commits
5 commits
dc2773c330
...
1da58f2a24
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1da58f2a24 | ||
|
|
0847977d12 | ||
|
|
2a1fb334ee | ||
|
|
da6c259fdd | ||
|
|
4537dbb7de |
4 changed files with 9 additions and 6 deletions
2
changelogs/fragments/504-firewalld_info-warning.yaml
Normal file
2
changelogs/fragments/504-firewalld_info-warning.yaml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- firewalld_info - Only warn about ignored zones, when there are zones ignored.
|
||||
|
|
@ -356,8 +356,9 @@ def main():
|
|||
specified_zones = module.params['zones']
|
||||
collect_zones = list(set(specified_zones) & set(all_zones))
|
||||
ignore_zones = list(set(specified_zones) - set(collect_zones))
|
||||
warn.append(
|
||||
'Please note: zone:(%s) have been ignored in the gathering process.' % ','.join(ignore_zones))
|
||||
if ignore_zones:
|
||||
warn.append(
|
||||
'Please note: zone:(%s) have been ignored in the gathering process.' % ','.join(ignore_zones))
|
||||
else:
|
||||
collect_zones = get_all_zones(client)
|
||||
|
||||
|
|
|
|||
|
|
@ -831,7 +831,7 @@ def main():
|
|||
# handle mount on boot. To avoid mount option conflicts, if 'noauto'
|
||||
# specified in 'opts', mount module will ignore 'boot'.
|
||||
opts = args['opts'].split(',')
|
||||
if 'noauto' in opts:
|
||||
if module.params['boot'] and 'noauto' in opts:
|
||||
args['warnings'].append("Ignore the 'boot' due to 'opts' contains 'noauto'.")
|
||||
elif not module.params['boot']:
|
||||
args['boot'] = 'no'
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ from ansible.module_utils._text import to_text
|
|||
|
||||
|
||||
def locally_installed(module, pkgname):
|
||||
(rc, out, err) = module.run_command('{0} -q {1}'.format(module.get_bin_path("rpm"), pkgname).split())
|
||||
(rc, stdout, stderr) = module.run_command('{0} -q --whatprovides {1}'.format(module.get_bin_path("rpm"), pkgname).split())
|
||||
return (rc == 0)
|
||||
|
||||
|
||||
|
|
@ -97,9 +97,9 @@ def rpm_ostree_transaction(module):
|
|||
module.exit_json(msg="No changes made.")
|
||||
else:
|
||||
if module.params['state'] in ['present', 'installed', 'latest']:
|
||||
module.fail_json(msg="The following packages are absent in the currently booted rpm-ostree commit: %s" ' '.join(pkgs))
|
||||
module.fail_json(msg="The following packages are absent in the currently booted rpm-ostree commit: {}".format(' '.join(pkgs)))
|
||||
else:
|
||||
module.fail_json(msg="The following packages are present in the currently booted rpm-ostree commit: %s" ' '.join(pkgs))
|
||||
module.fail_json(msg="The following packages are present in the currently booted rpm-ostree commit: {}".format(' '.join(pkgs)))
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
|||
Loading…
Reference in a new issue