Commit Graph

4449 Commits (4faad64579cf3325349e5d21c095edf7a5dda0b3)

Author SHA1 Message Date
Abhijeet Kasurde e4254da1b1
Add esxi_hostname as argument in vmware_vswitch (#30498)
Fix adds esxi_hostname as Ansible module argument for user
to define ESXi hostname to deploy VMware vSwitch.

Fixes: #24647

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Dag Wieers 5b5d767c0b apt_rpm: PEP8 compliancy and documentation changes (#33431)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Tim Rupp 5fa25a0288
Adds fixes to bigip_asm_policy (#33440)
Integrates some upstream changes that were made and fixes several
spacing and testing errors
7 years ago
Toshio Kuratomi 7bd0af15d2
Enhance empty __init__ code-smell to check module_utils (#33438)
Empty __init__ will allow us to use python namespaces with all of these
files.  That may be something we want to take advantage of for allowign
them to be expanded by user dirs.  Also might be needed for AnsiballZ or
other wrapper enhancements in the future.
7 years ago
Toshio Kuratomi e499bccbaa
Port some tests away from nose as examples (#33437)
We don't need to use both nose and pytest.  Once we get rid of all uses
of nose we can remove the extra dependency
7 years ago
R. Francis Smith e957760d52 updated pamd rule args regexp to match file paths also (#33432)
* Added . and / to rule args regexp

Things like pam_echo.so file=/etc/foo.txt weren't being matched and
causing incorrect change counts.  Adding / and . fixed that.

Fixes #33351

* pamd: test argument with value

Relates #33351
7 years ago
Dag Wieers e0c94aa6a7 yum: PEP8 compliancy and documentation changes (#33424)
This PR includes:
- PEP8 compliancy changes
- documentation changes
7 years ago
Ganesh Nalawade 35acae7ea7
Fix eos integration test failure (#33407)
Fixes #33406
Fixes #33405

*  Fix typo in network_cli for sendonly
*  Send `abort` to remote device in case configuration fails
*  Fix indentation issue in eos_static_route integration test

*  Revert network_cli change
7 years ago
Abhijeet Kasurde 1ca7929f96 VMware: Add support for numCoresPerSocket (#33149)
This fix adds support for hardware parameter 'numCoresPerSocket'
in vmware_guest module. Also, adds integration tests for this change.

Fixes: #20406

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Abhijeet Kasurde 7209b7f060
VMware: Add integration test for vmware facts (#33404)
This fix adds integration tests for vmware_guest_facts.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Ricardo Carrillo Cruz 1b31e34d7c
Remove provider from iosxr user tests (#33394) 7 years ago
Anil Kumar Muraleedharan bada3afee9 Adding module enos_config and its UT files (#33081)
* Adding module enos_config and its UT files

* Removing trailing line

* Removing trailing lines

* Editing enos_module.py to fix build errors

* Removing blank lines in end

* Updating enos_config.py based on review comments

* Adding one more blank line

* Removing training white space

* Removing test_enos_config_force method from UT

* Updating documentation

* Comments by John, Remove version_added: "2.5"
7 years ago
Toshio Kuratomi aa7bd8bc11 Port AnsibleModule deprecate and warning tests to pytest (#33162) 7 years ago
Nathaniel Case a1da3dc997
Auth to become (#33319)
* terminal.on_(de)?authorize -> terminal.on_(un)?become

* Update network_cli

* Readd on_(de)?authorize as wrappers

* Update tests
7 years ago
Matt Martz 3a2c1541ca
Fix tests as filters syntax in recently modified integration tests (#33346) 7 years ago
Martin Krizek 0592fd47bc selinux: check if policy exists before switching (#31834)
* selinux: check if policy exists before switching

* Check the policy dir
7 years ago
George Nikolopoulos 34f965addd New module: Issue NITRO requests to a Netscaler instance (network/netscaler/netscaler_nitro_request) (#33091)
* Add netscaler_nitro_request module

* Make changes as requested.

* Fix whitepsace in EXAMPLES block.

* Set module changed status according to operation performed.
7 years ago
Alex Monteiro 2114278947 DatacenterFactsModule for HPE OneView (#32701)
* Added support to Datacenter resources in HPE OneView

* Adjusting comments in oneview_datacenter_facts

* Adding no_log on the documentation

* Using Pytest to Oneview DatacenterFactsModule tests
7 years ago
Kedar K 717193b67f
Fix integration test failures due to wrong files paths to ficture and (#33329)
missing ssh port
7 years ago
Yanis Guenane a773bd7ad5 openssl_publickey: Ensure format OpenSSH is idempotent (#33264)
Currently the check() method for idempotence only assumes the public
key is under the form of a PEM file when its not always the case.

The module openssl_publickey allows one to generate OpenSSH format
publickey. This leads to idempotence not being detected.
7 years ago
Vincent Bernat e65001ee22 cloudstack: fix spelling of "affinity_type" (#33231)
The previous spelling, "affinty_type" is marked as deprecated and will
be removed in Ansible 2.9. Both spelling are mutually exclusives.
7 years ago
Trishna Guha 819f9ee8fa Add port arg to establish ssh connection in nxos_file_copy (#33304)
* Add port arg to establish ssh connection in nxos_file_copy

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* resolve kedar's comment
7 years ago
Jordan Borean 8386201242 add deprecation for stat get_md5 (#33002) 7 years ago
Matt Martz 4fe08441be Deprecate tests used as filters (#32361)
* Warn on tests used as filters

* Update docs, add aliases for tests that fit more gramatically with test syntax

* Fix rst formatting

* Add successful filter, alias of success

* Remove renamed_deprecation, it was overkill

* Make directory alias for is_dir

* Update tests to use proper jinja test syntax

* Update additional documentation, living outside of YAML files, to reflect proper jinja test syntax

* Add conversion script, porting guide updates, and changelog updates

* Update newly added uses of tests as filters

* No underscore variable

* Convert recent tests as filter changes to win_stat

* Fix some changes related to rebasing a few integration tests

* Make tests_as_filters_warning explicitly accept the name of the test, instead of inferring the name

* Add test for tests_as_filters_warning

* Update tests as filters in newly added/modified tests

* Address recent changes to several integration tests

* Address recent changes in cs_vpc
7 years ago
Samer Deeb cbf28c20cb Add Support for Mellanox switches: first module: mlnxos_command (#33121)
* Add Support for Mellanox switches: first module: mlnxos_command

Signed-off-by: Samer Deeb <samerd@mellanox.com>

* Add cliconf support for mlnxos

Signed-off-by: Samer Deeb <samerd@mellanox.com>

* 1- Fix short description, 2- remove waitfor

Signed-off-by: Samer Deeb <samerd@mellanox.com>

* remove usage of check_args

Signed-off-by: Samer Deeb <samerd@mellanox.com>
7 years ago
Trishna Guha 25a465ffcb
loopback doesn't support passive_interface (#33252)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Martin Krizek 3a2a1e054f Fix include in loop when stategy=free (#33094) 7 years ago
René Moser 1a546711e1
cs_vpc: add new argument clean_up (#33278)
* cs_vpc: add new argument clean_up

* docs cleanup
* extend tests and increase coverage

* change default for clean_up to None

* extend tests
7 years ago
René Moser 1f9e84fdd4
cs_serviceoffer: remove unused code and improve test coverage (#33276) 7 years ago
Yanis Guenane 32635577a3 openssl_publickey: Do not fail on empty existing file (#33255)
Currently during the check phase, the code considers the file to be
a public key if the file exist - which is not necessarily true.

This commits aims to ensure that the file is actually a publickey else
returns false for the check.
7 years ago
Ken Celenza 748107d369 Type manipulation (#28446)
* add type manipulation

* update for py3

* add tests for list to dict

* Add dict to list tests

* Update tests to search for regex in response

* pep8 clean up

* update Exception for py3

* update test to be py2/3 compat

* update for py26 compat

* potential fix for py3 and py26

* potential fix for py3 and py26 take2

* add new line to kick off shippable

* remove cache file created

* fix filter name

* add space for shipable
7 years ago
Ganesh Nalawade 3d63ecb6f3
Refactor junos modules to Use netconf and cliconf plugins (#32621)
* Fix junos integration test fixes as per connection refactor (#33050)

Refactor netconf connection plugin to work with netconf plugin

* Fix junos integration test fixes as per connection refactor (#33050)

Refactor netconf connection plugin to work with netconf plugin
Fix CI failure
Fix unit test failure
Fix review comments
7 years ago
Matt Clay 2ece86fba1 Split up cloud tests to avoid 1 hour CI limit. 7 years ago
René Moser 7adf91997d
cloudstack: new module cs_serviceoffer (#33060) 7 years ago
Yuwei Zhou e4194b20db Azure create virtual machine with an Availability Set associate (#32535)
* add availability set for vm

* add test

* add import

* fix

* add test assert and output

* fix lint and version added

* add null check

* fix mirror

* fix mirror
7 years ago
Matt Clay b865ddedac Change the default ansible-test docker image. 7 years ago
Matt Clay 633119df75 Disable flakey `win_msg` integration test. 7 years ago
James Cammarata d8ae4dfbf2 Adding aliases for field attributes and renaming async attribute (#33141)
* Adding aliases for field attributes and renaming async attribute

As of Python 3.7, the use of async raises an error, whereas before the use
of the reserved word was ignored. This adds an alias field for field attrs
so that both async and async_val (interally) work. This allows us to be
backwards-compatible with 3rd party plugins that may still reference Task.async,
but for the core engine to work on Py3.7+.

* Remove files fixed for 'async' usage from the python 3.7 skip list
7 years ago
Matt Clay 1ee511f82c Use an abspath for network inventory ssh key path. 7 years ago
Matt Clay 3a6fad38fa Update vyos completion in network.txt. 7 years ago
Matt Clay 887f227994 Use vyos/1.1.8 in CI. 7 years ago
jctanner 218987eac1
ANSIBLE_SSH_USETTY configuration option (#33148)
* Allow the user to circumvent adding -tt on ssh commands to help aid in
debugging ssh related problems.
* Move config to the plugin
* Set version_added
* Change yaml section to "connection"
* Fix ssh unit tests
7 years ago
Gaudenz Steinlin 4c94c6f9ba cloudscale_server: add timeout param and increase default timeout (#33088)
* Improve error message in cloudscale_server module

Fix punctuation and add the full contents of "info" to the output in
case of failed API calls. This is useful in case of connection timeouts
and other error conditions where there is no response body available.

* Increase timeouts in cloudscale_server module

Increase the timeouts to not fail in case the API calls take a bit
longer than usual. The default timeout of fetch_url is 10s which is
quite short. Increase it to 30s. The timeout for waiting for a server
change is increased as well as it calls the API in a loop. Therefore
this value should be larger than the API timeout.

* Send API parameters as JSON in cloudscale_server module

Use JSON to send the POST data to the API instead of an urlencoded
string. Urlencoding is not really a good match for some Python
datatypes.

This fixes an issue when submitting a list of SSH keys which did not get
translated properly.

* Fix typo in cloudscale_server documentation

* cloudscale_sever: Replace timeout const by api_timeout param

Replace the static TIMEOUT_API constant by a user configurable
api_timeout parameter. Also eliminate the TIMEOUT_WAIT constant by
2*api_timeout. This means that the timeout to wait for server changes is
always double the timeout for API calls.

* Use Debian 9 image for cloudscale_server tests
7 years ago
Matt Clay c6bb6c72cc Fix anomalous backslashes and enable pylint test. 7 years ago
Yuwei Zhou b6c401ccc8 Fixes #30863: support update source_address_prefix in azure_rm_securitygroup (#32614)
* compare source address prefix

* remove useless quote
7 years ago
Matt Clay 6f4731ef11 Force all tests to run on docker image updates. 7 years ago
Jordan Borean 0962a0d816 win_updates: removed scheduled task to use become instead (#33118)
* win_updates: removed scheduled task to use become instead

* updated docs to remove scheduled task info

* fix issue with only installing last update in group
7 years ago
Brian Coca ebd08d2a01 jsonify inventory (#32990)
* jsonify inventory
* smarter import, dont pass kwargs where not needed
* added datetime
* Eventual plan for json utilities to migrate to common/json_utils when we split
  basic.py no need to move jsonify to another file now as we'll do that later.
* json_dict_bytes_to_unicode and json_dict_unicode_to_bytes will also
  change names and move to common/text.py at that time (not to json).
  Their purpose is to recursively change the elements of a container
  (dict, list, set, tuple) into text or bytes, not to json encode or
  decode (they could be a generic precursor to that but are not limited
  to that.)
* Reimplement the private _SetEncoder which changes sets and datetimes
  into objects that are json serializable into a private function
  instead.  Functions are more flexible, less overhead, and simpler than
  an object.
* Remove code that handled simplejson-1.5.x and earlier.  Raise an error
  if that's the case instead.
  * We require python-2.6 or better which has the json module builtin to
    the stdlib.  So this is only an issue if the stdlib json has been
    overridden by a third party module and the simplejson on the system
    is 1.5.x or less.  (1.5 was released on 2007-01-18)
7 years ago
Matt Clay 07bb7684b0 Add PS dependency analysis to ansible-test. 7 years ago
Matt Clay e45c763b64 Fix invalid string escape sequences. 7 years ago
Matt Clay f9cd50411f Enable Python 3.7 in ansible-test. 7 years ago
Ricardo Carrillo Cruz be7a3adeb7
Fix ovs integration tests initial setup (#33136) 7 years ago
Ricardo Carrillo Cruz de1bfde2d8
Add very basic openvswitch_bridge integration test (#33134)
More to come on this module.
7 years ago
Abhijeet Kasurde fbe946719e
VMware: Add fix for setting manual MAC address (#32885)
This fix adds ability to set MAC address maunally. Before adding
any MAC address, the value is validated. If value is not valid, then
MAC address is set to vCenter generated MAC address.
Also, added integration tests for this change.

Fixes: #21161

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Martin Krizek 3c1fb9b547
Use custom rpm repo script for dnf testing (#32737)
* Use custom rpm repo script for dnf testing

* Switch to a jinja2 test
7 years ago
Ganesh Nalawade 0ddf092ae3
Add new filter to parse xml output for network use cases (#31562)
* Add new filter to parse xml output for network use cases

Fixes #31026
*  Add parse_xml filter
*  Add documentation for parse_xml filter

* Edited for clarity.

* Fix review comment and add unit tests

* Fix unit test CI failure

* Fix CI issues

* Fix unit test failures

* Fix review comments

* More copy edits.
7 years ago
Matt Clay 5f5e150771 Limit paramiko to < 2.4.0 for python 2.6. 7 years ago
Corban Johnson d9a52db17d Adding RPC attribute parameters to junos_rpc network module (#32649)
* Adding RPC attribute arguments to `junos_rpc` network module.

* Specifying module argument version.

* Fixing DOCUMENTATION block.

* First attempt at new test fixture.

* Updated RPC_CLI_MAP.

* Use `result` instead of `reply`.
7 years ago
Steve Jacobs 400d821fdb Added eagerzeroedthick disk option to disk spec for vmware_guest (#28121)
* Added eagerzeroedthick disk option to disk spec
* Updated docstrings for vmware_guest disk
* VMware: Integration test for disk type

Signed-off-by: Steve Jacobs <sjacobs@brokencrew.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Matt Clay 677aca1cc7 Add Python 3.7-dev to the default docker image. 7 years ago
Will Thames 0b128e2e29 Add tests for ec2_vpc_route_table (#32036)
* Add tests for ec2_vpc_route_table

Initial tests for ec2_vpc_route_table ready for boto3 porting

* Turn AWS connection information into a YAML block
7 years ago
Mike Wiebe 95a2140f4b Use show command to support wider platform set for nxos_interface module (#33037)
* Use show command to support wider platform set

* Fix unit tests
7 years ago
Arnaud 84117e57ba nxos: 32 bits AS in as-dot format not recognized by regexp asn_regex (#30569)
* added test for 32 bits AS

* Lint not happy.
7 years ago
Philippe Dellaert 0324d5e850 Updating parameter to match vmware_portgroup parameter (#33059) 7 years ago
Tim Rightnour 5962337332 Add additional facts to the fact gathering of vmware (#31632)
Adds facts about datastores, esxi_host, vm files, ha state, question, is_template, consolidation status and hw_files. Also, adds integration tests for vmware fact enhancement.
7 years ago
Ganesh Nalawade ce04f6e961
Fix junos integration test fixes as per connection refactor (#33050) 7 years ago
Matt Clay 781219bcfd Fix and re-enable zypper* integration tests in CI. 7 years ago
Matt Clay 2ef438c962 Improve zypper refresh/clean for opensuse images. 7 years ago
Dag Wieers b3e4a88b90 consul_session: PEP8 compliancy and documentation changes (#33000)
THis PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Tim Rupp c94d57311c
Adds bigip_vcmp_guest module (#33024)
This module can be used to manage guests on a vCMP provisioned BIG-IP.
vCMP is a hardware-only feature, therefore this module cannot be used
on the VE editions of BIG-IP.
7 years ago
Dag Wieers 5f36932adf pacemaker_cluster: PEP8 compliancy and doc changes (#33001)
This PR includes:
- PEP8 compliancy changes
- DOcumentation changes
7 years ago
René Moser a314faae0e
cs_firewall: use list type for cidr (#33020) 7 years ago
Pilou a5c9726502 Unit tests: share common code (#31456)
* move set_module_args to units.modules.utils
* unit tests: reuse set_module_args
* unit tests: mock exit/fail_json in module.utils.ModuleTestCase
* unit tests: use module.utils.ModuleTestCase
* unit tests: fix 'import shadowed by loop variable'
7 years ago
Jacob McGill 5747bf34d1 Network ACI: Add integration tests for several module (#33016) 7 years ago
Jordan Borean 8c5ee3461e win_stat: simplified tests before next change (#32996) 7 years ago
Daniel Shepherd cfbe9c8aee [cloud] Add IPv6 support for ec2_vpc_subnet module(#30444)
* Add integration test suite for ec2_vpc_subnet

* wrap boto3 connection in try/except

update module documentation and add RETURN docs

add IPv6 support to VPC subnet module

rename ipv6cidr to ipv6_cidr, use required_if for parameter testing, update some failure messages to be more descriptive

DryRun mode was removed from this function a while ago but exception handling was still checking for it, removed

add wait and timeout for subnet creation process

fixup the ipv6 cidr disassociation logic a bit per review

update RETURN values per review

added module parameter check

removed DryRun parameter from boto3 call since it would always be false here

fix subnet wait loop

add a purge_tags parameter, fix the ensure_tags function, update to use compare_aws_tags func

fix tags type error per review

remove **kwargs use in create_subnet function per review

* rebased on #31870, fixed merge conflicts, and updated error messages

* fixes to pass tests

* add test for failure on invalid ipv6 block and update tags test for purge_tags=true function

* fix pylint issue

* fix exception handling error when run with python3

* add ipv6 tests and fix module code

* Add permissions to hacking/aws_config/testing_policies/ec2-policy.json for adding IPv6 cidr blocks to VPC and subnets

* fix type in tests and update assert conditional to check entire returned value

* add AWS_SESSION_TOKEN into environment for aws cli commands to work in CI

* remove key and value options from call to boto3_tag_list_to_ansible_dict

* remove wait loop and use boto3 EC2 waiter

* remove unused register: result vars

* revert az argument default value to original setting default=None
7 years ago
Brian Coca 23b1dbacaf
Config continued (#31024)
* included inventory and callback in new config

allow inventory to be configurable
updated connection options settings
also updated winrm to work with new configs
removed now obsolete set_host_overrides
added notes for future bcoca, current one is just punting, it's future's problem
updated docs per feedback
added remove group/host methods to inv data
moved fact cache from data to constructed
cleaner/better options
fix when vars are added
extended ignore list to config dicts
updated paramiko connection docs
removed options from base that paramiko already handles
left the look option as it is used by other plugin types
resolve delegation
updated cache doc options
fixed test_script
better fragment merge for options
fixed proxy command
restore ini for proxy
normalized options
moved pipelining to class
updates for host_key_checking
restructured mixins

* fix typo
7 years ago
Will Thames 46c4f6311a [cloud] Add retries/backoff to ec2_vpc_subnet module (#31870)
* Allow backoff for describe_subnets

Improve exception handling to latest standards

* Add integration test suite for ec2_vpc_subnet

* Add test for creating subnet without AZ

Fix bug identified by test

Fixes #31905
7 years ago
Will Thames 60b29cf57d [cloud] Follow up on FIXMEs in ec2_ami & ec2_ami tests (#32337)
* Several tests were marked as FIXME and should have been fixed with
the boto3 move.

* Improved tags output. Add purge_tags option (default: no)

* Allow description and tags update

* Return launch_permissions

* Allow empty launch permissions for image creation

* Empty launch permissions should work the same way for image
creation as no launch permissions

* Cope with ephemeral devices in AMI block device mapping

* Ephemeral devices can appear in AMI block devices, and this information should be returned

* Fix notation for creating sets from comprehensions
7 years ago
saichint aef50eaa40 Integration Tests only: nxos_udld, nxos_udld_interface, nxos_vxlan_vtep_vni (#29143)
* it cases for vxlan_vtep_vni, udld

* platform specific testing

* fix vxlan_vtep for n7k

* fix udld_intf setup

* skip udld tests on titanium n7k

* remove hardcoding

* fix udld tests for titanium
7 years ago
Ganesh Nalawade ba0aade8f4
Fix ios_config integration test failures (#32959) 7 years ago
Abhijeet Kasurde e61bcc3438
Provide clear error message after failure (#32928) 7 years ago
Abhijeet Kasurde 2d4c4e09db
Add vmware fact about 'Cores Per Socket' (#32881)
This fix adds new fact - 'Cores Per Socket' about vmware guest machine.
Also, adds integration test for this change.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Mike Wiebe 208208ab8f Fix nxos_snmp_host bug (#32916)
* Fix nxos_snmp_host bug

* Enable nxos_snmp_host tests
7 years ago
Tim Rupp 3f3c526026
Removes deprecated "append" param from snat pool (#32953)
This param was deprecated in 2.4 and slated for removal in 2.5. This
patch removes it.
7 years ago
Tim Rupp 0c1f493b6c
Adds module for managing bigip device connectivity (#32950)
This module is a critical part of the HA process for BIG-IPs.
7 years ago
Jordan Borean 1bc4940ee1
added powershell symlink util helper (#27153)
* Added symbolic link util for powershell

* updated module_util license to BSD
7 years ago
Jordan Borean e16e6313c7 windows: fix for checking locked system files (#30665)
* fix for checking locked system files

* moved functions to share module util and created tests

* fixed windows-paths test based on win_stat changes
7 years ago
Jordan Borean 5e20fd0943 removed psobject to hashtables that were missed (#32710)
* removed psobject to hashtables that were missed

* fix up win_region change
7 years ago
Matt Clay ef21038dd5 Fix ansible-test race calling get_coverage_path. 7 years ago
Dag Wieers 3089892e59 sl_vm: PEP8 compliancy and documentation changes (#32657)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Adrian Likins 86dc3c09ac
Fix vault --ask-vault-pass with no tty (#31493)
* Fix vault --ask-vault-pass with no tty

2.4.0 added a check for isatty() that would skip setting up interactive
vault password prompts if not running on a tty.

But... getpass.getpass() will fallback to reading from stdin if
it gets that far without a tty. Since 2.4.0 skipped the interactive
prompts / getpass.getpass() in that case, it would never get a chance
to fall back to stdin.

So if 'echo $VAULT_PASSWORD| ansible-playbook --ask-vault-pass site.yml'
was ran without a tty (ie, from a jenkins job or via the vagrant
ansible provisioner) the 2.4 behavior was different than 2.3. 2.4
would never read the password from stdin, resulting in a vault password
error like:

        ERROR! Attempting to decrypt but no vault secrets found

Fix is just to always call the interactive password prompts based
on getpass.getpass() on --ask-vault-pass or --vault-id @prompt and
let getpass sort it out.

* up test_prompt_no_tty to expect prompt with no tty

We do call the PromptSecret class if there is no tty, but
we are back to expecting it to read from stdin in that case.

* Fix logic for when to auto-prompt vault pass

If --ask-vault-pass is used, then pretty much always
prompt.

If it is not used, then prompt if there are no other
vault ids provided and 'auto_prompt==True'.

Fixes vagrant bug https://github.com/hashicorp/vagrant/issues/9033

Fixes #30993
7 years ago
Pavel c56dcb7afa module_utils: vmware.py. Incorrect chain of attributes to obtain snapshots from virtual machine (#32669)
* Update vmware.py
Incorrect chain of attributes to obtain snapshots from virtual machine. Module 'vmware_guest_facts' uses method 'gather_vm_facts' of vmware.py and always gets empty list of snapshots.
* Added test for module vmware_guest_facts. Checked VM snapshots.
* Fixed tests for vmware_guest_facts. Ignored certificate for vmware_guest_snapshot module.
7 years ago
Sebastiaan van Doesselaar 900abcddb3 Integrated publickey import and removal in iosxr_user (#32115)
* Integrated publickey import and removal in iosxr_user

* Fixed linting issues

* Added version added for publickeyfile option

* Added quotation marks to version, oops

* Added some integration tests, added some checks to prevent aggregate users with public keys.

* Added some integration test files

* Created mutually exclusive public_key and public_key_contents versions of config

* Modified tests to use both methods and test more logins

* Added supports for aggregates

* Incorporated provider auth

* Fixed some lint issues

* Fixed a YAML lint issue

* Implemented catches for unconfigured providers.

* Fixed catches, hopefully

* Another test

* Added groups support so you can add users to multiple groups

* Trailing whitespace
7 years ago
Prasad Katti 239464f804 ec2_key: add a test for the force option (#32748)
* ec2_key: test force option

* ec2_key: changes requested via review comments
7 years ago
Matt Clay 6472723ba8
Add missing ansible-test --remote-terminate support. (#32918)
* Expand ansible-test --remote-terminate support:

- windows-integration
- network-integration

These commands previously accepted the option, but did not support it.

* Terminate windows and network instances when done.
7 years ago
Gawain fa764f6918 New Module vmware_host_facts (#26492)
Add new module  vmware_host_facts ,it can get remote vmware host system info like setup module

* modify ansible version
* optimized output for human readable
* add serial number get_system_facts() add ansible_product_serial
* fix pep8 issue and ansible module required format
* Use find_obj method instead get_obj
* add ansible_hostname ansible_distribution_build
* add integration test
* vmware_host_facts integration test add verify
* fix yamllint issue
* fix boilerplate test
* Update vmware_host_facts.py
* fix RETURN key's name
7 years ago
Trishna Guha 3ee2501c83
multiple fixes nxos (#32903)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Anil Kumar Muraleedharan 177a4fb3ec Adding enos_command module and unit test (#32782)
* Adding git_command module and its UT file

* Changing Author Name and removing 2 blank lines

* Removing blank lines

* Adding enos_config and its UT files

* Removing config module as I am allowed to have only module per PR

* Work on Ganesh's Review comments

* John Review Comments on enos_command.py

* Review comments of John
7 years ago
Trishna Guha 11de330372
change inventory_hostname to ansible_host to fix test (#32890)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Trishna Guha c40de24e9c
fix mtu check nxos_interface (#32880)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Ganesh Nalawade c3636108bc
Change netconf port in testcase as per test enviornment (#32883) 7 years ago
Trishna Guha a17244f896
ios_vlan DI module (#32490)
* ios_vlan DI module

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* comment out testcases since the image is not available in dci

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* add aggregate test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Prasad Katti f891e92581 ec2_key: fix fingerprint generation in tests (#32817) 7 years ago
Sam Doran ea3638b580 Add proper check mode support to the script module (#31852)
* Do not run script in check mode

Fixes #30676

* Reformat script integration test

* Add integration tests for check mode of script module

* Fix name on test

* Cleanup temp file

* win_script integration test syntaxt changes

* Add check mode tests for win_script

* Use proper variable in test

* Fail if source file does not exist

* Verify script is accessible and don't copy in check mode

Use shlex to properly split shell arguments, though a path with spaces in it still needs to be quoted in the playbook.
Add note to docs describing such.
Improve error message if file is not found indicating there may be a space in the path.

* Properly encode path now that path is split using shlex

* Allow for spaces in both path and script name

* Add unicode character test to Linux script tests

* Add Linux test for space in path to script
7 years ago
Matt Martz 99d4f5bab4 Remove uses of assert in production code (#32079)
* Remove uses of assert in production code

* Fix assertion

* Add code smell test for assertions, currently limited to lib/ansible

* Fix assertion

* Add docs for no-assert

* Remove new assert from enos

* Fix assert in module_utils.connection
7 years ago
Kellin 464ded80f5 Add link dest to synchronize module (#32746)
* Clean up after two recent synchronize tests

- add clean up after the last two tests in synchronize to make them
  match with the expectations in the previous tests

Signed-off-by: Robert Marshall <rmarshall@redhat.com>

* Add link-dest functionality to synchronize module

- add the link-dest option to the synchronize module code
- add tests for the link-dest option
- add documentation of the link_dest option to synchronize
- modify changed flag so it can properly work around rsync
  upstream not flagging hardlinks as a change properly in
  formatted output

Signed-off-by: Robert Marshall <rmarshall@redhat.com>

* Minor change to test
7 years ago
Trishna Guha f49555d494
nxos_bgp_neighbor_af feature idea disable-peer-as-check (#32665)
* nxos_bgp_neighbor_af feature idea disable-peer-as-check

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add unit test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Trishna Guha e4052c1261
Add mtu option nxos_interface feature idea (#32680)
* Add mtu option nxos_interface feature idea

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add unit test for mtu feature

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Mike Wiebe de8d00b401 Fix snmp bugs on Nexus 3500 platform (#32773)
* Add n35 platform support

* Fix regex bug and add snmp_location it tests

* Enable nxos_snmp_location tests
7 years ago
Adrian Likins 9c58827410
Better handling of malformed vault data envelope (#32515)
* Better handling of malformed vault data envelope

If an embedded vaulted variable ('!vault' in yaml)
had an invalid format, it would eventually cause
an error for seemingly unrelated reasons.
"Invalid" meaning not valid hexlify (extra chars,
non-hex chars, etc).

For ex, if a host_vars file had invalid vault format
variables, on py2, it would cause an error like:

  'ansible.vars.hostvars.HostVars object' has no
  attribute u'broken.example.com'

Depending on where the invalid vault is, it could
also cause "VARIABLE IS NOT DEFINED!". The behavior
can also change if ansible-playbook is py2 or py3.

Root cause is errors from binascii.unhexlify() not
being handled consistently.

Fix is to add a AnsibleVaultFormatError exception and
raise it on any unhexlify() errors and to handle it
properly elsewhere.

Add a _unhexlify() that try/excepts around a binascii.unhexlify()
and raises an AnsibleVaultFormatError on invalid vault data.
This is so the same exception type is always raised for this
case. Previous it was different between py2 and py3.

binascii.unhexlify() raises a binascii.Error if the hexlified
blobs in a vault data blob are invalid.

On py2, binascii.Error is a subclass of Exception.
On py3, binascii.Error is a subclass of TypeError

When decrypting content of vault encrypted variables,
if a binascii.Error is raised it propagates up to
playbook.base.Base.post_validate(). post_validate()
handles exceptions for TypeErrors but not for
base Exception subclasses (like py2 binascii.Error).

* Add a display.warning on vault format errors
* Unit tests for _unhexlify, parse_vaulttext*
* Add intg test cases for invalid vault formats

Fixes #28038
7 years ago
Frederic Lepied 35f79370e1 mock ncclient import in test_connection.py (#32786) 7 years ago
Dario Zanzico 8a21fa2c07 remove cpuHotAddEnabled, memoryHotAddEnabled defaults from configSpec (#25202)
* add hardware.hotadd_cpu, hardware.hotadd_memory parameters
* use hotadd_{cpu,memory} paramters on create integration tests
7 years ago
Tim Rightnour 4756b392ea Apply fix to allow the root resource pool of a cluster to be chosen (#31641)
Whitespace cleanup
7 years ago
Jordan Borean abc4210a33 azure_rm_virtualmachine: add custom image support (#32367)
* azure_rm_virtualmachine: added support for specifying custom image

* Use separate parameter for custom_image, add very basic test

* missed the version_added tag for doco

* removed whitespace I accidentally left in

* merged custom image into the image dict and added more tests

* added one more test
7 years ago
John R Barker ff7c349f11
Provide details via DCI Env (#32770) 7 years ago
Nathaniel Case 9c0275a879
Connection plugins network_cli and netconf (#32521)
* implements jsonrpc message passing for ansible-connection

* implements more generic mechanism for persistent connections
* starts persistent connection in task_executor if enabled and supported
* supports using network_cli as top level connection plugin
* enhances logging for persistent connection to stdout

* Update action plugins

* Fix Python3 RPC

* Fix Junos bytes<-->str issues

* supports using netconf as top level connection plugin

* Error message when running netconf on an unsupported platform
* Update tests

* Fix `authorize: yes` for `connection: local`

* Handle potentially JSON data in terminal

* Add clarifying detail if possible on ConnectionError
7 years ago
John R Barker 897b31f249
Use same TEST seperater as Shippable (#32758) 7 years ago
Ganesh Nalawade 37b0537279
Fix ios_config file prompt issue (#32744)
Fixes #23263

Add a carriage return (\r) at end on copy config
command which results in prompt on cli terminal
7 years ago
Will Thames 316e7939d6 [cloud] Improve aws testing and use `{{ region }}` var (#26892)
* Protect AWS credentials from accidental commits

* Improve documentation for IAM policies

* Update ELB tests to be multi region

Allow AZs to reflect the region in which the tests are run.

This will not work for regions with fewer than three AZs,
but those are relatively rare
7 years ago
Abhijeet Kasurde dbadb5a014 Add details about snapshot in result (#32730)
This fix adds details about snapshots in result of
vmware_guest_snapshot, when operation is successful.

Fixes: #32154

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Jiri Tyr 1a3037ff63 Making options of type list (fixing #32704) (#32706) 7 years ago
Mike Wiebe fedd1779cc Add ISSU capability and fix workflow bug for nxos_install_os module (#32540)
* Initial issu support

* Enhance ISSU support

* Additional refactoring to simplify code flow

* Remove debugs and bug fixes

* Update doc example output

* Update provider line in task example

* Remove unneeded else clause and comments

* Fix ansible-doc errors

* Satisfy ansibot requirements

* Update header docs

* Update nxos_install_os.py
7 years ago
Brian Coca db749de5b8 namespace facts
updated action plugins to use new guranteed facts
updated tests to new data clean
added cases for ansible_local and some docstrings
7 years ago
cnasten f1fe467c22 nso_config module for setting configuration in Cisco NSO (#30973) 7 years ago
John R Barker 4443da2d79
Remove debug (#32736)
* Make script executable
* Tidy up comments
7 years ago
John R Barker 4464635787
Specify branch details, add verbose, disable colour (#32731) 7 years ago
Martin Krizek 356901b72d yum: case for multilib when installing from a file (#32236) 7 years ago
Martin Krizek 714598e91b
acl: do not remove all default entries (#32615) 7 years ago
Abhijeet Kasurde 39595771fa Integration test for git archive without update (#32390)
* Unit test for git archive without update

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Clean clone the repo first
7 years ago
Prasad Katti 306c3508b2 Deprecate ec2_ami_find (#32501) 7 years ago
Dag Wieers 59c30595c1
stacki_host: PEP8 compliancy and documentation changes (#32651)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Anil Kumar Muraleedharan 8e081b7e30 Moving modules from lenovo to cnos (#31401)
* Moving modules from lenovo to cnos

* Merge conflicts

* Update cnos_conditional_template.py

Removed
180:5: E265 block comment should start with '# '
188:34: E226 missing whitespace around arithmetic operator

* Update cnos_template.py

155:5: E265 block comment should start with '# '
162:34: E226 missing whitespace around arithmetic operator

* Update cnos_vlan.py

210:1: E302 expected 2 blank lines, found 1

* Update cnos_backup.py

Adding 
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_bgp.py

Added
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_backup.py

Added a line extra

* Update cnos_command.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_conditional_command.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_conditional_template.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_factory.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_facts.py

Adding 
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_image.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_interface.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_portchannel.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_reload.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_rollback.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_save.py

Add
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_showrun.py

Add
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_template.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_vlag.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_vlan.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_backup.py

Moving it to top of file

* Update cnos_backup.py

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Putting condition to bye pass paramiko

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

*  Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Removing unused import and white spaces

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Update cnos_template.py
7 years ago
Toshio Kuratomi 0b320ba15c Generate whitelist of current files using underscore variable and enable test 7 years ago
Evgeny Fedoruk 59b49329b1 Module for running templates and workflows on vDirect (#31243)
Modure for running configuration templates and workflows on Radware vDirect server
7 years ago
Evgeny Fedoruk a06f06a9a3 Module for committing pending configuration on Radware devices (#31776)
With this module, pending configurations can be commited
on Radware ADC devices.
7 years ago
Ganesh Nalawade 6aa95ce5fd
Fix ios and vyos net integration test issue (#32692) 7 years ago
Anil Kumar Muraleedharan 9d98452032 New enos_facts, + module_utils/enos.py. modifying copyright year in rest all (#31696)
* Squashing all commits to one as suggested by John

* Adding Unit test method for the module enos_facts.py

* Pep8 and Ylint issues addressed

* Trying again to remove blank line. Some scripts are required for this.

* Bug Fixing for interfaces

* Editing for over indenting issue

* E203 whitespace before ','

* Update enos.py

Added warnings argument as to check_args method

* Update enos_facts.py

Added warnings to check_args method
7 years ago
Dag Wieers c737e93a34 netscaler: PEP8 compliancy and documentation changes (#32653)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Dag Wieers 56eb997bae cs_nic: PEP8 compliancy and documentation changes (#32655)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Trishna Guha 5336d14d9d
fix eos_static_route test typo (#32661)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Dag Wieers 90b867b7a5 bigip_virtual_server: PEP8 compliancy and documentation fixes (#32652)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Dag Wieers 10bfa89f06 zfs: PEP8 compliancy and documentation changes (#32648)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Will Thames c93ddf5473 Move profile and region checking to module_utils.ec2 (#31921)
* Move profile and region checking to module_utils.ec2

Remove ProfileNotFound checking from individual modules

There are plenty of `if not region:` checks that could be removed,
once more thorough testing of this change has occured

The ec2_asg, iam_managed_policy and ec2_vpc_subnet_facts modules
would also benefit from this change but as they do not have tests
and are marked stableinterface, they do not get this change.
7 years ago
Dag Wieers 9d156c6cb1
docker: PEP8 compliancy and documentation changes (#32628)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Nikhil Kathole 585ecc2867 gce: PEP8 compliancy Fixes (#32311)
* gce: PEP8 compliancy Fixes

* Documentation updates

* Documentation updates

* Documentation update
7 years ago
Yadnyawalkya Tale d21a6aa147 Ansible system module: sanity pep8 fixes (#32314)
* Ansible system module: pep8 fixes

* Clean up documentation

* Blank line change not required by PEP8

* Update legacy-files.txt

* Documentation updates

* Update documentation

* Documentation update
7 years ago
Trishna Guha 48ab1a1334
eos_static_route DI module (#32587)
* eos_static_route DI module

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add net_static_route test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Validate ip address

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Satyajit Bulage 1857d11034 ovirt: PEP8 compliancy fixes (#32316)
* ovirt: PEP8 compliancy fixes
This PR includes:
- PEP8 compliancy fixes

Signed-off-by: Satyajit Bulage <sbulage@redhat.com>

* Improve documentation

* Update documentation

* Update documentation

* Update documentation

* Fix legacy-files.txt

* Update documentation

* Fix PEP8 issue

* Fix PEP8 issue

* Fix another PEP8 issue

* More typo fixes

* Yet another PEP8 typo
7 years ago
Yadnyawalkya Tale a2d34e914e PEP8 fixes: Ansible system module and playbook base.py (#32322)
* Ansible files module sanity pep8 fixes

* Ansible system module and playbook base.py

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Various changes

* Various changes

* Various changes

* Various changes

* Undo blank lines not required by sanity checks

* Various changes

* Various changes

* Various changes

* Various changes

* Various changes

* Undo blank line changes not required by sanity checks

* Various changes

* Various changes

* Various changes

* Various changes

* Various changes

* Missing piece after merge

* Blank lines

* Blank line

* Line too long

* Fix typo

* Unnecessary quotes

* Fix example error
7 years ago
paulquack a5da2e44a1 ironware_config module (#32187) 7 years ago
paulquack 806f43a9c0 ironware_facts module (#32186) 7 years ago
Ganesh Nalawade 6d1d06e0f7
Fix junos netconf port issue in integration test (#32610) 7 years ago
Tim Rupp 2bf6ac6c78
Adds bigip_device_trust module (#32608)
This module can be used to manage trusts between two bigip devices.
7 years ago
James Mighion 749197b436 Updating the options to allow decryption and new save_when. (#32602) 7 years ago
Philippe Dellaert 930fde5f70 vmware_dvs_portgroup: Add configuration of vlan trunk, security settings and port policies and integration tests (#32298)
* Add configuration of vlan trunk, security settings and port policies, and tests

This commit adds the following capabilities to the
vmware_dvs_portgroup module:
- Support for VLAN trunk portgroup
- Support for all security settings (promiscuous, forged transmits & mac
address changes)
- Support for all the port specific policies
- port specific policies match the vCenter UI behaviour (for instance:
block override is enabled by default)
- Cleanup and use of proper API entities not root entities
- Integration testing

* Cleanup of docs and adding more examples
7 years ago
Abhijeet Kasurde c11c882345 Update vmware integration tests (#31273)
* Boilerplat fixed
* Standardized vcsim variables in all modules

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Yadnyawalkya Tale fcab13a668 PEP8 fixes: Ansible source_control module (#32323)
* PEP8 fixes: Ansible source_control module

* Some more cleanup changes

* More cleanups

* Fix copyright statement
7 years ago
Jordan Borean 978a979566
win_dsc: improved parameter handling (#31556)
* win_dsc: improved parameter handling

* removed uneeded try/catch leftover from testing

* removed undeed return values

* added custom DSC to fully test out casting

* fix up codestyle issues

* using new Requires ps version check

* fixed up error message check on earlier ps version
7 years ago
Abhijeet Kasurde b5f1fc850b Allow user to specify maintenance DB (#32510)
This fix allows user to specify alternative maintenance DB
required for initial connection in Postgresql_db module.
Also, adds pep8 related fixes.

Fixes: #30017

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Dag Wieers 9a6615a905
Make newer stuff PEP8 compliant (#26951)
So we fixed everything that was not a module to be PEP8 compliant, and
in the meantime these 5 new files were additionally disabled from PEP8
testing.

This fixes it.

Also update Copyright/License statements.
7 years ago
Jordan Borean 15b492ca57 win_become: get admin token and fix async (#32485)
* win_become: make it easier to become with an admin token

* Fixed up pep8 whitespace

* fix for Server 2008

* Added support for async and become on newer hosts and fix warnings
7 years ago
John R Barker 6ce3972f21
Script to generate DCI Coverage (#32550) 7 years ago
Tim Rupp 06363f6ede
Removes bigip_snmp from skip file (#32530) 7 years ago
Tim Rupp 53940670fd
Removes bigip_qkview from skip file (#32529) 7 years ago
Tim Rupp 45787f6ef2
Removes bigip_provision from skip file (#32525) 7 years ago
Jordan Borean 5b1db00b65
win_service: quoted path fix (#32469)
* win_service: fix for path in quotes

* Added tests to verify behaviour doesn't regress
7 years ago
Brian Coca e582a69e9c
show specific undefined var errors on -v in debug (#32206)
* show specific undefined var errors on -v in debug

allows users to get more specific information about undefined errors
as they might be looking at a complex data structure and need to find
the specific leaf that has the issue

* now tests works at all verbosity levels

* updated to unicode objects
7 years ago
Tim Rupp 64871470e2
Removes bigip_pool from the skip file (#32516) 7 years ago
Tim Rupp ab71a9de14
Removes bigip_irule from the skip file (#32509) 7 years ago
Martin Krizek 7cf3811d29
acl: add integration tests (#32494) 7 years ago
Jonathan Nuñez 67b1d0f274 CloudFormation module: get StackEvents when ClientRequestToken is not used (#32434)
* When getting the stack events we need to consider the case where we don't have ClientRequestToken fixes #32396

* Adding tests for the case when the ClientRequestToken is not present in the stack creation.

* Renaming the stack that the test for Client Request Token requires so it won't cause collisions with the basic test.
7 years ago
Pilou 43914b3837 Fix include_role unit tests (#31920)
* Ensure include_role unit tests check something

This is not the case: get_tasks_vars doesn't yield

* Fix include_role unit tests

Since e609618274, include_role are not
static anymore.
7 years ago
Tim Rupp 6b6df43eae
Removes bigip_iapp_template from the skip file (#32488) 7 years ago
Ganesh Nalawade 6a0e8cae10
Fix net platform agnostic network module integration tests (#32489) 7 years ago
Tim Rupp 015baf5149
Removes bigip_iapp_service from skip list (#32482) 7 years ago
Tim Rupp 60281b85fe
Refactored bigip_device_dns (#32483)
Module was using old coding standards. This updates the module
7 years ago
Tim Rupp cbc5c2d556
Removes bigip_hostname from skip file (#32479) 7 years ago
Jordan Borean 9dc9313c65
win_package: add support for arguments as list (#32024)
* win_package: add support for arguments as list

* re-added failure tests as they were accidentally commented out

* changed exit_code in failure messages to rc
7 years ago
Jordan Borean 56a7278256
win_find: allow module to skip on files it fails to check (#32105)
* win_find: allow module to skip on files it fails to check

* fixed up test creation to work pre psv5
7 years ago
Prasad Katti 86141c3e03 [ec2_ami_facts] new boto3-based module as a replacement for ec2_ami_find (#32252)
* [ec2_ami_facts] new boto3-based module as a replacement for ec2_ami_find

- new boto3-based module to gather facts about ec2 images
- intended to replace ec2_ami_find which uses boto
- an ami find task (using new module) added to the ec2_ami integration test

* [ec2_ami_facts] Use AnsibleAWSModule. Catch BotoCoreError.

* add ec2_ami_facts alias to tests

* [ec2_ami_facts] return ami launch permissions as well
7 years ago
Tim Rupp d5d4683047
Removes bigip_snmp_trap from skip file (#32470) 7 years ago
Tim Rupp e3f1198a67
Removes bigip_ucs from skip file (#32462) 7 years ago
Abhijeet Kasurde 51c5b51ea3 Handle error message from psycopg2 using to_native (#32371)
This fix adds handling of error/exception message using
to_native API instead of decoding.
Also, fixes PEP8 errors.

Fixes: #31825

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Tim Rupp 27188d46a9
Adds bigip_iapplx_package module (#32456)
This module can be used to manage the iAppLX packages you have
installed on a device. It can install and remove packages in
their RPM format.
7 years ago
Tim Rupp c239749052
Removes bigip_user from skip file (#32451) 7 years ago
Tim Rupp 83674af284
Removes virtual_address from skip file (#32425) 7 years ago
Dave Thelen 2c99cbc874 eos_eapi: adding the desired state config to the new vrf fixes #32111 (#32112)
* adding the desired state config to the new vrf fixes #32111

* fix default vrf initial configured

* add unit test
7 years ago
Martin Krizek d1e55551e9
seboolean: add integration tests (#32438) 7 years ago
Ganesh Nalawade 26583adb58
Fix wrong prompt issue for network modules (#32426)
* Fix wrong prompt issue for network moodules

Fixes #31161
Fixes #32416

*  Store the device prompt in case of error
   from remote device
*  Check for prompt value in ios action plugin

* Add integration test
7 years ago
Sébastien DA ROCHA bc4ba6b638 Iptables unit tests (#30762)
* Add some tests for iptables

* Fix remove bug (calls 2 times check to remove a chain)

* Add me as maintainer

* Fix PEP8

* Doc: Give more information on issue #18988

* Fix #18988 and test it

* Fix doc (thanks Pillou)

* enable PEP8 check for iptables
7 years ago
Tim Rupp fc4580b4cc
Removes bigip ssl certificate from skip file (#32424) 7 years ago
Tim Rupp 6193d5bc65
Removes gtm wide ip from skip file (#32422) 7 years ago
Tim Rupp 8868b5fa85
Removes gtm pool from skip file (#32419) 7 years ago
Tim Rupp daaf8ca86c
Fixes skip imports for bigip_configsync_action module (#32413) 7 years ago
Dag Wieers 25bfea836d
Fix reference to EPEL packages, pleasing Shippable CI 7 years ago
Tim Rupp 8f2b243a3e
Fixes bigip_config to remove from skip file (#32409) 7 years ago
Tim Rupp 8c5cd9c530
Removes bigip_command from the skip file (#32407)
Includes fixes and enhancements to make it unnecessary to include this
module in the skip file
7 years ago
Tim Rupp 8037eb7474
Various fixes for bigip_remote_syslog (#32404)
This patch addresses a number of issues, large and small, that were
identified by users in the downstream repo.

* formatting of some code
* specific option combinations leading to errors
* missing includes for unit tests
7 years ago
Jim Gu d23da2e494 add support to vmware_guest for template => vm conversion (#31607)
* add support to vmware_guest for template => vm conversion

While the vmware_guest currently supports conversion of VMs to templates
using the is_template argument, it does not support the inverse:
converting templates back into VMs.  This change adds that
functionality.

When converting a template back into a VM, the extra config option
"uuid.action" is also set so that VMware will automatically create a new
UUID for the converted VM.  If the "uuid.action" setting is already
configured, it will not be modified.  Setting this prevents an
interactive question from being raised when attempting to boot the VM.

* Add integration tests for vmware_guest is_template

* Add additional idempotency test for vmware_guest is_template
7 years ago
Satyajit Bulage 52aa522c19 google: PEP8 compliancy fixes (#32309)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes

Signed-off-by: Satyajit Bulage <sbulage@redhat.com>
7 years ago
Ganesh Nalawade 5d1ed1fc25
Fix platform agnostic network integration test cases (#32378)
* Fix platform agnostic network test cases

* Fix vyos_interface CI failure
7 years ago
Paul Neumann 53fead7c96 ios_logging: Fix some smaller issues, add unit test (#32321)
* ios_logging: Fix typo in documentation

* ios_logging: Fix traceback when setting buffered destination without size

When the size parameter is not configured while configuring the buffered
destination, a traceback occurs due to the fact that validate_size expects the
parameter to be an int. Explicitely converting value to int makes the
check work for every case.

* ios_logging: Update size parameter documentation

Update the documentation of the size paramter to reflect the current behaviour
of setting a default of 4096 for the buffered dest.

* ios_logging: Add unit test

Add unit test for ios_logging testing the behaviour clarified in the previous
commits.

* ios_logging: Fix python 2.6 compliance
7 years ago
Matt Martz be9cc70b74 Fix patching to epel package 7 years ago
nilhase25 1a43038bc2 Pep8 aos login.py (#32312)
* fix pep8 issue in consul_kv.py

* fix pep8 issue in aos_login.py
7 years ago
Tim Rightnour f7f262adc7 Add the ability to rename a snapshot, or change it's description. (#31441)
Also add tests for vmware_guest_snapshot, but disable them due to
vcsim not fully supporting such operations yet.

Implement changes suggested in review.  Also fix same in remove_or_revert_snapshot() for consistency
7 years ago
nilhase25 9cff2c376b fix pep8 issue in consul_kv.py (#32310) 7 years ago
Dag Wieers 005c1ce7ba
Sort the PEP8 legacy files (#32339) 7 years ago
Ken Evensen 8724ff3eae pamd: fix issue with trailing commas in module_arguments 7 years ago
Willem van Ketwich 310eb833a4 EC2 AMI boto3 modifications (#28506)
Migrate ec2_ami module to boto3
7 years ago
Dag Wieers 16bbc19674
subversion: PEP8 compliancy and doc fixes (#30909)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 86bb82a220
user: PEP8 compliancy and doc fixes (#30895)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 63edeb1644
systemd: PEP8 compliancy and doc fixes (#30892)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 8b2bf09c49
service: PEP8 compliancy and doc fixes (#30890)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers edc0ff481c
seboolean: PEP8 compliancy and doc fixes (#30888)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 32775b0caa
hostname: PEP8 compliancy and doc fixes (#30886)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 3ae42afbc7
getent: PEP8 compliancy and doc fixes (#30885)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 11f8d9659d
at: PEP8 compliancy and doc fixes (#30881)
This PR includes:
- PEP8 compliancy fixes
- Documentation changes
7 years ago
Dag Wieers c46401e41f
tempfile: PEP8 compliancy, pylint and docs (#30859)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
7 years ago
Dag Wieers f64a8f58a3
synchronize: PEP8 compliancy, pylint and docs (#30858)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
7 years ago
Dag Wieers 19c3c7fe44
blockinfile: PEP8 compliancy, pylint and docs (#30845)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
7 years ago
Dag Wieers fb18e27d87
assemble: PEP8 compliancy, pylint and docs (#30844)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
7 years ago
Dag Wieers 0129b96065
archive: PEP8 compliancy, pylint and docs (#30842)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
7 years ago
Aniket Khisti 27694f6909 PEP8 compliancy for os_server_volume module (#32306) 7 years ago
Paul Neumann 87f663b950 ios_system: Fix typo in unit test (#32284) 7 years ago
Tim Rupp 2a5f6c28cf
Adds bigip_asm_policy module (#32281)
This module can be used to import asm policies from file or existing
template. Supported file types are xml, compact xml, and binary
7 years ago
Trishna Guha 9712761367
testfix: IP address based on dci (#32279)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Tim Rupp a16db95ddb
Adds the bigip_ssl_key module (#32270)
This module's purpose is to specifically manage the ssl keys. It
is essentially the key component of the bigip_ssl_certificate module.
The modules were separated and the key portion deprecated from
bigip_ssl_certificate in favor of this module.
7 years ago
Ricardo Carrillo Cruz be821845e2 Fix eos_user tests (#32261) 7 years ago
Ricardo Carrillo Cruz 63a0083cf1 Fix rest of ios_interface issues (#32257) 7 years ago
Ricardo Carrillo Cruz 4b35793f62 Fix lookup source tests on ios_system (#32254)
In IOS-XE, you need to pass an interface to lookup-source, otherwise
it fails with bad syntax.
7 years ago
Ricardo Carrillo Cruz cd76e987f3 Change MTU values on ios_interface tests (#32251)
If setting 1500, we don't have 1500 in config as that's default value.
That causes issues on asserts.
7 years ago
Ricardo Carrillo Cruz 747bea9a27 Enable authorize on disabling auto neg task (#32243) 7 years ago
Ricardo Carrillo Cruz 3d59eada20 Disable auto neg on test interfaces on IOS-XE (#32241)
As by default they are set on auto, test setting the speed on them
fail, we need to disable it upfront.
7 years ago
Kedar K 2aae66fa07 Fixes ios_logging unit test (#32240) 7 years ago
Ricardo Carrillo Cruz 9752ce368d Remove ip nameservers on ios_system/set_name_servers teardown (#32239)
Not sure why lookup source-interface, the only thing tested on that
file is adding/removing name servers, no lookup is set.
7 years ago
Trishna Guha a5f6c726f0 Add vyos_vlan DI module (#32072)
* Add vyos_vlan DI module

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add integration tests

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Improve logic and add more test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* update boilerplate

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Toshio Kuratomi 638de22b35 Update tests for required_if changes
These tests are doing string matches on the error condition.  Update
them to match the new strings.  This is probably okay to push out to old
releases even though it's technically backwards incompatible because
production playbooks won't be checking that a parameter was missing.
Param missing is something detected and fixed while writing the playbook.
7 years ago
Sloane Hertel c714da7fac cloudformation_facts: don't fail on nonexistent stack - fixes #23419 (#23758)
* Allow cloudformation_facts to exit gracefully if stack does not exist

make cloudformation_facts pep8

remove from legacy files

remove unnecessary if statement

Allow cloudformation_facts to exit gracefully if stack does not exist version 2

fix documentation errors

add an example for a hard-fail if a stack doesn't exist

* Remove extra whitespace

* Use the .response attribute since .message isn't present with Python 3

* Don't fail if no stack name is provided and no stacks exist.
7 years ago
saichint c822292347 Integration Tests only: add static route, snmp_user, snapshot and hsrp it cases (#28933)
* add static route and hsrp it cases

* add snmp_user and snapshot it

* password strength correction

* fix typo

* add compare snapshot as it is fixed in the code now

* skip snapshot tests for titanium

* titanium and nxapi conditions added
7 years ago
Ryan Brown 838c1ba6c7 [cloud] Bugfix for aws_s3 empty directory creation (#32169)
* [cloud] Bugfix for aws_s3 empty directory creation

* Update integration tests
7 years ago
Ricardo Carrillo Cruz 3d09c4bb4f Remove bogus interface description (#32183)
The interface has already that description from a task earlier, thus that change
is not introduced susbequently and we don't have to assert for it.
7 years ago
Ricardo Carrillo Cruz b2dd5466ac Use sane mtu values on ios_interface tests (#32180)
Anything lower than 1500 won't work on CSR nodes.
7 years ago
Ricardo Carrillo Cruz c07b30951f Remove duplex option on ios_interface (#32178)
Turns out on devices where only Gigabit is available (like our
csr nodes in CI), duplex is not configurable, thus the test fail.
Removing, since we are testing modification of other properties like
description and mtu and have good coverage.
7 years ago
Matt Clay cf1337ca9a Update ansible-test sanity command. (#31958)
* Use correct pip version in ansible-test.
* Add git fallback for validate-modules.
* Run sanity tests in a docker container.
* Use correct python version for sanity tests.
* Pin docker completion images and add default.
* Split pylint execution into multiple contexts.
* Only test .py files in use-argspec-type-path test.
* Accept identical python interpeter name or binary.
* Switch cloud tests to default container.
* Remove unused extras from pip install.
* Filter out empty pip commands.
* Don't force running of pip list.
* Support delegation for windows and network tests.
* Fix ansible-test python version usage.
* Fix ansible-test python version skipping.
* Use absolute path for log in ansible-test.
* Run vyos_command test on python 3.
* Fix windows/network instance persistence.
* Add `test/cache` dir to classification.
* Enable more python versions for network tests.
* Fix cs_router test.
7 years ago
Dave Thelen 602a618e60 eos_user: sends user secret first on user creation fixes #31680 (#32162)
* fix command order

* add integration test

* test cleanup

* remove redudant commands
7 years ago
Tim Rupp cc4bbb2929 Various bigip_pool fixes (#32161)
* corrects copyrights and mocks in unit tests
* fixes module code to include code to cleanup tokens
7 years ago
Daniel Shepherd 8aeb239f73 [cloud] Update ec2_vpc_net_facts to use Boto3 (#25375)
* update ec2_vpc_net_facts module to boto3

updated with RETURN values and other requested changes

removed errant extra blank line

another errant extra line removed...auto-linter not working apparently

updates per review

fix typo in RETURN docs

* fix trailing whitespace issue
7 years ago
Ricardo Carrillo Cruz 7938e9f73e Set speed to 1000 on ios_interface tests (#32153)
csr and ios have only 1000 as value in common, using 10 or 100 will
cause CI failures.
7 years ago
rahushen ab84718a01 NXOS: Integration tests to Ansible (part 3) (#29030)
* Add nxos_file_copy IT

* Restructure nxos_igmp tests

* add nxos_igmp_interface IT

* add nxos_igmp_snooping IT

* add nxos_ntp_auth IT

* Add nxos_ntp_options IT

* update nxos.yaml with new tests

* update nxos_ntp_options test

* update nxos_ntp_auth IT
7 years ago
Ricardo Carrillo Cruz 2d766fd31a Discover ios_interface interface on basic tests (#32149)
We run these tests on IOS and IOS-XE, which have different interfaces
available for performing tests.
7 years ago
Ricardo Carrillo Cruz ca115b0a8e Fix quotes on ios_ping test (#32131) 7 years ago
Ricardo Carrillo Cruz d686c3b4d4 Set authorize yes on IOS interface discovery tests (#32128) 7 years ago
Ricardo Carrillo Cruz dc0aa75029 Introspect platform before running ios tests (#32125)
In some IOS tests, we can't just assume a certain interface, as
we test on IOS and IOS-XE and in our CI they scheme numbering is
different.
Introspect version on the tests where needed.
7 years ago
Ricardo Carrillo Cruz a9d8157e81 Replace Gigabit0/0/0/2 for Gigabit0/0/0/1 on iosxr_interface.intent (#32120) 7 years ago
Ricardo Carrillo Cruz 3f86cfac1f Default ansible_ssh_port to 22 on ios_user tests (#32118)
The csr nodes do not have ansible_ssh_port on group_vars, as it uses
standard 22 port, therefore default to it on tests needing it.
7 years ago
Ricardo Carrillo Cruz 676d446cfc Add ansible_ssh_port to iosxr_user auth tests (#32117)
The CI nodes listen on port 8022, we need to plumb that to avoid
test failures.
7 years ago
Ricardo Carrillo Cruz f079a33563 Replace GigabitEthernet0/0/0/5 for GigabitEthernet0/0/0/2 in iosxr_interface intent tests (#32116)
There's no 5 interface present in CI nodes.
7 years ago
Sloane Hertel 1dd55acbc2 ec2_group: add rule description support - fixes #29040 (#30273)
* ec2_group: add support for rule descriptions.

* Document rule description feature and add an example using it.

* Fix removing rule descriptions.

* Add integration tests to verify adding/modifying/removing rule descriptions works as expected.

* Add permissions to hacking/aws_config/testing_policies/ec2-policy.json for updating ingress and egress rule descriptions.

* ec2_group: add backwards compatibility with older versions of botocore for rule descriptions.

* Add compatibility with older version of botocore for ec2_group integration tests.

* ec2_group: move HAS_RULE_DESCRIPTION to be checked first.

* Make requested change

* Pass around a variable instead of client

* Make sure has_rule_description defaults to None

* Fail if rule_desc is in any ingress/egress rules and the the botocore version < 1.7.2

* Remove unnecessary variable

* Fix indentation for changed=True when updating rule descriptions.

* minor refactor to remove duplicate code

* add missing parameter

* Fix pep8

* Update test policy.
7 years ago
Matt Clay 5663d11b94 Add missing packages to default docker image. 7 years ago
Prasad Katti 8a9a9b84dd [ec2-ami] Use required_if with state parameter (#32009)
* [ec2-ami] Use required_if with state parameter

* Update failure msg on delete ami with no image_id task in integration test
7 years ago
Martin Krizek ee6ba5d590 yum: allow for downgrade using rpm file (#31647) 7 years ago
Kedar K e2bed36d12 - Adds iosxr_netconf module to configure netconf service on IOSXR (#31715)
* - Adds iosxr_netconf module to configure netcong service on Cisco
  IOS-XR devices

* - Adds Integration test for module
- Handles diff return from load_config

* - Adds unit test for iosxr_netconf module
7 years ago
Jordan Borean b004a6373a windows: add #AnsibleRequires for Windows modules (#31683)
* windows: add #AnsibleRequires to set whether a module requires module or a specific version

* fix up pep8 issues

* changed psversion to use the actual ps Requires -Version syntax

* missed the check on #Requires -Version

* fix #Requires module extensions
7 years ago
Matt Davis 0c34cdd0f7 fix #Requires to be valid in real Powershell (#31858)
* module_utils #Requires should not have .psm1 extension if "real" Powershell will ever execute them
* updated validate-modules to enforce this
* added check to disallow multi-module syntax on Ansible.ModuleUtils #Requires
7 years ago
Ryan Brown 11c225e039 Start using ClientRequestTokens in event lists (#31997)
* Start using ClientRequestTokens in event lists

* Include request token in all reqs that support it (basically all but check mode/changeset)

* Update placebo recordings

* Add comments for CRQ popping
7 years ago
Kedar K 465fe5802b -Fixes JSON parsing(use JSON object instead of string) for facts modules. (#31818) 7 years ago
Jordan Borean 8e44cd5d10 win_command win_shell: add stdin option (#31619) 7 years ago
Jordan Borean b663f602bc windows argv to string module utility (#28970)
* windows argv to string module utility

* rebased PR with latest devel branch
7 years ago
Tim Rupp 965e4151df Adds the bigip_policy module (#31915)
this module allows one to manage policies and re-order their
corresponding rules
7 years ago
Tim Rupp 8085c38e05 Refactors the bigip_gtm_facts module (#31917)
Includes pep fixes and inlining code with current conventions
7 years ago
Matt Clay 36b13e3e3d Fix ansible-test default image. (#31966)
* Add openssh-client to default docker container.
* Include Azure requirements in default container.

To do so, handling of pip requirements was updated to install each
set of requirements separately and then run a verification pass to
make sure there are no conflicts between requirements.

* Add missing --docker-no-pull option.
* Add documentation for the azure-requirements test.
7 years ago
Will Thames 0c10e1ebe4 Handle timezone updates on Ubuntu 16.04+ on containers (#27546)
* Handle timezone updates on Ubuntu 16.04+ on containers

Although Ubuntu 16.04 will use timedatectl by default,
containers without a working timedatectl need to use the
old method.

A bug in Ubuntu for the old method means having to write
a nasty hack

https://bugs.launchpad.net/ubuntu/+source/tzdata/+bug/1554806

* Add tests for timezones

Ensure timezone changes work across various OSs
7 years ago
nwsparks 5cccad8ed4 new windows module, win_audit_rule (#30473)
* added win_audit_rule with integration test

* Updated integration testing to target files as well as directories
and registry keys. Split testing files apart to be more organized.

Updated powershell for better handling when targetting file objects
and optimized a bit. Removed duplicated sections that got there from a
previous merge I think.

* Decided to make all the fact names the same in integration testing.
Seemed like there would be less change of accidentally using the wrong
variable when copy/pasting that way, and not much upside to having
unique names.

Did final cleanup and fixed a few errors in the integration testing.

* Fixed a bug where results was displaying a wrong value

Fixed a bug where removal was failing if multiple rules existed due to
inheritance from higher level objects.

* Resolved issue with unhandled error when used didn't have permissions
for get-acl.

Changed from setauditrule to addauditrule, see comment in script for reasoning.

Fixed state absent to be able to remove multiple entries if they exist.

* fixed docs issue

* updated to fail if invalid inheritance_rule when defining a file rather than warn
7 years ago
Matt Clay 3c271e6bf6 Remove unsupported comments from aliases. 7 years ago
Matt Clay f76afab6e5 Add new default Docker container for ansible-test. (#31944)
* Add new default Docker container for ansible-test.
* Update ansible-test change classification.
* Update list of disabled pylint rules.
* Fix pylint issues with ansible-test.
7 years ago
Matt Clay eb899c9bcd Fix docker_secret integration test dependencies. 7 years ago
Tim Rupp f94d337ef6 Adds new module allowing you to wait for a bigip (#31846)
Module allows you to wait for a bigip device to be
"ready" for configuration. This module will wait for things like
the device coming online as well as the REST API and MCPD being
ready.

If all of the above is not online and ready, then no configuration
will be able to be made.
7 years ago
Marek Nogacki b9223cdc89 ec2_group: do not fail on description mismatch (#31704) (#31734)
* ec2_group: do not fail on description mismatch (#31704)

* ec2_group: do not fail on description mismatch (#31704) - fix test case
7 years ago
jctanner 6bf0cc36a7 Bump the vcsim container version (#31861) 7 years ago
Martin Krizek e2fc61c554 Add yum integration tests using fake repo (#31646) 7 years ago
Matt Clay 7623c2fbda Disable flakey win_rabbitmq_plugin test. 7 years ago
Jordan Borean 743ff4897a win_regedit: added function to load a dat file for editing (#31289)
* win_regedit: added function to load a dat file for editing

* try to make the tests more resiliant

* more stability changes
7 years ago
Matt Clay 6c3339402a Improve python 2/3 ABC fallback for pylint. (#31848)
* Improve python 2/3 ABC fallback for pylint.
* Allow longer method names in ansible-test.
7 years ago
Matt Clay 264452e0a8 Fix bad syntax in test_infra integration test. 7 years ago
paulquack 5a6ee054c0 Network command module for Brocade IronWare routers (#31429) 7 years ago
Jordan Borean 888de842b3 win_regedit: fix extra info coming into stdout (#31813) 7 years ago
James Tanner cc287daa3b Enable tracing and log collection in the vcsim container 7 years ago
James Tanner e5eedfe4b8 Allow the user to declare an env var to set the vcsim container image 7 years ago
Chris Meyers cf938e9992 tests for InventoryModule error conditions (#31381)
* tests for InventoryModule error conditions

* modified unicode in tests to ahear to Ansible best practices

* flake8 fixes
7 years ago
Matt Clay f012c94fa5 Handle bad options syntax in validate-modules. 7 years ago
Eike Frost 1b71fb0499 fix legacy PEP8 violations in zabbix modules, remove test exception for them (#31702)
* fix legacy PEP8 violations in zabbix_*, remove test exception for them

* fix new pep8 violations for zabbix_maintenance.py
7 years ago
Brian Coca 01b6c7c9c6 better cleanup on task results display (#27175)
* 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
7 years ago
Tim Rupp 02cd881697 Refactors bigip_selfip (#31732)
In this refactor we moved to the most recent coding standards for
both F5 and Ansible. Many bugs were fixed and some features were
also added (such as ipv6 support).
7 years ago
Tim Rupp 0610f09dab Adds various provision fixes (#31731)
* vcmp provisioning support
* documentation fixes
* fixes for python3 causing an exception
7 years ago
Tim Rupp 53445ded84 Fixes documentation related bugs (#31730)
New conventions for ansible warrant fixes to accomodate those
in bigip_partition.

This patch also includes an import fix that can raise an error when
Ansible unit tests run
7 years ago
Tim Rupp a969a529ab Fixes various gtm pool issues (#31728)
Various formatting related fixes. Also fixed an idempotency problem
with the 'disabled' state
7 years ago
Brian Coca 386515281e additional configmanager tests
left placeholders for more
7 years ago
René Moser 8b8d5aaca7 cs_instance: remove CloudStackException dep (#31724)
- fixes dep
- fix docs
7 years ago
Adrian Likins 297dfb1d50 Vault secrets script client inc new 'keyring' client (#27669)
This adds a new type of vault-password script  (a 'client') that takes advantage of and enhances the 
multiple vault password support.

If a vault password script basename ends with the name '-client', consider it a vault password script client. 

A vault password script 'client' just means that the script will take a '--vault-id' command line arg.

The previous vault password script (as invoked by --vault-password-file pointing to an executable) takes
no args and returns the password on stdout. But it doesnt know anything about --vault-id or multiple vault
passwords.

The new 'protocol' of the vault password script takes a cli arg ('--vault-id') so that it can lookup that specific
vault-id and return it's password.

Since existing vault password scripts don't know the new 'protocol', a way to distinguish password scripts
that do understand the protocol was needed.  The convention now is to consider password scripts that are
named like 'something-client.py' (and executable) to be vault password client scripts.

The new client scripts get invoked with the '--vault-id' they were requested for. An example:

     ansible-playbook --vault-id my_vault_id@contrib/vault/vault-keyring-client.py some_playbook.yml

That will cause the 'contrib/vault/vault-keyring-client.py' script to be invoked as:

     contrib/vault/vault-keyring-client.py --vault-id my_vault_id

The previous vault-keyring.py password script was extended to become vault-keyring-client.py. It uses
the python 'keyring' module to request secrets from various backends. The plain 'vault-keyring.py' script
would determine which key id and keyring name to use based on values that had to be set in ansible.cfg.
So it was also limited to one keyring name.

The new vault-keyring-client.py will request the secret for the vault id provided via the '--vault-id' option.
The script can be used without config and can be used for multiple keyring ids (and keyrings).

On success, a vault password client script will print the password to stdout and exit with a return code of 0.
If the 'client' script can't find a secret for the --vault-id, the script will exit with return code of 2 and print an error to stderr.
7 years ago
Tim Rupp ecee475a3a This patch fixes a number of outstanding bugs and code convention problems. (#31618)
* documentation was not inline with other Ansible modules
* Python 3 specific imports were missing
* monitor_type is no longer required when creating a new pool; it is now the default.
* A new monitor_type choice of "single" was added for a more intuitive way to specify "a single monitor". It uses "and_list" underneath, but provides additional checks to ensure that you are specifying only a single monitor.
* host and port arguments have been deprecated for now. Please use bigip_pool_member instead.
* 'partition' field was missing from documentation.
* A note that "python 2.7 or greater is required" has been added for those who were not aware that this applies for ALL F5 modules.
* Unit tests were fixed to support the above module
7 years ago
Abhijeet Kasurde a047fe0e4c Correct usage for shutil.rmtree (#31541)
* 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
7 years ago
Lujeni 91ab88dac7 pip: Use chdir directive in the venv path (fixes #25122) (#26865) 7 years ago
Tim Rupp 381b18fd80 Adds a refactored bigip_monitor_http module. (#30998)
This patch refactors the bigip_monitor_http module to use REST
instead of SOAP. It additionally adds unit tests and current F5
code conventions.

Integration tests can be found here
* https://github.com/F5Networks/f5-ansible/blob/devel/test/integration/bigip_monitor_http.yaml
* https://github.com/F5Networks/f5-ansible/tree/devel/test/integration/targets/bigip_monitor_http/tasks
7 years ago
Brian Coca 12c8dd1893 config tests
also a couple of fixes to manager
7 years ago
Matt Clay 80b0e0e05a Remove cryptography version limit in Azure tests.
No longer needed now that cryptography 2.1.1 has been released.
7 years ago
James Mighion 50052b3d70 Adding a cli transport option for the bigip_command module. (#30391)
* Adding a cli transport option for the bigip_command module.

* Fixing keyerror when using other f5 modules. Adding version_added for new option in bigip_command.

* Removing local connection check because the F5 tasks can be delegated to any host that has the libraries for REST.

* Using the network_common load_provider.

* Adding unit test to cover cli transport and updating previous unit test to ensure cli was not called.
7 years ago
Pilou 840a57a4ed s3_sync: fix broken import (#31460) 7 years ago
jctanner c05a7add5f Only install pyvmomi if user is root (#31628) 7 years ago
Matt Clay 05ec376197 Multiple Parallels host support for ansible-test. (#31552) 7 years ago
Matt Clay 03e18aa52e Remove cryptography install from CI other test. 7 years ago
Abhijeet Kasurde 9d811a34c4 pep8 fixes for vmware modules (#31537)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Trishna Guha e7145e249f fix ios_interface test unsupported param (#31622)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
René Moser 540d53327d cs_instance_facts: fix pep8 (#31606) 7 years ago
Matt Clay 8acb901bf2 Update Azure tests to limit cryptography version. (#31616)
* Revert "Work around cryptography 2.1 requiring pip 8.1.2+"

This reverts commit a10a80b8a3.

* Update Azure tests to limit cryptography version.
7 years ago
Toshio Kuratomi f38b8d9997 Remove boundary_meter module as the hosted service it configured has been removed. (#31506)
References #29387
7 years ago
René Moser e872763877 cs_portforward: remove CloudStackException dep (#31610)
- fixes pep8
- fixes doc
7 years ago
René Moser c1121dd5fb cs_securitygroup_rule: remove CloudStackException dependency (#31603)
- fixes pep8
- fixes docs
7 years ago
René Moser af6e89fbc8 cs_securitygroup: remove CloudStackException dep (#31597)
- fixes pep8
- fixes docs
7 years ago
Rene Moser 0c416b5891 tests: cs_snapshot_policy: add integration tests 7 years ago
Rene Moser d6e1f02990 cs_snapshot_policy: remove CloudStackException dependency 7 years ago
Philippe Dellaert 9580a6569e Fix #21112 : Adding support for configuring a CD-rom iso image (#28155)
* Initial CD-ROM support

* create cdrom bugfix

* Improving CDROM change detection and fixing template creation bug
Running MarkAsTemplate on an existing template will fail with an error

* Better change detection for guest ID
Should only mark a change in case it actually changes

* Adding integration tests

* Pep8 compliance fixes

* Adding CDROM support, including iso, client and none types

* Updating added release version for CDROM option
7 years ago
rahushen c976ac7ed6 change ports to non well known ports and drop time_range for N1 (#31261) 7 years ago
Ricardo Carrillo Cruz 7acb0bb187 Parameterize the ssh port on ios_user tests (#31573)
On CI we use 8022 for SSH, thus we need to explicitly pass
ansible_ssh_port to the ssh command to work.
7 years ago
Ricardo Carrillo Cruz ac95ecaf13 Remove duped authorize on ios_ping anchored tasks (#31572)
Otherwise, we get warnings.
7 years ago
Ricardo Carrillo Cruz c75c4cbfc8 Introspect the management IP on ios_ping (#31571)
On our CI we don't have external connectivity, so let's ping to
the management interface IP.
Also, ignore errors on the expected failures tests.
7 years ago
Ganesh Nalawade 88da95bb77 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
7 years ago
Toshio Kuratomi dde2c96d67 Try to cleanup after the rpm_key test 7 years ago
Brian Coca d84df2405d move from with_<lookup>: to loop:
- old functionality is still available direct lookup use, the following are equivalent

  with_nested: [[1,2,3], ['a','b','c']]

  loop: "{{lookup('nested', [1,2,3], ['a','b','c'])}}"

- avoid squashing with 'loop:'
- fixed test to use new intenal attributes
- removed most of 'lookup docs' as these now reside in the plugins
7 years ago
Ricardo Carrillo Cruz bd17edd5ed Run neighbors intent tests for ios_interface only if show lldp contains netdev (#31539) 7 years ago
Sam Doran 2610b521bc Remove sysctl entries when state=absent (#31486)
* Remove sysctl entry when state=absent
* Cleanup sysctl integration test syntax
* Correct grammar on error message
* Add sysctl integration test for state=absent
7 years ago
Lukas Bednar 5ccc1072ea [rpm_key] Fix to import first key on the system (#31514)
* [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
7 years ago
Artem Zinenko 2b63ae61f2 minor updates + tests to win_firewall_rule as per jborean93 review (#29148)
* Added warning for 'force' option

* Changed 'profiles' type to list

* Changed 'interfacetypes' type to list

* Added deprecation warning and fixed doc

* updated force parameter
7 years ago
Toshio Kuratomi b454115e9f Update test cases
* Remove cloudstack, f5, and nxos from the wildcard import whitelist
* Remove nxos and f5 from the get_exception whitelist
* Remove some files from the pep8 legacy whitelist
7 years ago
Toshio Kuratomi 2db9b6d2ca Remove wildcard import in test_nclu 7 years ago
Toshio Kuratomi c81314dcb9 Add a hack to test whether type=path should be used in a module 7 years ago
Jordan Borean 82fa922491 win_become: Added support to become a service user (#30407)
* win_become: Added support to become a service user

* fixes for linting

* changes to get local and network service working

* fixed linting issues again

* pleasing pepe
7 years ago
Jordan Borean 665d838fc2 added optional environment passthrough for MacOS 10.13 compatibility (#31500) 7 years ago
Jordan Borean f2bc89a880 win_copy: added decrypt option (#31291) 7 years ago
Tim Rupp 75c5d0fedc Adds the bigip_remote_syslog module
This patchs add a remote-syslog module that can be used by people
to manage their (basic, not HSL) syslog configuration
7 years ago
Pilou 1c9bffe248 pip module: fix TypeError (#31395)
* pip: add test: an error occurs when pip not found
* pip: fix TypeError exception when pip executable isn't found
7 years ago
Toshio Kuratomi 5e9384300d Add boilerplate and remove wildcard imports for openstack modules (#31461)
* Add boilerplate and remove wildcard imports for openstack modules
* Remove openstack files that are now pep8 compliant from the legacy list
7 years ago
Sofiane Medjkoune ef72eda172 Adding doc for the description argument of lxd_profile module 7 years ago
Toshio Kuratomi 9c81257ce3 Remove wildcard imports from amazon modules (#31451)
* Remove wildcard imports from amazon modules
* Remove files from legacy pep8 that now pass
7 years ago
Pilou 870974e0be ec2_vpc_route_table: fix broken import (#31459) 7 years ago
Pilou 0be8ac6797 ec2_vpc_igw: fix broken import (#31458) 7 years ago
Dag Wieers ae5d8e5ebb modprobe: PEP8 compliancy and doc fixes (#31255)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
- Make module a bit more consistent with existing practices
7 years ago
Jordan Borean c4b51009f0 win_copy: allow src to have invalid windows chars (#31392)
* win_copy: allow src to have invalid windows chars

* create file with colon instead of avoid checkout errors
7 years ago
Michael Vermaes fad3a4dc83 Fix typo in vault decrypt error message (#31335) 7 years ago
Martin Krizek 08bffbcbaa yum: add integration tests for installing from URL (#30616) 7 years ago
Sam Doran e7902d888c Make ansible_selinux facts a consistent type (#31065)
* Make ansible_selinux facts a consistent type

Rather than returning a bool if the Python library is missing, return a dict with one key containing a message explaining there is no way to tell the status of SELinux on the system becasue the Python library is not present.

* Fix unit test
7 years ago
Martin Krizek 488534b906 yum: add integration test for incompatible arch rpm (#31185) 7 years ago
Matt Clay a333f2e5b0 Fix ansible-test config management. 7 years ago
Tim Rupp 3717ff64cf Adds the bigip_monitor_https module (#31205)
This patch adds the https_monitor module which allows people
to create and manage HTTPS monitors.
7 years ago
Stephen 9c6ad3d076 Add update_only parameter for yum module (#22206)
* Add update_only parameter for yum module

When using latest, `update_only: yes` will ensure that only existing
packages are updated and no additional packages are installed.

* Update yum.py

Update version added for `update_only` parameter to 2.5

* add unit tests for update_only flag in yum module
7 years ago
Sam Doran 00df1fda10 Correctly write SELinux config file (#31251)
* Add new lines to end of config file lines

* Properly write out selinux config file

Change module behavior to not always report a change but warn if a reboot is needed and return reboot_required.

Improve the output messages.

Add strip parameter to get_file_lines utility to help with parsing the selinux config file.

* Add return documentation

* Add integration tests for selinux module

* Use consistent capitalization for SELinux

* Use atomic_move in selinux module

* Don't copy the config file initially

There's no need to make a copy just for reading.

* Put message after set_config_policy in case the change fails

* Add aliases to selinux tests
7 years ago
Jordan Borean e61c2799ff win_become: move error handling to Ansible outside of shell (#31227)
* win_become: move error handling to Ansible outside of shell

* trimmed the output so double newlines don't get set

* added test for non-zero exit code

* missed issue URL on test

* changed exit to SetShouldExit
7 years ago
Matt Clay 5a91ed0a3b Switch CI for OS X back to a single job. (#31265)
* Update Shippable scripts for group/non-group use.
* Switch CI for OS X back to a single job.
7 years ago
Jordan Borean bba941cd5b win_copy: fix for copying encrypted file without pass (#31084)
* win_copy: fix for copying encrypted file without pass

* fix pep8 issue

* reduced the diff and fixed some minor issues
7 years ago
Matt Clay 72237b63e7 Run OS X and FreeBSD CI tests using groups. (#31254)
* Run OS X and FreeBSD CI tests using groups.
* Improve readability of Shippable jobs.
7 years ago
Adrian Likins 65393e4747 Fix ansible_distribution on Ubuntu 10.04 (#31108)
The /etc/os-release based distro detection doesn't
seem to work for Ubuntu 10.04 (no /etc/os-release?).

So it was testing the next case which was /etc/lsb-release to
see if it is 'Mandriva'. Since the check for existence of
(/etc/lsb-release, Mandrive) was the first non-empty dist
file match, 'ansible_distribution' was being set to 'Mandriva'
expecting to be corrected by the data from the dist file content.

But since the dist file parsing for Mandriva didn't match for
Ubuntu 10.04 /etc/lsb-release _and_ there is no Debian specific
lsb-release check, 'ansible_distribution' stayed at 'Mandriva'
and the dist file checking loop keeps going and eventually off
the end of the list before finding a better match.

Adding a debian/ubuntu specific check for /etc/lsb-release after
the debian os-release sets the info correctly and stops further
checking of dist files.

Fixes #30693
7 years ago
Adrian Likins 278ff19bea Handle vault decrypt --output=- (#31066)
In cli.CLI.unfrack_path callback, special case if the
value of '--output' is '-', and avoid expanding
it to a full path.

vault cli already has special cases for '-', so it
just needs to get the original value to work.

Fixes #30550
7 years ago
Brian Coca 101377768b remove unused ssh pipelining setters
fixes #31125
7 years ago
Dag Wieers 17fbeeb2f0 rhn_channel: PEP8 compliancy and doc fixes (#30912)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 4a358b5396 foreman: PEP8 compliancy and doc fixes (#30910)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Hervé Beraud db70eeb913 Feature/test inventory (#30707)
* [test] move inventory test to right path
* [feat] add unit test for yaml inventory plugin
7 years ago
Felipe Garcia Bulsoni 46fd083138 LogicalInterconnectGroupFactsModule for HPE OneView (#28847)
* Added support to retrieving LIG resources in HPE OneView

* Fixing copyright header according to review

* Swapping out config for full credentials in parameter for documentation
7 years ago
Jordan Borean 12a4dca447 win_dotnet_ngen: fix after broken in 2.4 (#31076)
* win_dotnet_ngen: fix after broken in 2.4

* added description to return values
7 years ago
Felipe Garcia Bulsoni 7d74c126a9 EnclosureFactsModule for HPE OneView (#28852)
* Added support to retrieving Enclosures in HPE OneView

- Added unit tests

* Updated version_added to 2.5

* Changing return type of enclosure_script to string

* Fixing copyright header according to review

* Replaced config for credentials in parameters for documentation
7 years ago
Jordan Borean 67fd98da09 win_msg: added doc about msg limit and included an explicit check for better error handling (#31078) 7 years ago
Pilou 44f5b2bd25 ansible_tower: fix broken import, reuse tower_argument_spec and documentation fragment (#29115)
* module_utils/ansible_tower: fix broken import

* tower_*: use tower_argument_spec & doc fragment

* tower doc fragment: Ansible requires Python 2.6+

* tower_job_wait: fix broken import (Py3 compat)
7 years ago
Matt Clay 6d3cbbfc38 Disable failing vmware_maintenancemode test. 7 years ago
Matt Clay c055795e02 Pin docker simulator versions. 7 years ago
Dag Wieers 1241d0a3f4 pip: PEP8 compliancy and doc fixes
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Abhijeet Kasurde 02b5c7a8a3 New module - vmware_guest_powerstate
Fix adds a new module 'vmware_guest_powerstate' to manage
power states of virtual machine.

Fixes: #30371

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Abhijeet Kasurde 6a7676d738 Add testsuite for vmware_maintenancemode
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
jctanner 6b6a145027 Add an option to spawn vcsim in esx mode (#31155) 7 years ago
Brian Coca ac9278ff0f remove action plugin only fields from 'file' calls (#31047)
* remove action plugin only fields from 'file' calls

fixes #30556

* Add a test for #30556
7 years ago
Kedar K 916e6be888 - Fix to return error message back to the module. (#31035) 7 years ago
Dag Wieers bedfd0a5a4 atomic: PEP8 compliancy and doc fixes (#30918)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Rene Moser d7fa3ab487 cloudstack: cs_template: remove dependency to CloudStackException
* fixes docs
* fixes pep8
7 years ago
Dag Wieers fde4244d04 kubernetes: PEP8 compliancy and doc fixes (#30914)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Nathaniel Case d07d9390d7 Stop toggling nxapi (#28532)
* Stop toggling nxapi all the time

* Update failed_modules

* Restore nxapi state at each toggle
7 years ago
Adrian Likins 95abc1d82e Fix fact failures cause by ordering of collectors (#30777)
* Fix fact failures cause by ordering of collectors

Some fact collectors need info collected by other facts.
(for ex, service_mgr needs to know 'ansible_system').
This info is passed to the Collector.collect method via
the 'collected_facts' info.

But, the order the fact collectors were running in is
not a set order, so collectors like service_mgr could
run before the PlatformFactCollect ('ansible_system', etc),
so the 'ansible_system' fact would not exist yet. 

Depending on the collector and the deps, this can result
in incorrect behavior and wrong or missing facts.

To make the ordering of the collectors more consistent
and predictable, the code that builds that list is now
driven by the order of collectors in default_collectors.py,
and the rest of the code tries to preserve it.

* Flip the loops when building collector names

iterate over the ordered default_collectors list
selecting them for the final list in order instead
of driving it from the unordered collector_names set.

This lets the list returned by select_collector_classes
to stay in the same order as default_collectors.collectors

For collectors that have implicit deps on other fact collectors,
the default collectors can be ordered to include those early.

* default_collectors.py now uses a handful of sub lists of
collectors that can be ordered in default_collectors.collectors.

fixes #30753
fixes #30623
7 years ago
Ganesh Nalawade b86eea9a52 Remove provider from prepare_ios_tests integration test (#31038) 7 years ago
Ganesh Nalawade 65ab37cbd3 Remove provider from ios integration test (#31037)
*  Remove provider from each task as it is not required.
*  Add `authorize: yes` whereever required
7 years ago
Jordan Borean a41077df20 fix for webapppool when specifying an attribute that holds a collection (#30729)
* fix for webapppool when specifying an attribute that holds a collection

* re-add always block on test
7 years ago
Will Thames 5900fee67a Fix ec2_snapshot_facts for python3
Avoid the following seen when running ec2_ami tests on python3,
presumably because the return type of `map` is different between
python2 and python3.

```
Traceback (most recent call last):
  File "/tmp/ansible_e44v27uj/ansible_module_ec2_snapshot_facts.py", line 242, in <module>
    main()
  File "/tmp/ansible_e44v27uj/ansible_module_ec2_snapshot_facts.py", line 238, in main
    list_ec2_snapshots(connection, module)
  File "/tmp/ansible_e44v27uj/ansible_module_ec2_snapshot_facts.py", line 193, in list_ec2_snapshots
    snapshots = connection.describe_snapshots(SnapshotIds=snapshot_ids, OwnerIds=owner_ids, RestorableByUserIds=restorable_by_user_ids, Filters=filters)
  File "/usr/local/lib/python3.5/dist-packages/botocore/client.py", line 312, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python3.5/dist-packages/botocore/client.py", line 575, in _make_api_call
    api_params, operation_model, context=request_context)
  File "/usr/local/lib/python3.5/dist-packages/botocore/client.py", line 630, in _convert_to_request_dict
    api_params, operation_model)
  File "/usr/local/lib/python3.5/dist-packages/botocore/validate.py", line 291, in serialize_to_request
    raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Invalid type for parameter OwnerIds, value: <map object at 0x7ff577511048>, type: <class 'map'>, valid types: <class 'list'>, <class 'tuple'>
```

https://github.com/ansible/ansible/pull/30435#issuecomment-330750498
7 years ago
Dag Wieers 0ef87c849f virt: PEP8 compliancy and doc fixes (#30917)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
jctanner 0dd3a61a75 vmware_guest: tests for createvm+modifyvm tasks (#30959)
* Save the serialized values instead of their types
* Add tests for creating and modifying VMs without using a template
* Remove blank line
* Add tests for vm deletion
7 years ago
Felipe Garcia Bulsoni 637571abfb Added new module for managing LIGs in HPE OneView 7 years ago
René Moser b444332412 fix pep8 for cloudscale_server (#30974) 7 years ago
Dag Wieers fd91da7297 pacman: PEP8 compliancy and doc fixes (#30913)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 91bb211922 redis: PEP8 compliancy and doc fixes (#30920)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 125c4b135d mount: PEP8 compliancy and doc fixes
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Will Thames ce2f5d26ab Improve cloudwatchevent_rule exception handling (#30823)
* Fix cloudwatchevent_rule exception handling

Where it is currently present, this change fixes the exception handling.
However, there are many places that it is lacking.

Fixes #30806

* Add new exception handling for cloudwatchevent_rule

Ensure all API calls are wrapped with exception handling

* PEP8 tidy up

* Remove unnecessary HAS_BOTO3 import and checks

Tidy up documentation so that NO_QA can be removed
7 years ago
Adrian Likins a14d0f3586 Use vault_id when encrypted via vault-edit (#30772)
* Use vault_id when encrypted via vault-edit

On the encryption stage of
'ansible-vault edit --vault-id=someid@passfile somefile',
the vault id was not being passed to encrypt() so the files were
always saved with the default vault id in the 1.1 version format.

When trying to edit that file a second time, also with a --vault-id,
the file would be decrypted with the secret associated with the
provided vault-id, but since the encrypted file had no vault id
in the envelope there would be no match for 'default' secrets.
(Only the --vault-id was included in the potential matches, so
the vault id actually used to decrypt was not).

If that list was empty, there would be an IndexError when trying
to encrypted the changed file. This would result in the displayed
error:

ERROR! Unexpected Exception, this is probably a bug: list index out of range

Fix is two parts:

1) use the vault id when encrypting from edit

2) when matching the secret to use for encrypting after edit,
include the vault id that was used for decryption and not just
the vault id (or lack of vault id) from the envelope.

add unit tests for #30575 and intg tests for 'ansible-vault edit'

Fixes #30575
7 years ago
Kedar K 4c21563ac6 - Adds sub-interface support for nxos_interface and nxos_ip_interface (#30830)
- Support dot1 encapsulation on routed sub-interface
7 years ago
Dag Wieers c3707aaf37 linode: PEP8 compliancy and doc fixes (#30922)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 4647713be9 cron: PEP8 compliancy and doc fixes (#30884)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 5175bd8ebd replace: PEP8 compliancy, pylint and docs (#30856)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
7 years ago
Adrian Likins 3eab636b3f Fix 'distribution' fact for ArchLinux (#30723)
* Fix 'distribution' fact for ArchLinux

Allow empty wasn't breaking out of the process_dist_files
loop, so a empty /etc/arch-release would continue searching
and eventually try /etc/os-release. The os-release parsing
works, but the distro name there is 'Arch Linux' which does
not match the 2.3 behavior of 'Archlinux'

Add a OS_RELEASE_ALIAS map for the cases where we need to get
the distro name from os-release but use an alias.

We can't include 'Archlinux' in SEARCH_STRING because a name match on its keys
but without a match on the content causes a fallback to using the first
whitespace seperated item from the file content as the name.
For os-release, that is in form 'NAME=Arch Linux'

With os-release returning the right name, this also supports the
case where there is no /etc/arch-release, but there is a /etc/os-release

Fixes #30600

* pep8 and comment cleanup
7 years ago
Dag Wieers 989bd1f829 xattr: PEP8 compliancy, pylint and docs (#30861)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
7 years ago
Dag Wieers 04b5c17578 ini_file: PEP8 compliancy, pylint and docs (#30851)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
7 years ago
Adrian Likins 12404f470a Fix pkg_mgr fact on OpenBSD (#30725)
* Fix pkg_mgr fact on OpenBSD

Add a OpenBSDPkgMgrFactCollector that hardcodes pkg_mgr
to 'openbsd_pkg'. The ansible collector will choose the
OpenBSD collector if the system is OpenBSD and the 'Generic'
one otherwise.

This removes PkgMgrFactCollectors depenency on the
'system' fact being in collected_facts, which also
avoids ordering issues (if the pkg mgr fact is collected
before the system fact...)

Fixes #30623
7 years ago
Ganesh Nalawade c3d226a739 Increase pause time in junos integration test (#30740)
*  Increase pause time to a value greater
   than persistent connection timeout to clean
   out socket path.
7 years ago
Matt Clay ab89b1b219 Add region to ansible-test AWS cloud config. (#30733)
* Add region to ansible-test AWS cloud config.
* Fix .gitignore for ansible-test cloud config.
7 years ago
Ganesh Nalawade d72eb08902 Fix nxos provider transport warning issue (#30610)
* Fix nxos provider transport warning issue

*  Add default value of transport arg in provider spec
*  Remove default value if transport arg in top level spec
   This ensure deprecation warning is seen only in case transport
   is given as a top level arg in task
*  Refactor nxos modules to reference transport value from provider
   spec

* Fix unit test

* Remove transport arg assignment in nxos action plugin

* As assigning transport value is handled in provider spec
  top level task arg assignment is no longer required
7 years ago
Jordan Borean fb628acb6e win_domain_membership: added better error handling and basic tests (#30674) 7 years ago
Jordan Borean 59187358ee win_scheduled_task_stat: add new module to get stat on scheduled tasks (#30602)
* win_scheduled_task_stat: add new module to get stat on scheduled tasks

* fixed up linting errors and aliases file

* I should learn how to spell

* removing URI from test

* added state information for the task

* removed argument so task stays running
7 years ago
Hervé Beraud 0e9ae5b8cc [fix] no-unicode-literals sanity error on ansible.egg-info (#30446)
* [fix] no-unicode-literals sanity error on ansible.egg-info
7 years ago
Toshio Kuratomi 46e5c48f03 Split ec2_elb_* modules in service of rename/interface changes (#30532)
* Undeprecate ec2_elb_*
* Make ec2_elb* full fledged modules rather than aliases
* Split tests for ec2_elb_lb and elb_classicb_lb
* Change names in documentation of old and new elb modules

Add tests for ec2_elb_lb
7 years ago
Tim Rupp 0eb0d96286 Adds module which allows users to manage partitions on a BIG-IP (#30577) 7 years ago
Ganesh Nalawade 869cd6f729 Increase socket connect retry timeout for integration test (#30681)
*  Increase persistent connection local socket
   retry timeout to fix intermittent failure in
   network integration test
7 years ago
Dag Wieers 31e7d735a3 win_environment: Make this the Windows reference module
As discussed before we selected win_environment to the documentation,
and point to win_uri for a more advanced module.

If we want to make this the reference module, we have to get this one
absolutely right in every possible way.

This PR cleans up both win_environment and win_uri, and makes the
required changes to the windows module development section.
7 years ago
Reid Wahl 5f90169d73 modules/system/user.py: Change createhome to create_home (#30179) 7 years ago
Dag Wieers f5dded59c2 mail: Fix charset encoding issue
This PR includes:
- An important fix to charset encoding of from address
- Documentation and examples cleanup
- PEP8 fixes
- Warning on insecure access
- Strict parameter typing
- More modern interface (using lists rather than comma, space or pipe-delimited strings)
- Warn on failure to send mail to some recipients
  ```
   [WARNING]: Failed to send mail to 'foobar': 550 5.1.1 <foobar>:
Recipient address rejected: User unknown in local recipient table
  ```
- Warn on failure to parse some headers
  ```
  [WARNING]: Skipping header 'Foobar', unable to parse
  ```
- Return failed recipients as return value
- Changed default encoding to utf-8
7 years ago
mikedlr 140ea7f5ff lambda integration tests - test to show that environment config has an effect (#28815) 7 years ago
Matt Clay 79839615e7 Improve coverage of expect integration tests. (#30608) 7 years ago
dteach ca56a248d8 junos_facts: Add Hardware facts. (#30304)
* Add Routing Engine Facts

 - Map routing engine output information to routing_engines facts dict.
 - Add fact 'has_2RE', which is a quick way to determine how many REs
   the chassis has.

* Fix a typo

* Fix more typos

* Add slot number to routing_engine dict

* Add facts about the installed chassis modules

* Fix typo

* Fixed another typo

* Fix Path

* Change path again.

* More Typos

* Add some deubgging

* Add additional information for hardware components.

 - Return information about the Routing Engines.
 - Return a fact to easily determine if the device
   has two routing engines.
 - Return information about the hardware modules.

* Addressed pep8 stardard failures.

* Add unit test fixtures.

* Rename fixture.

* Fix unit test failures.

 - Rename the fixture file to what the unit test expects.
 - Strip out junos namespace attributes.
Rename file to match what the unit test expects.

* Scrubbed the routing engine serial numbers.

* Add unit test facts for new tests.

 - Add unit test for ansible_net_routing_engines fact
 - Add unit test for ansible_net_modules fact
 - Add unit test for ansible_net_has_2RE

* Fixed spacing.
7 years ago
Will Thames 37736ee87e Allow AWS image and snapshot creation/deletion
Provide all necessary permissions for AMI tests
Allow tests to run in us-east-2
Ensure `always` section gets used
Update tests to ensure that cleanup works better, and add
deletion idempotency test
7 years ago
s-hertel 328fd307a2 Add integration tests for ec2_ami module. 7 years ago
Jordan Borean a940eb1e80 CamelConverter - more fixes picked up in testing (#30601) 7 years ago
Jordan Borean 1ea0293878 CamelConversion: fix to not convert string values (#30595) 7 years ago
Jordan Borean 838f39e76a win_scheduled_task: rewrite (#28995)
* win_scheduled_task: rewrite for additionality functionality and bug fixes

* fixes for docs and os version differences

* started with the testing

* doc fix

* added more tests

* added principals tests

* finished tests for win_scheduled_task rewrite

* feedback from PR

* change to fail when both new and deprecated args are set

* change diff variable to match new standard and update doc sentance
7 years ago
Martin Krizek 32d6b1d0e0 user: fix default non-system user's shell on macOS 7 years ago
Adrian Likins 307be59092 Don't ask for password confirm on 'ansible-vault edit' (#30514)
* Don't ask for password confirm on 'ansible-vault edit'

This is to match the 2.3 behavior on:

        ansible-vault edit encrypted_file.yml

Previously, the above command would consider that a 'new password'
scenario and prompt accordingly, ie:

        $ ansible-vault edit encrypted_file.yml
        New Password:
        Confirm New Password:

The bug was cause by 'create_new_password' being used for
'edit' action. This also causes the previous implicit 'auto prompt'
to get triggered and prompt the user.

Fix is to make auto prompt explicit in the calling code to handle
the 'edit' case where we want to auto prompt but we do not want
to request a password confirm.

Fixes #30491
7 years ago
Toshio Kuratomi 0a69e27e62 Fix jenkins_plugin test for no net situations (#30568)
Unittests are sometimes run without network connectivity in build
systems.  Make that work correctly by mocking out _get_url_data with the
expected return value.
7 years ago
Matt Clay dbf9634b1b Enable more pylint rules and fix reported issues. (#30543)
* Enable pylint invalid-encoded-data test.
* Enable pylint anomalous-unicode-escape-in-string test.
7 years ago
Matt Clay 7714dcd04e Enable more pylint rules and fix reported issues. (#30539)
* Enable pylint unreachable test.
* Enable pylint suppressed-message test.
* Enable pylint redundant-unittest-assert test.
* Enable pylint bad-open-mode test.
* Enable pylint signature-differs test.
* Enable pylint unnecessary-pass test.
* Enable pylint unnecessary-lambda test.
* Enable pylint raising-bad-type test.
* Enable pylint logging-not-lazy test.
* Enable pylint logging-format-interpolation test.
* Enable pylint useless-else-on-loop test.
7 years ago
Jordan Borean 01563ccd5d windows: fix list type in legacy module utils (#30483)
* windows: fix list type in legacy module utils

* only change the return for the list type instead of affecting it all

* additional null check when using an array
7 years ago
Toshio Kuratomi c82cf791dd Add a code-smell test for smart quotes and remove smart quotes from all files 7 years ago
Dag Wieers 6a6f88d035 Clean up ACI error text (#30501)
* Clean up ACI error text
* Get rid of explicit unicode strings, use PY2
7 years ago
Toshio Kuratomi 1fa3fb45bc Update aci tests for new messages from lxml-4.0+ 7 years ago
Matt Clay ff4276b65d Enable more Windows tests in CI. (#30443)
* Enable more Windows tests in CI.
* Fix win_psexec tests.
* Fix host-specific output_dir in win_fetch test.
7 years ago
Matt Davis 035a17e8aa migrate azure_rm_vm tests to active (#30452) 7 years ago
Matt Davis 6b5b465125 azure_rm_dnsrecordset rewrite (#30449)
As-merged, had several issues that prevented idempotent usage. Some args were defined at the wrong UI level. Dual-state args didn't match up with typical Ansible UI.
7 years ago
Matt Clay 397918435b Fix docker error handling for cs/vcenter tests. 7 years ago
Matt Clay b9d8637e37 Improve test reliability for win_chocolatey. (#30440)
* Rename variables.
* Test install with chocolatey-core.extension.
7 years ago
Matt Clay 4ce13e983a Command module bug fix, tests and cleanup. (#30432)
* Add more command integration tests.
* Remove unnecessary command test debug tasks.
* Fix traceback in command module for empty args.
* Remove unreachable code.
7 years ago
René Moser f128796782 cs_volume: fix CloudStackException dependency (#30389)
fixes pep8
7 years ago
Kedar K 7e58661335 Test Role: Adds nxos_pim_rp_address integration test role (#29958)
*   Adds nxos_pim_rp_address integration test role for group_list,
  prefix_list and route_map (cli and nxapi)

*  * Adds explicit removal of static RP configs to match cli behaviour

*  * Removes config deletion using nxos_config module (for 2.4 only)

*  * Attempt short and long delete config command
 * Add a platform check for N3K for bidir
7 years ago
Mike Wiebe 9af6dc4751 Fix nxos_snmp_community idempotence issue (#30388)
* Fix nxos_snmp_community idempotence issue

* Use passed in name to filter

* Test updates and remove unused method
7 years ago
Sloane Hertel bdbe5337c6 s3 integration tests (#28396)
* Replace pause in integration tests with until.

Use resource prefix instead of generating a random number

Only try to delete keys if they exist

* Add alias to tests
7 years ago
Matt Clay c00ad0868e Update Windows CI groups from 2 to 3. 7 years ago
Mike Wiebe 173c41aefe Rel240/fix nxos pim interface (#29885)
* fix nxos_pim_interface

* Add integration test coverage and fix unit test

* Add clarifying comments

* Make ansibot happy
7 years ago
Pierre-Louis Bonicoli 5c029abac1 alternatives: test that path parameter is checked
Relates: #24800
7 years ago
Pierre-Louis Bonicoli e9d202f944 module_utils/avi.py: fix broken import 7 years ago
Mike Wiebe 3faba93a2b Fix nxos_interface error for nxapi and idempotence problem (#29136)
* Fix nxos_interface nxapi error and idempotence

* Make shippable happy
7 years ago
Matt Clay 0ce9e84f38 Fix import test handling of multi-line messages. 7 years ago
Yanis Guenane 0648e339a7 openssl: remove static dict for keyUsage (#30339)
keyUsage and extendedKeyUsage are currently statically limited via a
static dict defined in modules_utils/crypto.py. If one specify a value
that isn't in there, idempotency won't work.

Instead of having static dict, we uses keyUsage and extendedKyeUsage
values OpenSSL NID and compare those rather than comparing strings.

Fixes: https://github.com/ansible/ansible/issues/30316
7 years ago
Martin Krizek dc5f83c09b Add sudo/su become_methods for become tests (#30266)
* Add sudo/su become_methods for become tests

* Fix test on osx
7 years ago
Matt Clay 781fd7099a Reorganize integration tests:
- Move legacy tests into a separate directory.
- Reduce common dependencies between targets.
7 years ago
Yanis Guenane 3e4a306a42 openssl_certificate: Correctly set the version (#30314)
Current openssl_certificate is mistakenly taking its derivating its
version number from the csr version number.

Thos two fields are completly unrelated and hence the version number of
the certificate should be able to be directly specified (via
selfsigned_version parameter).
7 years ago
Ganesh Nalawade 3ff527b1d2 Fixes #30281 eos_banner integration test failure (#30283)
* Fixes #30281 Configure login prompt for eos_banner

* Fix unit test

* Fix pep8 issue
7 years ago
Matt Clay 765718bed2 Run all Windows tests if change detection disabled (#30320)
* Run all Windows tests if change detection disabled
* Run all Windows versions if change detection disabled
7 years ago
Jordan Borean d0867edbc3 updated test not that module util checks the path is valid (#30321) 7 years ago
Ricardo Carrillo Cruz dbe9df1289 Add CLI provider with authorize yes to ios tests (#30312)
We are getting failures to do lack of elevated privileges.
7 years ago
MarkusTeufelberger 2186b04934 Add simple integration test for openssl_certificate (#29038)
* openssl_certificate: Fix parameter assertion in Python3

Parameter assertion in Python3 is broken. pyOpenSSL get_X() functions
returns b'' type string and tries to compare it with '' string, leading
to failure.

The error mentionned above has been fixed by sanitizing the inputs from
a user to the assert only backend.

Also, this error was hidden by the fact that the improper check method
was called in the generate() functions.

* Add simple integration test for openssl_certificate

* remove subject == issuer assertion

* run integration tests only on supported hosts

* change min supported version to 0.15.x

* Add test for more CSR fields

* also convert dict members to bytes

* fix version_compare

* openssl_{csr, certificate}: Fail if pyOpenSSL <= 0.15

Previous 0.13 pyOpenSSL was a C-binding, and required the parameter
passed to add_extention to be in ASN.1. This has changed with the move
to 0.14 and it is now all pythong and string based.

Previous the 0.15 release, the `get_extensions()` method didn't exist,
since the modules rely heavily on it we ensure pyOpenSSL version is at
last 0.15.0.

* check pyopenssl version in openssl_csr integration test
7 years ago
Felipe Garcia Bulsoni 18707136e2 Added support to retrieving SAN Manager resources in HPE OneView
- Added unit tests
- Added _main_ function to oneview unit tests which were missing it
7 years ago
Felipe Garcia Bulsoni eeb8128baf Added __main__ method to tests so they can be run directly through Python 7 years ago
Matt Clay 1a602096f5 Improve ansible-test HttpClient error handling. (#30301)
- Automatic retries on DNS lookup failures.
- Handle API errors in shippable.py.
7 years ago
Jordan Borean 6d196eaa98 windows command changed to use CreateProcess (#30253)
* windows command changed to use CreateProcess

* change to get become to work
7 years ago
Nathaniel Case 8c03609e54 nxos_snmp cleanup (#28922)
* Clean up nxos_snmp_contact & nxos_snmp_location

* Bring nxos_snmp_community in line

* Bring nxos_snmp_host in line

* And I would have gotten away with it too,

if it weren't for those meddling sanity tests

* Bring nxos_snmp_traps & nxos_snmp_user in line

* Appease Shippable
7 years ago
Ricardo Carrillo Cruz 4a3a8ac616 Remove provider cli for vyos tests (#30275)
Transport is cli by default, and we set user/passwords on group_vars.
7 years ago
rahushen caafc8e591 NXOS Commit Integration tests to Ansible (part 1) (#28935)
* cleanup nxos_bgp_neighbor_af tests

* add timeout and to_json to nxapi testing for nxos_command

* maintain folder naming consistency with other tests
7 years ago
Mike Wiebe 7292dd20ed Fix nxos_overlay_global networking modules (#28943) 7 years ago
Guillaume Coré a09a231be7 ini_file: add integration test (#24434)
* ini_file: add integration test

Start integration tests for ini_file module.

* ini_file test: add comments for lisibility

* update from review: use var instead of checksum to assert content
7 years ago
Ganesh Nalawade d8371cec91 Fix ios_system lookup enable issue (#30263)
Fixes #29974

Add `None` check while comparing module parameter values (want) with the actual
configuration present on device (have).
7 years ago
Matt Clay 442af3744e Miscellaneous pylint fixes.
The following rules are no longer disabled:

- bad-format-string
- duplicate-key
- lost-exception
- trailing-newlines
- unexpected-keyword-arg
- useless-suppression
- using-constant-test
7 years ago
Mike Wiebe cef7ed0310 Fix nxos_mtu nxapi failure (#30153) 7 years ago
Nicklaus McClendon 6dbc3c63f8 Updated pip module to always return changed if venv is created (#24233)
* Updated pip module to always return changed if venv is created

Fixes #23204

* Add integration test to pip (see #23204)
7 years ago
Matt Davis 1e2ce4c8ab support missing drive letters in PS `path` type (#29884)
* fixes #26623
* Test-Path (and thus `-type path` in Get-AnsibleParam) fail on a nonexistent drive letter, since it can't be mapped to a PSProvider.
* added support and basic smoke tests for
7 years ago
Ricardo Carrillo Cruz b30cd60829 Fix nxos_user tests (#30048)
On our CI we use SSH port 8022, so parameterized the test passing
-p {{ ansible_ssh_port }}.
Also, force user/pass auth.
7 years ago
John R Barker bc2f4365b5 Correctly validate module name for modules with aliases (#29957)
* Correctly validate module name for modules with aliases

If a module has an alias (ie is a symlink) then we need to ensure that
DOCUMENTATION.module is set to the main name, not the aliased name

* formatting
7 years ago
Ricardo Carrillo Cruz 1da7194534 Remove provider lines from iosxr tests (#29956)
We don't use authorize on iosxr nor we use a special transport,
so no need to use iosxr for CLI at all.
7 years ago
Trishna Guha 5b1c91bf19 nxos_system parse name_servers fix (#29944)
* nxos_system parse name_servers fix

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix nxos_system tests

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Matt Clay 68aeaa58a8 Fix dangerous default args. (#29839) 7 years ago
Tim Rupp 74ace093b8 Renames the bigip_configsync_actions module (#29747)
Retains the old name by making a symlink. We can remove it in a later
release.
7 years ago
Matt Clay 79bc49e150 Fix ansible-test unicode and sanity tests. (#29743)
* Show warning when using pylint on Python 2.6.
* Add pylint disable entries for Python 2.
* Fix unicode handling in ansible-test.
* Add missing documentation.
7 years ago
Abhijeet Kasurde b5eca624d0 Refactor easy_install module
* PEP8 fix
* Rectified string check in package install command stdout
* Add abadger's code review changes

Fixes #22245

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Jordan Borean 5623e679b8 win_unzip: added support for Server core by using .net zip functions (#29272)
* win_unzip: added support for Server core by using .net zip functions

* fixed unzip behaviour with folders
7 years ago
Adam Miller 75127092f2 refactor firewalld module with object abstraction (#26487)
* refactor firewalld module with object abstraction

This change creates a FirewallTransaction object that each
individual transaction type is a sub-class of as they all follow the
same pattern to enable or disable something in the firewall.

Also, there's a few bugfixes here:
    - Fix the "source" type to handle permanent operations
    - Remove ambiguity of required parameters for only specific use
      cases that can lead to transactions effectively being a no-op.
      Instead, pick sane defaults and document them.
    - Change how imports are done so globals are no longer needed

This is based on the original feedback by Toshio from the last
refactor attempt:

    https://github.com/ansible/ansible-modules-extras/pull/3383

Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>

* fix line too long for pep8 for shippable tests

Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>

* remove firewalld from pep8/legacy-files

Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
7 years ago
Toshio Kuratomi ff13d58c14 Remove use of unicode_literals as it is an anti-pattern
from __future__ unicode_literals leads to developer confusion as
developers no longer can tell whether a bare literal string is a byte
string or a unicode string.  Explicit marking as u"" or b"" is the way
to solve the same problem in the Ansbile codebase.
7 years ago
Martin Krizek 0daacdccf8 dnf: add environment upgrade test 7 years ago
Matt Clay 5953a428a8 Undo accidental addition to skip.txt. 7 years ago
Martin Krizek de299ef77c dnf: fix TypeError when env/group failed 7 years ago
Matt Clay cafd064547 Improve import error handling in azure_rm_common. (#29153)
* Improve import error handling in azure_rm_common.

* Update skip.txt
7 years ago
Brian Coca 444a5b5389 fix cs_zone_facts tests, namespace feature removed (#29184)
* fix cszonefacts .. namespace feature removed

* also removed the 2nd instance of ansible_facts
7 years ago
Trishna Guha 2bef344512 nxos_config CI fix (#29437)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Trishna Guha bbb1ceba75 fix nxos_command nxapi test output (#29436)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Matt Clay 50ae33d3c1 Fix wheel dependency on python 2.6. (#29388)
* Fix wheel dependency on python 2.6.
* Limit wheel version for tox on python 2.6.
7 years ago
Andrew Saraceni 8f050d3719 Fix SID Lookup Issues on Assorted Windows Modules (#28979)
* fix sid lookup issues and update copyright/license to latest format

* simplify win_owner and win_share by removing unnecessary function
7 years ago
Miguel Ángel Ajo 8e4f112b39 Fixes #23680 bug with py3.x due to binary string handling (#23688)
* This commit includes a unit test to exercise the _is_role
function and make sure it doesn't break in any Python version.
* Import os.path and other minor fixups
7 years ago
Toshio Kuratomi 75249e311e Fix set theory filters for python3
The set theory filters need to use lists rather than generators on python3.

Also add unit tests for most of the mathstuff filters

Fixes #26494
7 years ago
Abhijeet Kasurde 8f6626bd8f Misc typo corrections
Fix adds correction for typos

* Anisble to Ansible
* Fasle to False

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Matt Clay f88750d665 Expand disabled pylint rules. (#29162)
* Expand disabled pylint rules.
* Fix pylint and unicode issues in ansible-test.
7 years ago
Pierre-Louis Bonicoli 557356c571 module_utils/ovirt.py: fix broken import 7 years ago
Matt Clay e71cddc026 Remove unnecessary import skip entries. 7 years ago
Trishna Guha 2ff9888923 rename nxos test basic-no-exec to basic-no-motd (#29144)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Trishna Guha 588bddbc35 nxos_banner CI fix (#29134)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Ricardo Carrillo Cruz 497e6cf405 Use 'hostname switch' on setup/teardown tasks for nxos_config non_idempotent (#29132)
inventory_hostname breaks CI due to too long string.
7 years ago
Ricardo Carrillo Cruz 8b6e3272f2 Set hostname to 'switch' on nxos_config toplevel setup/teardown tasks (#29127)
Using inventory_hostname breaks in our CI, as the inventory_hostname
translates to a long UUID, exceeding the maximum length for a NXOS
hostname.
7 years ago
Ricardo Carrillo Cruz 2304706bd3 Set hostname to 'switch' on nxos_system teardown (#29126)
On setup we set it to 'switch', so teardown should be 'switch'.
Also, using inventory_hostname breaks the test, since in our CI
it's a long UUID string, which exceeds the 32 chars maximum for setting
a hostname on NXOS.
7 years ago
Ganesh Nalawade 4d5b9a4a57 Increase persistent timer setting for network integration test (#29121) 7 years ago
Ganesh Nalawade 0b2619ff2b Add lldp neighbor intent argument for vyos_interface (#29092)
* Add lldp neighbor intent argument for vyos_interface

* Add version_added info for neighbor argument

* Fix CI issue
7 years ago
Sam Doran a5ee865634 Update elasticsearch_plugin.py (#28936)
* Update elasticsearch_plugin.py

Change module to work with Elasticsearch 2.x and 5.x automatically.
Update examples and docs.
Supersedes #21989

* Check system paths for elasticsearch-plugin binary

Use get_bin_path from basic.py for searching paths.

* Create a copy of PLUGIN_BIN_PATHS rather than modifying the global

* Use provided plugin_bin path first before trying other places

Change global PLUGIN_BIN_PATHS to a tuple
7 years ago
Trishna Guha 757983d808 Disable nxapi test for nxos_banner (#29088)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Trishna Guha 064bb66e6d run banner exec test only for NXOS7K (#29041)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Jordan Borean 91e7c3ec81 win_regedit: fixed up diff output to be more representative of type (#28974)
* win_regedit: fixed up diff output to be more representative of type

* added diff fix for creation of key and prop in one go
7 years ago
Matt Clay a1453a7917 Improve handling of first CI run for new branch. (#29070) 7 years ago
Brian Coca fe3b4325c2 less confusing 'args' message (#29053)
* less confusing 'args' message

* fix test

* gone native
7 years ago
Nathaniel Case f84ff216b6 Generalize nxos_bgp event-history detection (#28890)
* More general handling of event-history

* Update unit tests
7 years ago
Matt Clay 286348bd0d Temporarily disable leaky test in CI. 7 years ago
Ganesh Nalawade 3b6b004570 Add support for neighbor argument in ios_interface (#29035)
Add missing support for lldp neighbor argument in ios_interface
7 years ago
Matt Clay 08bdb6198e Migrate more Azure integration tests. (#29034) 7 years ago
Matt Clay 8f4c8844c4 Divide Windows integration tests into 2 groups. (#29029)
* Divide Windows integration tests into 2 groups.
* Support `none` for `--changed-all-target`.
* Run 2 separate Windows groups on Shippable.
* Only run smoketest and minimal for the group1 job.
7 years ago
Dag Wieers d8649adf10 aci_rest: More tests related to input types
Now test inline YAML, inline JSON, YAML string, JSON string and XML
string input.
7 years ago
Dag Wieers 6108b46022 aci_rest: Add integration tests
Integration tests for aci_rest to upstream.

It follows the same flow as aci_tenant to create, change and remove a
tenant idempotently.
7 years ago
Ganesh Nalawade 60d0139844 Remove provider from prepare junos test intergration setup (#28961) 7 years ago
Ganesh Nalawade 7372e0c658 Fix junos_netconf integration test provider param (#28954) 7 years ago
Matt Clay 55fb18b85c Split cloud tests into two CI groups. 7 years ago
Matt Clay a7d5492ea3 Fix github_issue test and enable in CI. 7 years ago
René Moser 9c6d925f5a tests: cs_instance: expand tests cases with project (#28938) 7 years ago
Nathaniel Case 8bfdbd0f73 nxos_bgp_neighbor: Fix regex &report warnings (#28888)
* Fix over-detection of log-neighbor-as

* Report nxos warnings

* Update nxos_bgp_neighbor unit tests to test remove-private-as
7 years ago
Abhijeet Kasurde 8027aad4b8 Add support for Python3 in vmware_guest_find
* Remove redundant get_obj method
* Fix testcase
* Correct logic for compile_folder_path_for_object

Fixes: #25984

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Nathaniel Case de2096e3d0 Move networking provider options to subspec (#28894)
* Add EOS provider options as subspec

* Add IOS provider options as subspec

* Add IOS XR provider options as subspec

* Add Junos provider options as subspec

* Add NX-OS provider options as subspec

* Add Vyos provider options as subspec

* Remove password checks from check_args

* Do the same to aireos, aruba, ce, dellos*, & sros, as they work the same way

* VyOS does not support `transport`
7 years ago
Mike Wiebe fb1aa54341 Rel240/fix nxos interface ospf (#28898)
* Fixes 28897 nxos_interface_ospf idempotence

* Handle all characters upper or lower with tests
7 years ago
saichint 737c27121b Add Idempotent IT cases for vrrp, vrf, vtp (#28895) 7 years ago
rahushen 50d148a7d6 Add nxos_config IT (#28853)
* recalibrate tests and add new ones

* add new cli tests

* add new nxapi tests

* Add new tests for cli and nxapi
7 years ago
Matt Clay e513ec10da Add safety check for Shippable "Rebuild with SSH" (#28857)
* Add safety check for Shippable "Rebuild with SSH".
* Run shippable.py for the `other` test.
7 years ago
Matt Clay 79dcb3a3fa Add help links to bot messages. (#28903) 7 years ago
Trishna Guha 252efcebf5 module should fail if eos_user is added without configured_password or nopassword or sshkey (#28780)
* module should fail if eos_user is added without configured_password or nopassword or sshkey

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix eos_user unit test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix eos_user integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Matt Clay 84295e6124 Mark destructive tests as such. 7 years ago
saichint b574be6616 add it cases for vrf_af and vpc_interface (#28889) 7 years ago
Martin Krizek 503bfaf38b dnf: add integration tests (based on yum tests) (#28881) 7 years ago
Ricardo Carrillo Cruz 35ec00ac5c Remove all networking group_vars but VyOS (#28869)
Ansible-test will consume group_vars from test/integration, as it runs
from that working directory. This causes problems if we specify vars
in inventory as they have higher precedence, plus it gives the impression
to users those group_vars can be reused.
Leaving vyos since it's configured to run in Shippable and apparently
it breaks if there are no group_vars in the test/integration folder.
7 years ago
Ganesh Nalawade a6af204cee Fix junos_user purge option failures (#28867)
* Fix junos_user pruge option failures

Fixes #25989

Add seperate handling for purge option which
fetches configured users on remote device
and delete the one not present in aggregate
list.

* Minor changes
7 years ago
John R Barker 5dae6a6392 Delete targets/ops_command as module no longer exists (#28868) 7 years ago
Matt Clay 94296908d7 Temporarily diasble github_issue test in CI. 7 years ago
Matt Clay 783da545b2 Rename AWS test targets to match modules:
- ec2_facts -> ec2_metadata_facts
- ec2_elb_lb -> elb_classic_lb
- aws_lambda_policy -> lambda_policy
7 years ago
Abhijeet Kasurde dd9db65a9a PEP8 fixes for smartos module
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Steffen Neubauer bf73377394 consul: Always fail if no service_name was provided. (#25877)
Fixes a subtile bug introduced in PR #21737
7 years ago
Abhijeet Kasurde a2c8481395 Add testcases for github_issue (#26309)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Matt Clay bda0f6e241 Fix ansible-test handling of integration dir. 7 years ago
Matt Clay 189375c611 Revert "Remove network integration group_vars/host_vars (#28827)"
This reverts commit 0a2df4cdaf.
7 years ago
Felipe Garcia Bulsoni fd304d9b5b Added support to SAN Manager resource in HPE OneView (#28787)
- Added unit tests
7 years ago
Ricardo Carrillo Cruz 0a2df4cdaf Remove network integration group_vars/host_vars (#28827)
* Remove network integration group_vars/host_vars

We use our own inventory in DCI, which is passed to ansible-test
with --inventory.
However, as the working directory of ansible-test is set to
test/integration, ansible consumes the repo group_vars/host_vars.
That imposes a problem, since they have greater precedence to
inventory variables.
Let's just remove group_vars/host_vars so end-users can assume
those vars can be used, the inventory and group/host vars are
environment dependent, each user should create their own.

* Restore files I git rm'd by mistake
7 years ago
Felipe Garcia Bulsoni 1e785d4117 FcoeNetworkFactsModule for HPE OneView (#28728)
* Add FcoeNetworkFactsModule for retrieving HPE OneView FCoE Networks

- Allow querying for FCoE Network resources in HPE OneView
- Adds unit tests to new module

* Fix "required: no"
7 years ago
Felipe Garcia Bulsoni 6ea2099ee4 EthernetNetworkFactsModule for HPE OneView (#28723)
* Adds EthernetNetworkFactsModule for retrieve HPE OneView

- Allows retrieving Ethernet Network resources from HPE OneView
- Adds unit tests

* Removed required: no
7 years ago
Felipe Garcia Bulsoni a4ae8536d9 NetworkSetFactsModule for HPE OneView (#28730)
* Add NetworkSetFactsModule for retrieving HPE OneView Network Sets

- Allow querying for Network Set resources in HPE OneView
- Adds unit tests to new module
- Updates oneview_module_loader copyright header to short GPL3 version

* Adding possibility to pass in credentials as parameters

* Removed required false and changed format of filter_by_name declaration

* Updated examples in docs to reflect new way to pass in credentials

- All examples of the oneview_network_set_facts updated to use
credential parameters
- All required=False from oneview base module removed
- Shared docs updated to bring attention to API version being used
7 years ago
jhawkesworth b35f39479b Fix integration test for win_toast so that the intended expiry period is used (#28812) 7 years ago
Harold Wong 5e7b2a1c06 Use variable for domain name (#28807) 7 years ago
Thomas Stringer 8a6ae51f90 Add support for Azure Functions (#28566)
* add template for az func

* (wip) add basic azure functions support

* add support to add app settings to azure function

* add support for updating based off of app settings

* add integration tests and refactor required param

* support check mode and add facts module

* add test for azure functions facts module

* add necessary checks and registrations for web client

* fix documentation

* change return type from complex to dict

* disable azure_rm_functionapp tests until stable

* remove dict comprehension for py2.6

* pepe has whitespace tumor
7 years ago
Harold Wong ef660f87b0 Use variable for domain name (#28806) 7 years ago
Julien Stroheker fe1153c0af Azure acs module (azure_rm_acs.py) (#28522)
* Adding acs module

* linter issue

* Reduce the VM Size for the int. tests

* Short the name of the cluster

* Fixing the asserts and title

* Fixing VM Scale count in int. tests

* Changing the location of the tests

* trying eastus2

* disabling acs CI tests until stabilized
7 years ago
Ozi Boms 3045c58c83 new facts module for dns zone (#28803)
* new facts module for dns zone

integration tests and new module for dns zone facts

* use vairable for domain name

* add nondeterministic piece to domain name

* fix azure_rm_dnszone_facts examples
7 years ago
Ozi Boms 950165ba70 Azure Module for Retrieving Facts for Record Sets (#28805)
* create new module for record set facts

added new module to get facts for dns zone record sets

* use variable for domain name

* correct lint error

* add nondeterministic piece to name

* fix azure_rm_dnsrecordset_facts examples
7 years ago
Julien Stroheker 0f76a1d16f Fixing Fails in CI Tests (#28804) 7 years ago
jhawkesworth 8f9b885113 Windows: A module for creating Toast notifications on Modern Windows versions. (#26675)
* replace duff commit version of win_toast

* change expire_mins to expire_secs and add example showing use of async

* fix metadata version to keep sanity --test validate-modules happy

* code review fixes and change expire_secs to expire_seconds

* add first pass integration tests for win_toast

* win_toast no longer fails if there are no logged in users to notify (it sets a toast_sent false if this happens)

* yaml lint clean up of setup.yml in win_toast integration tests

* improve exception and stack trace if the notifier cannot be created, following feedback from dag

* removed unwanted 'echo' input parameters from return vals; added to CHANGELOG.md, removed _seconds units from module params; updated tests to match
7 years ago
Julien Stroheker d9ee3c09ca Adding check_state support and warning
lint

Update integration test

handle check_mode
handle warnings

Removing the empty tags check

Updating author handle

To use github handle

Changing from warn to fail

disabled tests
7 years ago
Matt Clay 472d3c3c86 Disable flakey azure_rm_loadbalancer test in CI. 7 years ago
Bruno 4c36286779 Azure managed disks module (#28424)
* First version of managed disks: Multiple methods for creating, one get and one delete

* My name is too cool to be there

* Passing pep8 test

* Create and delete empty working

* Module for testing, lacks sense of setting state changed for unchanged operations

* Checking that actual changes are done to update status changed

* First version of the integration test

* Adding the dictionary to translate the facts, without using serializer

* Adding the serializer to managed disk

* Using native serializer in managed disks facts

* Added DiskSku to pass the whole class to the disk instead of a string

* Bumping version

* Passing sanity checks

* Aparently they Id is not returned by the serilizer

* Integration test

* Latest version

* Using my own serializer, the one in commons is not working for me

* Managed disks module support for ansible

* Updating my github account username in the file

* Sanity checks were missing  in facts and integration test

* Fixing typo in source_resource_uri and removed AzureHTTPErrors

* Update tags are working now

* Integration test for tags

* Added support for tags, added check mode, corrected style
7 years ago
Sam Doran 80c00d3238 Create urlsplit filter (#28537)
* Improve tests for uri filter

* Create URL Split docs

* Add urlsplit filter

* Py3 compatibility

* Use helper method and eliminate query options

* Add options, cleanup output, fix tests

* Update docs

* Add parenthesis to boilerplate import

* Add debug task to tests

* Use exclude option to filter returned values

* Filter out additional option for Python 3
7 years ago
Thomas Stringer 40b7dffea8 Azure load balancer support (#26099)
* (wip) add partial loadbalancer module

* (wip) add ability to use a public ip for a load balancer

* fix shebang

* add backend address pool to load balancer

* remove unncessary error variable

* add probe support to load balancer

* add ability to add load distribution rule to load balancer

* add nat pool functionality to azure load balancer

* fix pep8 errors from sanity check

* add documentation for load balancer

* refactor imports

* fix license header copyright

* add facts module for azure load balancer

* fix ansible-test failures

* add integration tests for load balancer

* fix metadata version

* add complex integration test to azure_rm_loadbalancer
7 years ago
Liran Nisanov 0d9f9a246f Adds win_pagefile module (#25605)
* Adds win_pagefile module

* Fixed win_pagefile doc

* Fix win_pagefile doc

* Fix win_pagefile doc variable convention

* Added check_mode

* Changed win_pagefile module&doc to the convention

* added win_pagefile integration tests

* Changed check_mode blocks to whatif, fixed a bug

* Added whatif to set-wmiinstance, changed docs

Added whatif in Set-WMIInstance
Added dots to end of decription lines

* Returns to original state at the end, more tests

Added override and no override integration tests
Pagefiles now return to same state as before at the end of the integration test

* Remove extra line

* Added test_path var to win_pagefile

* Set test_path as 'no' in integration

* Added unit to docs and enclosed exception message

* More granular try-catch blocks

* Added workaround to avoid value out of range

* Deleted wrong line ending

* Changed license to one-line

* Removed space in line ending

* Try to fix python2.6 error

* Try 2 to fix python2.6 error

* Add separating line again
7 years ago
Sertaç Özercan 2ea017a794 Azure Virtual Machine Scale Set support (azure_rm_virtualmachine_scaleset) (#28381)
* initial virtual machine scaleset implementation

* added docs

* fixed formatting

* added update feature for os disk caching and capacity

* add tier

* added return

* add integration tests

* add vmss facts

* add data disk support

* added data disks docs

* update integration test
7 years ago
jacky.chen 75998d3ca3 [cloud] Add the ability to modify shard count to kinesis_stream module (#24805)
* Add the ability to modify shard count to kinesis_stream module

* Fixed an issue in kinesis_stream where update() reports not changed when it is changed

* Remove unreachable message and make the try and catch block shorter
7 years ago
Mike Wiebe d9fc3def94 Fixes #28779 eth_mode key error (#28782)
* Fixes #28779 eth_mode key error

* Remove unused get_config references

* Addressed PR comment
7 years ago
Julien Stroheker 6b7e38555c Azure Availability Set facts module (azure_rm_availabilityset_facts) (#28378)
* Adding facts module and Int. Tests

* register results

* Upgrading metadata version

* Updating author handle

To use Github handle
7 years ago
nwsparks 61335a42c2 added windows module win_power_plan with integration test (#27966)
* added windows module win_power_plan with integration test

integration testing updated to handle skipping 2008 while testing that
module provides helpful error

* minor docs fix

* my fault, too many spaces
7 years ago
Artem Zinenko 06fadefbdc [18807] win_firewall_rule module uses HNetCfg.FwPolicy2 COM Object (#27381)
* #18807 win_firewall_rule uses HNetCfg.FwPolicy2 COM object

* Added missing tests

* Added support for InterfaceTypes property

* Added support for EdgeTraversalOptions property

* Added SecureFlags property

* Port ranges are not possible in W2K8

* Added windows version checks

* Fixed doc: removed 'force' option and all notes

* Fixed copirights and docs
7 years ago
Nathaniel Case 64dac346c9 Fix nxos_pim_interface dr-priority handling (#28472)
* Fix nxos_pim_interface dr-priority handling

* Prefer execute_show over `| json`

* Mock get_config

* Fix sparse-mode detection
7 years ago
Sertaç Özercan 392eeabddb Azure Virtual Machine Extension module (azure_rm_virtualmachine_extension) (#28128)
* added azure vm extensions support

* added auto_update_minor_version and protected_settings

* update docs

* added get_poller_result

* fixed test failures

* remove tags and check mode

* Include Integration Tests

Include Integration Test for azure_rm_virtualmachine_extensions.py

* Correct location for integration test files
7 years ago
Ozi Boms ddbdf0fd5d Record set module (#28423)
* Record set module

New module to manage DNS Record sets

* fix pylint issue

* fixed problem with commas

* fixed pep issue
7 years ago
Ozi Boms 9822db610b Azure DNS Zone Module (azure_rm_dnszone) (#28418)
* New module for dns zone

Added new module and intergration tests for them

* fixed sanity issues

not importing specific moduels/classes; fixed now
7 years ago
Brian Coca aec1dfd1fa fix improt order to actually skip when no boto 7 years ago
Sam Doran b4342d2ea4 Add verbosity option to debug statement 7 years ago
Martin Krizek 98b19f0623 yum: fix changed in group remove 7 years ago
rahushen 2cf836772d Add passive_interface property to nxos_ospf_vrf module (#28288)
* add passive_interface property to nxos_ospf_vrf module

* Add version_added for
7 years ago
Jacob McGill 1c4fe510d0 IOS Ping: Add new module to support ping tests from IOS devices (#28557)
* IOS Ping: Add new module to support ping tests from IOS devices

* Add tests

* Add fixtures for ios_ping
7 years ago
Ricardo Carrillo Cruz 9a3f5bf1fc Set NXAPI port to 8080 (#28773) 7 years ago
Trishna Guha edca4f426f Revert "fix nxapi nxos tests" (#28763)
* Revert "Fix leading slashes being stripped from mount src (#24013)"

This reverts commit 3251aecd95.

* Revert "Convert value of port and timeout in provider to integer (#28732)"

This reverts commit a914a39975.

* Revert "fix nxapi nxos tests (#28762)"

This reverts commit 4137169b21.
7 years ago
Kai 3251aecd95 Fix leading slashes being stripped from mount src (#24013)
* Tidy mount module for testing

Fix spelling mistakes in comments. I *think* the example for omitting parents
root has the wrong parent ID.

Make mountinfo file a parameter for testing.

* Don't strip leading slash from mounts

The current code does not follow the example, it produces src=tmp/aaa instead
of src=/tmp/aaa. This causes problems with bind mounts under /rootfs.

* Use dictionary to store mounts by ID

Instead of looping over each one to check if the ID matches. This does not
preserve the order of the output on < Python3.6, but that is not necessary.

* Make linux_mounts a dict

Always accessed by 'dst', so avoid looping by just making it a key.

* Add test case for get_linux_mounts
7 years ago
Trishna Guha 4137169b21 fix nxapi nxos tests (#28762)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Ricardo Carrillo Cruz 549ef0f45d Change inventory_hostname to ansible_ssh_host on nxos group_vars (#28752)
We need to use IP address, as inventory_hostname returns an UUID from
openstack.py inventory in our CI.
Also, commenting the username/pass as we set them in the inventory (we shall
change this in the future).
7 years ago
Dag Wieers 61d2201a2d win_get_url: Add use_proxy, headers and timeout (#26612)
* win_get_url: Add use_proxy, headers and timeout

This PR includes:
- Add use_proxy parameter
- Add timeout parameter
- Add headers parameter
- Simplify logic
- Create separate CheckModified-File
- Now use -LiteralPath instead of -Path
- Clean up documentation

* win_get_url: Add use_proxy, headers and timeout

This PR includes:
- Add use_proxy parameter
- Add timeout parameter
- Add headers parameter
- Simplify logic
- Create separate CheckModified-File
- Now use -LiteralPath instead of -Path
- Clean up documentation
7 years ago
Jordan Borean a695f30411 Added powershell SID utils for shared common code (#27091)
* Added powershell SID utils for shared common code

* rebased from upstream and fixed up module util after change
7 years ago
Jordan Borean adabefd016 win_package: rewrite, check mode, tests, more check options (#27470)
* rewrite of win_package to enable win_msi deprecation

* fix some minor doc issues

* Removed exe tests

* dag's changes seem to be missing, re-add them

* fixed yaml for return values
7 years ago
Artem Zinenko 1c958af88b [28017] Integration tests for win_rabbitmq_plugin (#28118)
* Check registry to find RabbitMQ installation path

* Integration tests for win_rabbitmq_plugin

* Added himself to BOTMETA.yml

* Skipped running tests on Windows 2008 SP2
7 years ago
pari- 468e71bf71 npm: fix idempotence (#22238)
* npm: fix idempotence

* Better idempotency fix

More intelligently add --production rather than depending on hard coded order in args list
Cleanup boilderplate imports and license
PEP8 fixes
7 years ago
Brian Coca f9b3f4f934 make groups magic var dependant on inventory (#28677)
* make groups magic var dependant on inventory

it was overtly restricted by 'host'
minor fixes to test_var_manager.py, need to test other values also

* pepe hates extra blank line
7 years ago
Nathaniel Case 862cde5e82 [WIP] Fix nxos_banner (#28607)
* Fix `'state': 'absent'`

* Replace idempotence tests with references

* Fix issues with nxos_banner
7 years ago
Michael De La Rue fbec5ab12d [cloud] new module lambda_policy (PR #24951)
- Fixes to lambda
- reformatting + tests for lambda_facts
- lambda module integration test
- switch lambda and lambda_facts to AnsibleAwsModule
- Get the account ID from STS, GetUser, and finally error message
7 years ago
Mike Wiebe 3d46258cff Refactor/fix nxos_nxapi to use show run (#28675)
* Refactor/fix nxos_nxapi to use show run

* Fix unit tests

* Python 3 compatibility
7 years ago
Reid Wahl 6510ed3587 Fixes #28540: Corrected ansible_host value for facthost[0:20] from 1270.0.0.1 to 127.0.0.1 (#28541) 7 years ago
Reid Wahl bf7976517d Fixes #28542: Standardize assert test defaults to match their comparison values (#28543) 7 years ago
Will Thames 63df0adc17 [cloud] Update RDS parameter group for boto3 (#25345)
* Update RDS parameter group for boto3

* Update to boto3
* Update to latest ansible standards
* Remove choices list for valid engines (See #19221 for context)
* Allow tagging
* Return some useful information, and document that information

* Add tests for rds_param_group

* Improve testing of rds_param_group

* Add purge_tags option for rds_param_group

* Fix remaining broken rds_param_group tests

* Ensure the group name is lowercased. Fixes integration tests when run on OSX
7 years ago
Abhijeet Kasurde 3e20acbd79 Refactor code for find_host_by_cluster_datacenter (#26859)
Fix adds refactor of code for find_host_by_cluster_datacenter
API in vmware_host and vmware_resource_pool.
Also, adds strict check for cluster and datacenter object find.
Testcase for vmware_resource_pool.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Adrian Likins 1f962bd937 Fix config value type for VAULT_IDENTITY_LIST (#28678)
Was using the 'value_type' key, but didn't get updated
to the new 'type' key in merge.

Fix playbooks cli so it uses VAULT_IDENTITY_LIST as well.
7 years ago