Fixes#42310
Previously, the firewalld module was making a call to
FirewallClientConfig.getZoneNames() which doesn't exist in versions
of firwalld older than 0.4.2, this patch implements the same logic
with older API calls to not require a newer version of firewalld.
Signed-off-by: Adam Miller <admiller@redhat.com>
In query_resource_by_key(), there is an equal comparison that is made to
know if the object we are looking for is present. Due to type difference
this comparison doesn't always retrieve true, even when it should.
This is due to the fact that the value in r_data dict are of type
unicode, while the other can be of type int, float,... .
```
>>> a = u'1'
>>> type(a)
<type 'unicode'>
>>> b = 1
>>> type(b)
<type 'int'>
>>> a == b
False
>>> str(a) == str(b)
True
```
Hence the values, for comparison purposes, are casted into strings.
* Merge again trickily similar Accelerated networking and IP forwarding
* Add type to enable_ip_forwarding documentation
* Fix merge error
* auth to auto
* azure_rm_networkinterface: remove auth_source from tests
* azure_rm_networkinterface: remove spurious auth_source from test
* azure_rm_networkinterface: Revert formatting on test
* azure_rm_networkinterface: Correct indentation
_parsed_return_data should only be used with the return from a module.
This location was invoking a remote shell command rather than a module
so we don't want it here.
they dropped the Linux so now it only shows as ALT, it should still be backwards compatible
pkg_mgr detection relies on `Altlinux` string, so properly setting os_distribution should take care of it as side effect
fixes#43539
* Remove use of simplejson throughout code base. Fixes#42761
* Address failing tests
* Remove simplejson from contrib and other outlying files
* Add changelog fragment for simplejson removal
* Change how data is sent to the persistent connection socket.
We can't rely on readline(), so send the size of the data first. We can
then read that many bytes from the stream on the recieving end.
* Set pty to noncanonical mode before sending
* Now that we send data length, we don't need a sentinel anymore
* Copy socket changes to persistent, too
* Use os.write instead of fdopen()ing and using that.
* Follow pickle with sha1sum of pickle
* Swap order of vars and init being passed to ansible-connection
* New module for managing EMC VNX Block storage
With the module emc_vnx_sg_member users can add or remove luns from
existing storage groups.
This module has been developed in couple with emc_vnx_mv_promote for
disaster recovery process automation, but can be used by itself.
This fix adds additional parameter 'datastore'. This parameter
provides a flexibility to specify custom datastore or datastore cluster
to deploy new virtual machine from template (which is located in different
datastore or datastore cluster from virtual machine's datastore or datastore
cluster).
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Remove wait_for & associated params
* Upgrade command dict to top-level, remove more wait_for accessories
* We don't need all this anymore
* Update docs
* Update tests to new argspec
* Be a little more explicit about sendonly
Also remove reference to the word provider.
* Add example of prompt and answer
This is to avoid users connecting to the APIC using SSH, which is likely
to fail. In the ACI documentation (linked from every module) we go into
more details on how people are supposed to work with the modules..
* Changing Lenovo Inc to Lenovo and update License file to be consistent.
* Moving code in util file to module file. This is done as per a review comment
* Update cnos_vlag.py
* Update cnos_vlan.py
* Update enos_config.py
Add exos_facts module. Known limitations at this time include:
- Interface MTU is not reported.
- Only primary interface IP is reported.
Add basic unit tests for the exos_facts module.
An EXOS CLI prompt can be prefixed with '! ' (shutting down), '* '
(running configuration does not match saved configuration), and
can include various status tokens within parentheses after these
prefixes. Update prompt regex to accept valid CLI prompts.
* Unified examples in all modules
* validate_certs is now 'no' instead of 'False'
* delegate_to changes
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* If the remote host supports session
capability set the `supports_generate_diff`
flag to false which identifies if config diff should
be generated within module or not
This functionality was not considered when the module was written, but
there's no reason why it shouldn't be supported.
We had to rework the query string construction and object filtering.
This new functionality allows to filter on arbitrary keys and supports
None values.
This PR fixes various issues with the existing framework, including
querying specific objects using construct_url_4 (i.e.
aci_epg_to_contract and aci_static_binding_to_epg)
Vultr API is being inconsisten in what it returns. An empty list when no
resources exists, but a dict of dict when they do. The case needs to be
handled so the module do not fail. An extra test has been added.
* Clarifications of parameters in yum_repo module
Added a note defining where the "name" parameter of the module will appear in the repo file and note explaining that the description parameter of the module is actually the name parameter in the repo file. It might help people transform their existing yum repository files in ansible managed repos.
If there are multiple distributed virtual portgroup network with same name
in different datacenter, vmware_guest module used to choose first DVPG irrespective
of the datacenter. This caused problem if two datacenter has same name for DVPG,
vmware_guest module failed with error "The object or item referred to could not be found."
This fix adds check to search for network (Distributed Virtual Portgroup)
till datacenter level. This avoids selection of same name DVPG from other datacenter.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
vmware_drs_rule_facts was missing details about vm_group and host_group
and their respective memeber names. This fix adds those details and updates documentation.
Fixes: #42980
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Added support for TLS-ALPN-01 verification.
* Unrelated commit to re-trigger tests.
* Added test for TLS-ALPN-01.
* Try to remove to_bytes in the hope that binary data survives in Python 2.
* Using Base64 encoding for TLS-ALPN-01 value.
delegate_to parameter in task only accepts string,
this fix will error out if other datatypes are provided instead of
string.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Only print warning when ansible.cfg is actually skipped
* Also add unittests for the find_ini_config_file function
* Add documentation on world writable current working directory
config files can no longer be loaded from a world writable current
working directory but the end user is allowed to specify that
explicitly. Give appropriate warnings and information on how.
Fixes#42388
* Refactoring to persistence connection BGP, factory, reload, save, showrun modules
* Refactoring methods from Util to module file
* Removing BGP Utility methods
* Adding to errors that need to be ignored
* Allow for the specification of a rhsm_repo_ca_cert if changing baseurl
If changing the baseurl we should allow for a ca cert to be updated from redhat-uep.pem
* Fixing documentation section
* added version to option rhsm_repo_ca_cert
* got rid of extra CR
* Added changes for Issue #38828, adds scope paramater to systemd module
* Removed description for old paramater
* Added version_added field for new option
* Readded the user paramater as a deprecated paramater
* Changed version for the scope paramater since I missed the release window
* Implement signed_request for sigV4 requests
* Correct linting errors
* More linting changes. Correct import.
* Final linting fix for inline comments
* Correct import of urllib.parse
* Update copyright and shebang line
* Remove shebang
* Put boto3 requirement. Abtract out get_aws_key_pair for module consumption.
* Dummy out unused region variable.
* Handle Boto3 ImportError
* - implement get_aws_credentials_object with willthames suggestion
- Handle session_token
* Make quote style consistant
* Chop arugment line up
* Correct indent