Since it will be used outside just AWS modules, this commit moves
`camel_dict_to_snake_dict` and `snake_dict_to_camel_dict` functions into
a new module_utils file under common/ to match their wider usage.
Currently if the ansible-galaxy client fetches a role from a galaxy
server, it then fetches the role from Github. This change allows a
galaxy server to provide an alternate source url that points to an
archive that contains the role version.
* refactor firewalld module, add firewalld module_util
This change is meant to enable the addition of advanced feature
specific firewalld modules that will have different module option
patterns than what fits in the current firewalld module, while
keeping as much common code as possible in the module_util
Signed-off-by: Adam Miller <admiller@redhat.com>
Add the 'localhost_warning' configuration option. When set to 'false',
this will prevent Ansible from issuing a warning when the inventory is
empty and it is using an implicit inventory with only 'localhost'.
Closes#17086
For protocol, it should be a list and all
of the values are expected to be lowercase.
An example is also added to show how to add
both Spice and VNC consoles to a VM.
Under a non-utf-8 locale (for instance, LC_ALL=C), passing a non-ascii
filename to many APIs will traceback. Fix that by explicitly converting
to byte strings before passing to external APIs.
May fix#27262
This fix corrects the comparison of system generated guest_id with
user provided guest_id. Module used to report change even if the
guest_ids were same. For example, user provided guest id rhel7_64guest
and VMware returned guest id rhel7_64Guest are logically same but
lexicographically different and due to this module use to report
change even if there is no change applied.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Remove unused `find_entity_child_by_path` API
* Remove unused `fetch_file_from_guest` API as this has separate module
vmware_guest_file_operation
* Remove unused `push_file_to_guest` API as this has separate module
vmware_guest_file_operation
* Refactor exception variables
* Change GPL License boilerplate to one-liner
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* modules/net_tools/ldap: Refactor shared options
* modules/net_tools/ldap: Refactor shared code
* modules/net_tools/ldap: Add ldap_passwd module
* modules/net_tools/ldap/ldap_passwd: More robust change check
* In some deployments, using compare_s results in spurious “changed” results,
while bind is more reliable. The downside is that it results in an extra
connection, and the code it more involved.
* ldap_passwd: Rename methods passwd_[cs]
* ldap_passwd: Remove unecessary type=str
* ldap: Factor-out failure cases
* ldap_passwd: Provide more precise error messages
* ldap_passwd: Irrelevant syntax changes
* ldap_passwd: Rename u_con to tmp_con
* ldap_passwd: Keep HAS_LDAP local
* LDAP doc update
* Resolved all copyright related issues
* Resolved self.fail calls
* Update documentation
Signed-off-by: The Fox in the Shell <KellerFuchs@hashbang.sh>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* [AWS] report boto3/botocore versions during `fail_json_aws`
When modules call `fail_json_aws` and boto3 is installed, gather the
boto3 and botocore versions so that any new AWS module issues will
include the user's boto3 installation info. This will make debugging
issues where features aren't available yet easier.
* PEP8
* Switch to `dict` rather than tuple returns
* task_executor.py: Raise 'conditional exception' in case of 'include_*'
Fixes#33632
Signed-off-by: Patrick Ringl <patrick_@freenet.de>
* Re-organize tests, add static include test with undefined var
* Remove unnecessary conditional
* Fixes for mode=preserve
* Document mode=preserve for template and copy
* Make mode=preserve work with remote_src for copy
* Make mode=preserve work for template
* Integration tests for copy & template mode=preserve
Fixes#39279
* Changed mode option in win_copy to hidden option as it doesn't reflect copy mode