* Allow negative values to expires to unexpire a user
Fixes#20096
(cherry picked from commit 34f8080a19)
(cherry picked from commit 54619f70f4)
(cherry picked from commit 8c2fae27d6)
(cherry picked from commit db1a32f8ca)
* tweaked and normalized
- also added tests, made checking resilient
Using Ubuntu 14.04, test fails because 'blkid' < 2.21 doesn't recognize
'ocfs2' filesystem smaller than 108Mo:
6baa150398
filesystem: fix MKFS_FORCE_FLAGS for ocfs2
mkfs.ocfs2 -F won't work because mkfs.ocfs2 asks for a confirmation:
$ mkfs.ocfs2 -F img
mkfs.ocfs2 1.6.4
Cluster stack: classic o2cb
Overwriting existing ocfs2 partition.
WARNING: Cluster check disabled.
Proceed (y/N):
The undocumented 'x' switch must be used too.
add new line and update choice documentation
adding description for ocfs2 support
use correct variable ansible_distribution to test ocfs2 with Debian
distribution
use ansible_os_family for Debian
increase ocfs2 fs size to 20M (minimal size 11 instead of 10M)
add ocfs2 support for module filesystem
Update setup.yml
delete trailing spaces
add ocsfs2 defaut var
Install ocfs2-tools for all linux
Testing ocfs2 on for Ubuntu - restrict blkid to be be done
* Add setup ignore_errors for nxos_config test
* Fix parse_fan_info for n3k
* Skip bidir tests for N3k
* Omit vni config for n3k
* Skip unsupported nxos_vrf_af test on N3K
* Add legacy N3K platform tag
* Modifying cnos-facts, cnos_command and cnos-config in line with the design followed in Ansible. Adding unit test cases for these modules. Added plugins to support them.
* Removing doc fragment conflicts with other modules
* Replacing show with display
* improved scaleset facts
* scaleset facts fix some errors
* adding version_added for format param
* trying to break lines
* fixed syntax
* small code restructuring
* fix syntax
* fixed now
* add new test to scaleset / scaleset facts
* make scaleset test more clear
* temporarily comment out...
* try to retrieve scaleset facts
* try to add postfix
* fixed mistake
* fixed problem when no loadbalancer attached
* fixed another bug
* fixed sanity and a few other
* fixed pep8
* another try
* changed ansible to curated
* updated tests
* updated example and a few other mods
* small fixes
* removed unnecessary pass
* removed some items from ignore.txt
* remove file added by mistake
* Adding module win_domain_computer
This module is a wrapper of powershell *-ADComputer commands.
The main use case is to add non-windows computers to Active Directory
through a bridge windows computer.
* Replace `Set-Attr`
* Fix case insensitive comparisons
* Add omitted parameters in cmdlets
* Enhance module documentation
* Simplify `state` as case insensitive.
* Simplify try catch
* Fix indentation
* Make message errors more descriptive.
* Specify type in boolean parameters
* Keep parameter ingestion together
* Delete superfluous resultobj
* Workaround failing Erroraction
* Add target info in error
* Cosmetic changes
* Fix up Fail-Json to use correct message param
RDS instance and snapshot facts modules
Move common code into module_utils/rds.py
This work is a precursor to new rds_snapshot
and rds_instance modules
Improve rds_snapshot_facts to latest AWS standards
Improve exception handling, pagination etc.
Version added
Add clustered snapshot facts
Add proper RETURN information for snapshots and cluster_snapshots
pep8
Co-authored-by: Michael De La Rue <jababubic.margoteen@spamgourmet.com>
Create rds_instance_facts module using boto3.
Create common rds.py module_util library to be used by
rds_instance_facts and future RDS modules.
rds_instance_facts: use latest AWS helper methods
* Use `module.client` with `retry` to create AWS connection
* Return tags, using AWSRetry helper to backoff
* Use paginator to describe DB instances
* Further improve exception handling
* Fix RETURN documentation
update version_added
Co-authored-by: Michael De La Rue <jababubic.margoteen@spamgourmet.com>
* add aks module and integration tests
* linting
* update tests
* sanity check
* make some changes to AKS module
* make integration test work
* add fact
* add resource_group name
* add fact test
* fix test
* fix test
* linting
* changed line endings for facts
* output kubeconfig
* Update azure_rm_aks.py
* update integration test aliases
* update aliases
* add cloud_environment and auth_source to args
* Fix comments from Jborean93 (#3)
* update
* fix
* fix
* fix
* fix
* update doc
* fix
* Set src in the state functions rather than the toplevel
A good API should only require passing one version of a piece of data
around so do that for src
* Move the rewriting of path into additional_parameter_handling
When the path is a directory we can rewrite the path to be a file inside
of the directory
* Emit a warning when src is used with a state where it should be ignored
Fixes several bugs exposed in #34893
* Fixes relative path handling in copy so that it splits directories and
reconstructs the correct file path
* Return failed in the proper circumstances
* Correct answer example as 'c' cancels, not confirms. Moved command note to be in line with command docs.
* Correct example to escape square brackets. Remove '\r' mention as it does not get passed correctly.
* Add carriage return example since it works with double quotes.
* Remove colon which was breaking docs rendering.
* Changing Lenovo Inc to Lenovo and update License file to be consistent.
* Editing cli commands to expanded form. Changing username and password fields as per Ansible standards.
* WIP Pull persistent connection parameters via get_option
* Fix pep8
* Add use_persistent_connection setting to paramiko_ssh plugin
* Add vars section to persistent_command_timeout setting and prevail provider values over config manager
* Use persistent_command_timeout on network_cli instead of timeout
* Fix unit tests
If we don't call loader to get network_cli, then _load_name is never
set and we get KeyError.
* Pull persistent_command_timeout via config manager for ios connection local
* Pull persistent_command_timeout via config manager on connection local
* Initial commit
* Socket Timeout and dest file handler
* sftp handling
* module name change as per review
* multiple thread tmp file overwite problem
* Integration test suite for network_put
* add additional testcase for dest argument
* fix pylint/pep8/modules warnings
* add socket timeout for get_file
* network_get module
* pep8 issue on network_get
* Review comments
* Allow Unicode chars to be dumped by yaml stdout callback
Allow Unicode in yaml.dumper to support printing strings unescaped with
\uxxx chars.
Cf. https://stackoverflow.com/a/29600111
* Switch from decode('utf-8') to the more compatible to_text()
* New module for CRUD functionality of networks in a Meraki environment
- Relatively full integration test suite
- More functions to come
* Fix indent for PEP8.
- Look into why this didn't show on a local PEP8 test
* Dag requested changes.
- Removed a section in get_net as its backend isn't implemented
- Documentation modifications
* Improved integration testing and results
- Added get_org() function to return data for single org
- Added a lot of new integration tests
- Changed result now shows, still probably could be better
* Fix formatting errors for PEP8
on networktocode slack there was a user that wanted an example of how to add a switch vlan interface. This will work and was tested on a 3850 cisco ios switch
* New module: ec2_vpc_vpn_facts
* Add integration tests for ec2_vpc_vpn_facts and the IAM permissions
* Add retry to VPC removal
* Use unique name for VGW
* Always clean up after tests and add retries
* pkg returns 4 for "nothing to do"
We need to handle this because our own checking for whether there's anything to do returns false negatives in certain circumstances.
We need to rename the response `rc`, because that name is reserved by
Ansible to indicate a failure if it is non-zero.
Fixesansible/ansible#22781 and ansible/ansible-modules-extras#932.
* Don't rename `rc` to to `pkg_rc`, and instead override the failure state.
* Drop mention of renamed variable in `pkg5` module.
Added detection of additional formatting for domain_name, domain_search,
lookup_source, and lookup_enabled on some software versions. In each
case they failed to detect existing commands with a '-' in it.
Fix: #38301
This fix updates rabbitmq_binding documentation
* change 'exchange' to 'binding'
* Some minor doc fixes
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Update nios.py
* Update nios.py
* Update nios.py
* nios lookup errors out when there are no results #37970 Open
Indentation failure issue resolved
* Returning empty list instead of None
In case of no results, res will be returned as an empty list instead of None (implementing ganeshrn comment)
* infoblox ipv6 support changes
* infoblox ipv6 support changes
* for fixing pep8 errors
* moving ipaddr check to utils
* adding ipv6addr check
* increasing space to resolve pep8 error
* modified the playbook examples to valid ones
* Update nios_network.py
* create module tmpdir based on remote_tmp
* Source remote_tmp from controller if possible
* Fixed sanity test and not use lambda
* Added expansion of env vars to the remote tmp
* Fixed sanity issues
* Added note around shell remote_tmp option
* Changed fallback tmp dir to ~/.ansible/tmp to make shell defaults
* fix problem with documentation and param definition difference
* removed some E324 from ignore.txt
* fixed mistake
* remove one more E324
* removed function app
* fixing append tags
* leaving append tags for later
<!--- Your description here -->
Edit to the notepadplusplus example.
Removed `.install` as per chocolatey documentation, the package is just notepadplusplus.
docs found here: https://chocolatey.org/packages/notepadplusplus
+label: docsite_pr
* Allow idempotent use of ec2_ami_copy
When `tag_equality` is set true, use tags to determine
if AMIs in different accounts are the same, and don't
copy the AMI twice if they are the same.
Use AnsibleAWSModule and make imports more consistent
with other modules
* Update version added
* More code review changes
* Review changes - Recommended way to start EC2 connection
pip 10 gives exit code 1 for empty argument lists (pip < 10 gave exit 0)
see also https://github.com/pypa/pip/pull/4210
To still allow playbooks to pass when giving empty lists, don't call
pip in that case, but show a warning.
Check datatype of device instead of comparing them directly in
vmware_guest. Also, added testcases to check this behavior.
DPVG is not supported in current version vcsim
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Fix for Azure loadbalancer tags.
It was possible to add tags to an Azure loadbalancer, but the tags were never set in Azure.
This patch fixes that.
* Pass shippable tests
* azure_rm_loadbalancer_facts requires rg
Getting facts of all loadbalancers via azure_rm_loadbalancer_facts requires a resource group.
This fix adds the rg as parameter to the list() call.
* Revert changes in azure_rm_loadbalancer_facts
The changes belong to another pull request.
* Add members to bigip_gtm_pool
* Add monitors to bigip_gtm_pool
* Add availability_requirements to bigip_gtm_pool
* Refactor bigip_gtm_pool
* Normalize the product value returned by gtm facts
* Corrected various documentation
* Updated various F5 coding conventions
* Add partition to bigip_static_route
* Added more unit tests
* Refactor bigip_gtm_virtual_server
* Add translation_address to bigip_gtm_virtual_server
* Add translation_port to bigip_gtm_virtual_server
* Add availability_requirements to bigip_gtm_virtual_server
* Add monitors to bigip_gtm_virtual_server
* Add virtual_server_dependencies to bigip_gtm_virtual_server
* Add link to bigip_gtm_virtual_server
* Add limits to bigip_gtm_virtual_server
* Add partition to bigip_gtm_virtual_server
* Fix bigip_gtm_server to correctly create other server types
* Add type to virtual_server
* Add address_translation to virtual_server
* Add port_translation to virtual_server
* Add ip_protocol to virtual_server
* Add firewall_enforced_policy to virtual_server
* Add firewall_staged_policy to virtual_server
* Add security_log_profiles to virtual_server
* configurable list of facts modules
- allow for args dict for specific modules
- add way to pass parameters
- avoid facts poluting test
- move to 'facts gathered' flag
- add 'gathering' setting tests
Based on the documentation, 'wait_timeout' is 'Used in conjunction with instance_ids option'. This lead me to believe that I could not use this parameter to try and solve the 'Waited too long for ELB instances to be healthy' error I was experiencing.
This seems a little like duplicating code since all of the called
functions need it but prev_state isn't part of argument parsing so it
doesn't belong in the toplevel main() function.
It feels like this repeats itself because it pulls the creation of
a byte string for path into every state function. However, it actually
cleans the API by only passing a single parameter for a thing (the path)
instead of sending it in twice.
Well organized programs should only have a few successful exit points.
This commit moves all of the successful exit points for the file module
into the main() function. Other functions return their results to the
main function which can then choose whether there is more procesing to
do before exit or not.
Use an exception to return failures rather than fail_json(). This way
we can easily catch the failures if the calling code decides it can deal
with it. This has the side effect of making it easier to unittest this
code as we can catch the expected exceptions instead of having to catch
the interpreter exiting and then parse stdout for the expected data.
* Separate the logic for each state into separate functions
* Start the process of separating out initialization (pre-processing of
parameters that cannot be done via arg spec) from the logic to
implement each state.
* Start the process of raising exceptions for errors and returning
result values from each state implementing function Goal is for all
fail_json's to be consolidated into exception handlers at the toplevel
and for there to be only one exit_json() at the toplevel.
* Remove use of six.b as Python-2.6+ have byte literals.
* Make AnsibleModule a global object so we'll have access to it in all
the functions we're going to break this up into.
* Rework the parameters so things that are in file_common_args are used
from file_common_args or the reason for deviation is documented.
* Remove validate as a parameter: this should be taken care of by
removing it from params before the copy and template action plugin
invoke file.
* Rename diff_peek to _diff_peek as it is an internal parameter.
* add module_name execute_module call to assemble so that it is more greppable
* Removed forwarders parameter that did not work
* Updated coding conventions
* Added ssl_cipher_suite and ssl_protocols to bigip_device_httpd
* Added more unit tests
This PR includes:
- Fixes to the majority of module validation issues
(deliberate inconsistencies between docs and arg_spec)
- Removal of deprecated parameters 'method' and 'protocols'
- A few typos in the documentation
There are still some left-over validation errors, some are deliberate
(like doc strings as default to indicate ranges, etc.)
* allow to load json marked as unsafe or vault
* centralized json code/decode, add vault support
* use generics to allow for more varied inputs
* allow inventory to dump vault w/o decrypting
* override simplejson also
* add entry for unsafe also
* load vaulted and unsafe json, support unvaulting if secrets provided
Issue : NameError: global name ‘cnos_devicerules’ is not defined. while running cnos modules.
Device Rule file validates the range and type of data going into each CLI based on device type it is executed against.
This has to be backported to 2.5