mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-12 23:55:19 +01:00
Compare commits
5 commits
de09c64d8f
...
3cd465ce63
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3cd465ce63 | ||
|
|
0847977d12 | ||
|
|
2a1fb334ee | ||
|
|
583df65239 | ||
|
|
7e58cc7c70 |
5 changed files with 13 additions and 7 deletions
2
changelogs/fragments/421-remove-deprecation-warning.yml
Normal file
2
changelogs/fragments/421-remove-deprecation-warning.yml
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
trivial:
|
||||||
|
- synchronize - instantiate the connection plugin without the ``new_stdin`` argument, which is deprecated in ansible-core 2.15 (https://github.com/ansible-collections/ansible.posix/pull/421).
|
||||||
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.
|
||||||
|
|
@ -284,9 +284,6 @@ class ActionModule(ActionBase):
|
||||||
# told (via delegate_to) that a different host is the source of the
|
# told (via delegate_to) that a different host is the source of the
|
||||||
# rsync
|
# rsync
|
||||||
if not use_delegate and remote_transport:
|
if not use_delegate and remote_transport:
|
||||||
# Create a connection to localhost to run rsync on
|
|
||||||
new_stdin = self._connection._new_stdin
|
|
||||||
|
|
||||||
# Unlike port, there can be only one shell
|
# Unlike port, there can be only one shell
|
||||||
localhost_shell = None
|
localhost_shell = None
|
||||||
for host in C.LOCALHOST:
|
for host in C.LOCALHOST:
|
||||||
|
|
@ -315,7 +312,11 @@ class ActionModule(ActionBase):
|
||||||
localhost_executable = C.DEFAULT_EXECUTABLE
|
localhost_executable = C.DEFAULT_EXECUTABLE
|
||||||
self._play_context.executable = localhost_executable
|
self._play_context.executable = localhost_executable
|
||||||
|
|
||||||
new_connection = connection_loader.get('local', self._play_context, new_stdin)
|
try:
|
||||||
|
new_connection = connection_loader.get('local', self._play_context)
|
||||||
|
except TypeError:
|
||||||
|
# Needed for ansible-core < 2.15
|
||||||
|
new_connection = connection_loader.get('local', self._play_context, self._connection._new_stdin)
|
||||||
self._connection = new_connection
|
self._connection = new_connection
|
||||||
# Override _remote_is_local as an instance attribute specifically for the synchronize use case
|
# Override _remote_is_local as an instance attribute specifically for the synchronize use case
|
||||||
# ensuring we set local tmpdir correctly
|
# ensuring we set local tmpdir correctly
|
||||||
|
|
|
||||||
|
|
@ -356,6 +356,7 @@ def main():
|
||||||
specified_zones = module.params['zones']
|
specified_zones = module.params['zones']
|
||||||
collect_zones = list(set(specified_zones) & set(all_zones))
|
collect_zones = list(set(specified_zones) & set(all_zones))
|
||||||
ignore_zones = list(set(specified_zones) - set(collect_zones))
|
ignore_zones = list(set(specified_zones) - set(collect_zones))
|
||||||
|
if ignore_zones:
|
||||||
warn.append(
|
warn.append(
|
||||||
'Please note: zone:(%s) have been ignored in the gathering process.' % ','.join(ignore_zones))
|
'Please note: zone:(%s) have been ignored in the gathering process.' % ','.join(ignore_zones))
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -831,7 +831,7 @@ def main():
|
||||||
# handle mount on boot. To avoid mount option conflicts, if 'noauto'
|
# handle mount on boot. To avoid mount option conflicts, if 'noauto'
|
||||||
# specified in 'opts', mount module will ignore 'boot'.
|
# specified in 'opts', mount module will ignore 'boot'.
|
||||||
opts = args['opts'].split(',')
|
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'.")
|
args['warnings'].append("Ignore the 'boot' due to 'opts' contains 'noauto'.")
|
||||||
elif not module.params['boot']:
|
elif not module.params['boot']:
|
||||||
args['boot'] = 'no'
|
args['boot'] = 'no'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue