* better cleanup on task results display
callbacks get 'clean' copy of result objects
moved cleanup into result object itself
removed now redundant callback cleanup
moved no_log tests
* moved import as per feedback
(cherry picked from commit 01b6c7c9c6)
* wait_for: treat broken connections as "unready"
We have observed the following condition while waiting for hosts:
```
Traceback (most recent call last):
File "/var/folders/f8/23xp00654plcv2b2tcc028680000gn/T/ansible_8hxm4_/ansible_module_wait_for.py", line 585, in <module>
main()
File "/var/folders/f8/23xp00654plcv2b2tcc028680000gn/T/ansible_8hxm4_/ansible_module_wait_for.py", line 535, in main
s.shutdown(socket.SHUT_RDWR)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 57] Socket is not connected
```
This appears to happen while the host is still starting; we believe something is
accepting our connection but immediately resetting it. In these cases, we'd
prefer to continue waiting instead of immediately failing the play.
This patch has been applied locally for some time, and we have seen no adverse
effects.
* wait_for: fixup change
We were missing an import and a space after the `#`
(cherry picked from commit 402b095841)
We do not go through the effort of finding the right PROTOCOL setting if
we have SSLContext in the stdlib. So we do not want to hit the code
that uses PROTOCOL to set the urllib3-provided ssl context when
SSLContext is available. Also, the urllib3 implementation appears to
have a bug in some recent versions. Preferring the stdlib version will
work around that for those with Python-2.7.9+ as well.
Fixes#26235Fixes#25402Fixes#31998
(cherry picked from commit 725ae96e1b)
* Correct usage for shutil.rmtree
Fix adds correct usage of shutil.rmtree in git module
Fixes: #31225
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Include archive tests so they get run
* Use new include syntax
* Cleanup syntax on git tests
- use multi-line YAML
- remove unneeded {{ }} around vars in conditionals
- remove unneeded quotes
- add task file name to task names for easier troubleshooting when things fail
* Make archive tests work for RHEL/CentOS 6
The older versions of Jinja2 in RHEL/CentOS 6 required assertion tasks using the map filter to be skipped.
The older version of git required gzip compression to be skipped on RHEL/CentOS 6.
* Account for ansible_distribution_major_version missing
(cherry picked from commit a047fe0e4c)
An incorrect removal of a conditional resulted in include_tasks falling
through to the old static detection mechanism incorrectly. This restores
the previous conditional check.
Fixes#31593
(cherry picked from commit 3ef4f7e847)
This change makes the PluginLoader use DEFAULT_INVENTORY_PLUGIN_PATH setting.
Inventory Plugins were only being loaded the 'inventory_plugins' folder of the current directory,
as well as the ansible-provided inventory plugins (e.g. `/path/to/site-packages/ansible/plugins/inventory`).
(cherry picked from commit 0371d0deda)
* Fix rollback in junos_config (#31424)
* Fix rollback in junos_config
Fixes#30778
* Call `load_configuration` with rollback id in case
the id is given as input
* Pass rollback id to `get_diff()` to fetch diff from device
* Fix unit test
(cherry picked from commit 88da95bb77)
* Update changelog
* fix paths to actually be config file relative
also allow to unfrack paths for 'not cwd'
only use -i 'localhost,' for adhoc in pull
(cherry picked from commit 3886f80e44)
* Module option metadata are extra arguments rather than S3 object metadata: update ExtraArgs variable.
* Maintain backwards compatibility by guessing at content type rather than always defaulting to binary/octet-stream.
* [rpm_key] Fix to import first key on the system
Fixes: #31483
* [rpm_key] removed unsafe_shell and "throwaway" underscore
* [rpm_key] adding test to add the first key on system
(cherry picked from commit 5ccc1072ea)
* Use default values for object returned from aws to prevent TypeError
NoneType exception fixes#31454
(cherry picked from commit 6df6f79bbd38407c3c81b1d194d87c9fca00f5f0)
* Remove sysctl entry when state=absent
* Cleanup sysctl integration test syntax
* Correct grammar on error message
* Add sysctl integration test for state=absent
(cherry picked from commit 2610b521bc)
* clarified inventory_dir changes for 2.4
added example on how to restore (mostly) old behaviour for add_hosts
fixes#30901
(cherry picked from commit dc69af50dc)
this should allow user to control how they want the playbook dirs inspected
for additional vars, default now reverts to 2.3 behaviour (top).
corrected paths order
minor doc reword
(cherry picked from commit 7d49b27218)
this was abandoned early on the manger side but seems like we left behind on plugin side.
more flexible extensions with yaml plugin
validate data correctly for yaml/constructed
fixed issue with only adding one child to keyed, the group only got the host that forced it's creation
fixes#31382fixes#31365
(cherry picked from commit e4c61ea9a1)
* add codeblock to handle 5K platform for nxos_snmp_host
* fix get_snmp_traps for 5K platform
* Make shippable happy
(cherry picked from commit 48f4643a66)
When keyid is 8 charactes long, drop_key function cuts everything
issuing an error: "package gpg-pubkey- is not installed"
(cherry picked from commit 4337b7a777)
This breaks output from commands in current playbooks. Since this
change fixed a smaller use case we're going to revert this for 2.4.1 and
revisit a different fix for non /bin/sh shells for 2.5.x
This reverts commit 55135c0825.