Commit Graph

1647 Commits (4ec91491e269b1f615382de1f652e278cb704b3b)

Author SHA1 Message Date
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
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
Dag Wieers bdba5982d2 Small improvements to aci_tenant tests (#28685) 7 years ago
Matt Clay a7fd806fde Disable xml test due to memory errors in CI. 7 years ago
George Nikolopoulos 8d14f9d578 Lowercase enabled, disabled option values (#27764) 7 years ago
George Nikolopoulos c01dd6470c Add disable operation for netscaler_servicegroup (#28327) 7 years ago
George Nikolopoulos 2281a6676b Add enable, disable operation in netscaler_service (#28321) 7 years ago
David Newswanger 5dfd82e59a re-add auth tests with ansible_ssh_host (#28400) 7 years ago
Ganesh Nalawade 7d8a4b13a5 Fix junos_vlan integration test failure (#28613) 7 years ago
Dag Wieers 2634ef955a xml module: Better change detection, improved tests (#28460)
This PR includes:

- Improvements to change-detection by comparing 2 objectified XML trees
- Implement better integration tests by comparing 2 files using copy
7 years ago
René Moser 6fc8899290 test: yum: add test cases for state=latest (#28575)
* test: yum: add test with state=latest

* test: yum: extend test cases with check mode
7 years ago
Dag Wieers e7a525bd4a vmware_vswitch; Improve integration tests (#28484)
So the module was now not doing anything except adding a nic to a
vswitch. This PR adds idempotency checks, and removal checks.

We should probably add modification chacks as well, but I don't know
what the limitations are for vcsim.
7 years ago
Trishna Guha c2e41bf1ef remove net_command (#28525)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Martin Krizek 711ae03845 yum: fix reporting group changes in check_mode (#28331) 7 years ago
Jordan Borean 9b7dbc78c3 win_wait_for: added module (#26556)
* win_wait_for: added module

* Increased timeout on async task

* added more debug messages for test debug

* revert to using win_shell instead of win_command

* rebased from master and updated copyright string

* Updated metadata version

* Capitalised start of short_description

* disabled win_wait_for tests until async issues are solved
7 years ago
Brandon Davidson 2ceff476bf [cloud] support tags in ec2_group module (#22472)
* Add tags support to cloud/amazon/ec2_group

* Finish making ec2_group tag support boto3 compatible.

Add integration tests to validate that tags are working as expected.
7 years ago
tmarlok88 982e322287 java_cert role pkcs12 import (#24616)
* java_cert pkcs12 import

* documentation and formatting

* update examples

* update examples #2

* integration tests

* integration tests #2

* added aliases.txt

* renamed aliases

* bugfix

* empty it alieses
7 years ago
Mike Wiebe ec11cd2696 nxos_bgp_neighbor_af fix problem with advertise-map properties (#28413)
* Fix problem with advertise-map properties

* Change limit_to back to run all tests

* Fix unit tests

* Move advertise_map out of get_custom_value
7 years ago
David Newswanger 5df02dc288 nxos: merge nxapi/cli tests - config, bgp_neighbor, command, bgp_af (#28235)
* refactor nxos_bgp_af

* refactor nxos_bgp_neighbor

* refactor nxos_command

* refactor nxos_config

* removed accidental file
7 years ago
Yanis Guenane d4e7b045b7 Extend test coverage for openssl modules (#27548)
* openssl_privatekey: Extend test coverage

Extend the coverage of the integration test for the module
openssl_privatekey.

New tests have been added:

  * passphrase
  * idempotence
  * removal

Co-Authored-By: Pierre-Louis Bonicoli <pierre-louis.bonicoli@gmx.fr>

* openssl_publickey: Extend test coverage

Extend the coverage on the integration test for the module
openssl_publickey.

New tests have been added:

  * OpenSSH format
  * passphrase
  * idempotence
  * removal
7 years ago
David Kretch beed59f303 Fix trailing space in ec2_vol example, fix 'the the' typos (#28440)
* Fix 'the the' typos, fix 'pahting' filename typo

* Change 'the the' typos to a single 'the'.
* Change `playbook_pahting.rst` to `playbook_pathing.rst`.

* Delete trailing space in ec2_vol example

Delete the trailing space in `instance: "{{ item.id }} "`, which makes the
example fail when run because it looks for instance "i-xxxx ".
7 years ago
Ganesh Nalawade 76bcce7e72 Fix vyos integration test failure in DCI (#28429) 7 years ago
Ganesh Nalawade d7be4ae9bd Fix junos_vrf integration test failure in DCI (#28428) 7 years ago
Matt Clay 1a98962e19 Switch default cloud tests to smoketest. 7 years ago
Jordan Borean 8e40ac54dd win_copy: rewrite with new tests and functionality (#27678)
* win_copy rewrite with new tests and functionality

* minor pep fixes

* Handle UTF-8 filenames in zip

* fix for template

* when zip assemblies are not available in .net revert to old behaviour of copying one by one

* typo fix

* some more typos

* updated logic to correctly handle when new directories can be created

* removed testing file as it is not needed

* updated documentation based on PR
7 years ago
Rene Moser f6b7c1a6c1 cloudstack: cs_storage_pool: fix state handling, add tests
cs_storage_pool: rm CloudStackException dependency

cs_storage_pool: fix UnboundLocalError in check mode
local variable 'pool' referenced before assignment
7 years ago
Ganesh Nalawade c4b9dfe542 Remove default description in network DI modules (#28411) 7 years ago
Ganesh Nalawade 9ab9945cf3 iosxr modules aggregate check and other minor refactor (#28360)
*  iosxr aggregate validation
*  vyos_user, junos_user minor changes
*  Aggregated documentation
7 years ago
Toshio Kuratomi bc66faa328 Add more tests for copy/file/template with harlinks 7 years ago
Andrew Erickson 2b14fdbce3 add test for template, file, and copy with hardlinks 7 years ago
Mehran Kholdi ecfa7f696d Enforce `state='file'` in `copy` module
This was causing wrong behaviour when `prev_state` was `hard`-link,
since the `file` module tried to apply the same `state` on the new
file, causing unexpected errors.

Particularly, both `overlay` and `devicemapper` storage drivers in
docker use hardlinks to share files between layers. This causes
most ansible playbooks to fail when working with files from layers
below.
7 years ago
Julien Stroheker 0b29162b97 Azure Availability Set module (azure_rm_availabilityset) (#28353)
* Adding the module and int. tests

* upgrading metadata to 1.1
7 years ago
Adrian Likins 01c0b2f714 Handle errors in jmespath in json_query better (#22109)
* Handle errors in jmespath in json_query better

Catch any exceptions raised from jmespath and raise
an AnsibleFilterError instead.

Avoid a traceback.

Fixes #20379

* pep8
7 years ago
Ricardo Carrillo Cruz d3ecf3efb7 Remove user auth tests (#28364)
They are breaking CI, as they are SSHing with a non IP address.
Removing for now, we can think of other strategies for this later.
7 years ago
David Newswanger b818e986b6 Change network *_user modules to use configured_password to set a users password (#28187)
* WIP, update eos_user args

* refactor password for ios_user

* add eos tests, fix ios tests

* fixed password check

* refactor iosxr_user password

* fixed password arg for nxos

* [WIP] fix vyos_user password

* fix vyos tests

* update docs for net_user

* fix typo

* fix eos tests

* add warning when attempting to use password arg

* fix sanity/unit tests

* fix eos unit tests

* fix vyos_user aggregate

* fix typo in eos documentation string

* re add configured_password to vyos tests after rebase
7 years ago
David Newswanger e7a78f4328 nxos: merge nxapi/cli tests - vrf_interface, vrrp, vtp_domain, vtp_password, vtp_version, vtep (#28242)
* refactor nxos_vrf_interface

* refactor nxos_vrrp

* refactor nxos_vtp_domain

* refactor nxos_vtp_password

* refactor nxos_vtp_version

* refactor nxos_vxlan_vtep
7 years ago
David Newswanger 9556e945eb nxos: merge nxapi/cli tests - acl, acl_interface, banner, bgp (#28234)
* refactored nxos_acl

* refactor nxos_acl_interface

* refactor nxos_banner

* refactor nxos_bgp

* fix typo
7 years ago
David Newswanger 2f7f23c9ab nxos: merge nxapi/cli tests - interface, interface_ospf, logging, mtu (#28239)
* refactor nxos_interface

* refactor nxos_interface_ospf

* refactor nxos_logging

* refactor nxos_mtu
7 years ago
David Newswanger c810a62db9 nxos: merge nxapi/cli tests - ospf, portchannel, rollback, switchport (#28240)
* refactor nxos_ospf

* refactor nxos_portchannel

* refactor nxos_rollback

* refactor nxos_switchport
7 years ago
David Newswanger f2c34d51f2 nxos: merge nxapi/cli tests - system, user, vlan, vrf (#28241)
* refactor nxos_system

* refactor nxos_user

* refactor nxos_vlan

* refactor nxos_vrf
7 years ago
David Newswanger ffe51bed96 nxos: merge nxapi/cli tests - evpn_global, evpn_vni, facts, feature (#28237)
* refactor nxos_evpn_global

* refactor nxos_evpn_vni

* refactor nxos_facts

* refactor nxos_feature
7 years ago
Ricardo Carrillo Cruz 5a6f3ebed1 WIP Implement declarative intent arguments on eos_vlan (#28270)
Implement declarative intent arguments on eos_vlan
7 years ago
Trishna Guha 2e211078ce fix vyos_user aggregate (#28317)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Ganesh Nalawade 403f6db53f ios aggregate and common argument support (#28316)
*  ios aggregate spec validation
*  ios common argument for aggregate support
7 years ago
Matt Clay ff7c0019c3 Fix Azure config template. 7 years ago
Pilou 016cd0691c alternatives: handle absent link, add integration tests (#27967)
* alternatives: add integration tests

* alternatives: handle absent link (fix AttributeError)

Error occurred at least on Debian Stretch and OpenSuse 42.2:
Traceback (most recent call last):
  File "/tmp/ansible_RY6X41/ansible_module_alternatives.py", line 161, in <module>
    main()
  File "/tmp/ansible_RY6X41/ansible_module_alternatives.py", line 113, in main
    current_path = current_path_regex.search(display_output).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

update-alternatives stdout sample:
dummy - manual mode
  link best version is /usr/bin/dummy1
  link currently absent
  link dummy is /usr/bin/dummy

* alternatives: PEP 8 fixes

* alternatives: fix copyright in integration tests

* alternatives: nested loops handle more than 2 items

Thanks to Michael Scherer (@mscherer) for pointing that.

* alternatives: enable integration tests
7 years ago
Dag Wieers 665257ef18 aci_tenant: Integration tests (#28255) 7 years ago
David Newswanger a37c5e53e6 fix prompt error when deleting ios user (#28175)
* fix prompt error when deleting ios user

* placate pep8

* wrap delete user command in function

* fix python 3 unit tests
7 years ago
Trishna Guha ce3d1c6ba0 eos_user fix username param (#28114)
* eos_user fix username param

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

* Add setup eos_user test and rename username for consistency

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

* update unit test and pep8 fix

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

* pep8 fix
7 years ago
Toshio Kuratomi af2073d057 metadata 1.1
* Add network value to support_by field.
* New support_by value, certified
* Deprecate curated in favor of certified
* Add conversion from 1.0 to 1.1 to metadata-tool
* Add supported by Red Hat field to ansible-doc output
7 years ago
Dag Wieers 24b58ba109 aci_filter: Integration tests (#28256) 7 years ago
Guillaume Coré 905c25559d add stdin argument to command module
fixes #14380
7 years ago
Toshio Kuratomi 872255b791 Revert "Add 'stdin' argument to command/shell modules"
This reverts commit 393909d0cc.
Reverte so that we can maintain authorship
7 years ago
Andy Freeland 393909d0cc Add 'stdin' argument to command/shell modules
Fixes #14380 #23428
7 years ago
Sam Doran a8e4c9be7a Cause copy module to fail on empty string as source (#27975)
* Fail if an empty string is set as src for copy module

Fixes #27363

* Cleanup task formatting on copy tests

Use multi-line YAML
Add debug statements with verbosity: 1 rather than leave them in there commented out.

* Add test for empty string as source

* Do more checks in order to add more specific errors messages

Add more integration tests for the various failure scenarios.
Cleanup some syntax on existing integration test tasks.
7 years ago
saichint d69440c4ef Fix nxos_vpc issues (#28188)
* fix for nxos_vpc issues

* fix unit tests

* clean documentation
7 years ago
Adrian Likins 5739bb075f Vault secrets default vault ids list (#28190)
* Add config option for a default list of vault-ids

This is the vault-id equilivent of ANSIBLE_DEFAULT_PASSWORD_FILE
except ANSIBLE_DEFAULT_VAULT_IDENTITY_LIST is a list.
7 years ago
Jiri Tyr 1b8fe94e5a Support list for baseurl and gpgkey params in yum_repository (fixes #24948) (#24967)
* Support list for baseurl and gpgkey params in yum_repository

* Adding tests
7 years ago
Adrian Likins e287af1ac8 Vault secrets empty password (#28186)
* Better handling of empty/invalid passwords

empty password files are global error and cause an
exit. A warning is also emitted with more detail.

ie, if any of the password/secret sources provide
a bogus password (ie, empty) or fail (exception,
 ctrl-d, EOFError), we stop at the first error and exit. 

This makes behavior when entering empty password at
prompt match 2.3 (ie, an error)
7 years ago
Sam Doran 271127113f Add comment option to authorized_key (#27781)
* Add comment option to authorized_keys

* Update version_added for authorized_keys comment

* PEP8

* Include index rank in parsed_key_key

*  Properly display diff

Only display diff if specificed via settings

* Fix PEP8 test failure

Removed from legacy files since it is now properly formatted

* Cleanup integration test formatting and add test for new comment feature

* Correct version_added for new option
7 years ago
Ganesh Nalawade a12e9807ba Add intent arguments for ios and iosxr interface modules (#28018)
* Add intent arguments for ios_interface

*  Intent argument support
*  Integration test case for intent arguments

* Fix ci issue

* Add intent arguments for iosxr_interface

*  Add intent check support for iosxr_interface
*  Integration test for intent + configuration

* Fix ci failure
7 years ago
Ganesh Nalawade 38c0b581c3 Handle common argument in aggregate parameter for vyos module (#28182)
* Handle common agrument in aggregate parameter for vyos module

*  Add supoort to set parameter in aggregate to it's respctive
   top level argument if value not provided in aggregate.
*  Aggregate argument spec validation
*  Documentation for aggregate

* Fix unit test failure
7 years ago
Ganesh Nalawade 0c4706897c Fix minor issue in junos_vlan (#28218) 7 years ago
Jordan Borean f0a0e5674c win_iis_webapppool: tests, check_mode, bugfixes (#25869)
* win_iis_webapppool: Added integration testa and cleanup

* Updated docs and tests

* fixes from linter

* fixed up typo in docs
7 years ago
Andrew Saraceni b0db1a1cf6 New Module: Manage Windows event logs (win_eventlog) (#27827)
* initial commit for win_eventlog module

* remove type for retention_days in documentation
7 years ago
Andrew Saraceni bb7813f16f New Module: Write Windows event log entries (win_eventlog_entry) (#27828)
* initial commit for win_eventlog_entry module

* added test module for integration tests and minor documentation fixes
7 years ago
3onyc 554496c404 [passwordstore] Use builtin _random_password function instead of pwgen (#25843)
* [password] _random_password -> random_password and moved to util/encrypt.py
* [passwordstore] Use built-in random_password instead of pwgen utility
* [passwordstore] Add integration tests
7 years ago
saichint 9d84a4e530 fix for nxos_ospf_vrf invalid cmd and ntp errors (#27977)
* fix for nxos_ospf_vrf invalid cmd

* fix for nxos_ntp issues
7 years ago
rahushen 065c80c081 Add nxos_igmp IT (#28020) 7 years ago
rahushen b9c3329950 nxos_ip_interface: Fixes for #27170, #27172 (#27935)
* Fixes for #27170, #27172

* Add nxos_ip_interface IT tests

* For ipv6 check if ip address configured before doing a no ip address
7 years ago
Martin Krizek a01c38756d Add one more yum group integration test and clean up (#28156) 7 years ago
Ganesh Nalawade eb33cc88bd Add state intent argument in vyos interface (#28066)
* Add state intent argument in vyos interface

*  State intent argument support
*  Integration test for supported intent arguments

* Add intent testcase

* FIx ci issue
7 years ago
Ganesh Nalawade 711a6b2326 Add common aggregate arguments for junos modules (#28124)
If parameter value in aggregate is not set, fetch it's corresponding
value from top level parameters.
7 years ago
Pierre-Louis Bonicoli 022d45cb52 copy: clearer parameter values (tests) 7 years ago
Pierre-Louis Bonicoli efd17915f1 copy: clearer comments, filenames, task names (tests) 7 years ago
Pierre-Louis Bonicoli 6f47b3e9e8 copy: check non-existing one level directory too 7 years ago
Pierre-Louis Bonicoli 470989bff9 copy: check behavior related to dest creation when src is a file 7 years ago
Ganesh Nalawade 21bd7bcbb0 junos_interface intent arguments (#27947)
* junos_interface intent arguments

*  Add check for intent argument in junos_interface
*  Integration test for intent arguments

* Minor type fixes

* Add delay only if config diff is present

* add enabled configuration argument

* net_interface test case changes

* Minor doc change
7 years ago
Matt Clay 2aee9fb28a Enable Azure integration tests in CI. (#28110) 7 years ago
Adrian Likins 359ced3833 rm unused test template in template intg tests
introduced in 501fc7a248
based on my patch.
7 years ago
Matt Clay 3631163329 Clean up and migrate Azure tests. (#28103)
* Remove placeholder Azure test.
* Migrate Azure tests to ansible-test.
* Initial cleanup on remaining legacy Azure tests.
7 years ago
Toshio Kuratomi 039383d90f Fix symbolic mode usage in unarchive with zip files
Fixes #21090
7 years ago
Matt Clay caf8bbf3bd Add Azure support to ansible-test. (#28092)
* Initial Azure cloud testing support.
* Add missing Azure requirements.
* Fix test handling of setup and requirements.
* Update Azure cloud plugin.
* Add setup_azure role for integration tests.
* Update minimal Azure integration test sample.
7 years ago
Matt Clay c27ebfc368 Migrate roles from ansible/azure-testing (#28074)
* Migrate roles from ansible/azure-testing as-is.
* Fix yamllint issues.
* Remove unused binary file.
7 years ago
chriskarel 991918e9d2 Fix idempotency for Unix permissions in zip files. (#24580)
* Fix idempotency for Unix permissions in zip files.

This fix prevents the unarchive module from reporting 'changed' when a zipfile contains items with Unix permissions that differ from the system default.

* Update zip unarchive tests.

Additional tests for the unarchive module with zip files:
- Test file in zip archive with non-default permissions
- Test file added to zip archive with Windows permissions

* Additional fix for mixed win/unix archives.

  Turns out my original fix fails under some mixed archives, as setting the umask to zero can be applied to those files.  This creates a per-file umask variable, so a mix of permission types don't cause problems.

* CI Checks

CI checks for archives with:
* non default Unix permissions
* Windows permissions


* Workaround for BSD differences.

Using Zipinfo due to lack of support in BSD unzip.
Permissions handling is also different in BSD -- always applies UMASK to file permissions.

* Added checks for creating directories and SSH keys for existing users.
7 years ago
Ricardo Carrillo Cruz a5b483da16 Replace username for name in eos_user integration tests (#28067)
username param is read by eos action plugion load_provider, if present
it is set as the play context remote user.
That means if you have a play remote_user: admin it won't be used, but instead
whatever is put in the task argument username.
Changing the tests to use name fixes the issue, we may want to remove username
as valid module argument in other change.
7 years ago
Jordan Borean 5fbbf0e75a win_hotfix: new module to install Windows hotfixes (#27260)
* win_hotfix: new module to install Windows hotfixes

* revert to older module util loader style to satisfy the checks for now

* Changes from PR

* changed the test hotfix so we can run tests in shippable
7 years ago
Jordan Borean 44ed891290 win_mapped_drive: new module (#27020)
* win_mapped_drive: new module

* Rebased from upstream and updated copyright text
7 years ago
Jordan Borean e46adece48 win_user_right: add module with tests (#26276)
* win_user_right: add module with tests

* fixed up name of module in docs

* forgot the test module

* fixed up whitespace

* changes made to win_user_right based on feedback

* moved away from using secedit to Win32 with P/Invoke

* tidied up copyright for documentation
7 years ago
Ricardo Carrillo Cruz e8f1c1511c Implement purge on eos_vrf (#28013) 7 years ago
Martin Krizek 1c4e491eac yum: do not hide yum's errors (#27696) 7 years ago
David Newswanger a3ad614759 ignore failures when trying to remove interfaces that are already missing using nxos_config (#28003) 7 years ago
Ricardo Carrillo Cruz 87757ca385 Remove eos group_vars creds and increase eapi timeout (#28008)
We don't need provider creds as we set those at inventory group vars,
increasing eapi timeout as some eapi tests are flip flopping with
timeouts.
7 years ago
Valentin Krasontovitsch cfff72e9db Use apt-get as fallback for apt upgrade
In answer to #2540, `aptitude` was introduced as tool of choice for running
upgrades in the apt module and installing new packages that arise as
dependencies during upgrades.

This recently lead to problems, as for example Ubuntu Xenial (16.04) ships
without aptitude (installed).

Studying the man pages of both apt-get and aptitude, it appears that we can
achieve the effects of `aptitude safe-upgrade` using

```
apt-get upgrade --with-new-pkgs --autoremove
```

while `aptitude full-upgrade` seems to be identical to `apt-get dist-upgrade`.

We use `apt-get` as described above as a fall-back in case that `aptitude`
cannot be found, issuing a warning when it does so.

Furthermore it introduces a flag `force_apt_get` which may be used to enforce
usage of apt-get (which does not issue a warning).

The integration tests are updated accordingly.

Cf. also the discussion in #27370.

Fixes #18987
7 years ago
rahushen 85fc4c67ef Add integration tests for nxos_facts, nxos_bgp, nxos_bgp_af, nxos_bgp_neighbor, and nxos_evpn_global (#26924)
* Add new ITs for nxos_bgp, nxos_bgp_af, nxos_bgp_neighbor, and nxos_evpn_global

* Add nxos_facts IT and enhance existing tests

* switch nxos_feature tests to use bgp

* misc. test fixes

* Add checks for titanium in IT

* Handle non-titanium case in tests
7 years ago
Ricardo Carrillo Cruz 7e2169f6d5 Add aggregate functionality to eos_vrf (#27915)
* Add aggregate functionality to eos_vrf

* Add tests for eos_vrf aggregate option

* Remove test2 and test3 vrfs at the beginning of the eos_vrf tests

* Pull all vrfs

With aggregate, we need to get all VRFs and we then compare with
desired VRFs, instead of assuming it will be just one.
7 years ago
Philippe Dellaert 920cd7bb1c New module: Waiting for VMware tools to become available (#27236)
* Adding VMware tools module
Functionality: Waits for VMware tools to become available (running
state)

* Adding base integration test preparations
Until govcsim supports actual guest tool status, the tests are disabled

* Cleanup and better getvm method

* Updating Changelog

* Adding required metaclass and future import

* Rename to vmware_guest_tools_wait

* Cleanup of documentation

* Fixing review remarks
7 years ago
Zac Medico 501fc7a248 template: fix KeyError: 'undefined variable: 0 (#27972)
* template: fix KeyError: 'undefined variable: 0

For compatibility with the Context.get_all() implementation
in jinja 2.9, make AnsibleJ2Vars implement collections.Mapping.
Also, make AnsibleJ2Template.newcontext() handle dict type
for the 'vars' parameter.

See: d67f0fd4cc
Fixes: https://github.com/ansible/ansible/issues/20494

* add units/template/test_vars

* intg tests for jinja-2.9 issues like 20494

test cases here are based on
https://github.com/ansible/ansible/issues/20494#issue-202108318
7 years ago
David Moreau-Simard b35c749268 Add a sensu_client module
This provides a sensu_client module in order to be able to dynamically
configure a Sensu client.

It takes a different approach than the existing Sensu modules such as
sensu_check but is hopefully a much more flexible and simple way of
handling configurations.
7 years ago
David Moreau-Simard 7a56e5d45d Add sensu_handler Ansible module
This provides a sensu_handler module in order to be able to dynamically
configure a Sensu handler.
7 years ago
Colin Nolan db50650365 Adds support for all Consul 0.8 ACL rule scopes (#25800)
* Added in support for 'agent' and 'node' types.

* Tidies and moves `consul_acl` module closer to PEP8 compliance.

* Switched from using byspoke code to handle py2/3 string issues to using `to_text`.

* Made changes suggested by jrandall in https://github.com/ansible/ansible/pull/23467#pullrequestreview-34021967.

* Refactored consul_acl to support scopes with no pattern (and therefore a different HCL defintion).

* Corrects whitespace in Consul ACL HCL representation.

* Fixes Consul ACL to return the HCL equivalent JSON (according to the Consul docs) for the set ACLs.

* Repositioned import to align with Ansible standard (!= PEP8 standard).

* Adds Python 2.6 compatibility.

* Fixes PEP8 issues.

* Removes consul_acl.py as it now passes PEP8.

* Follows advice in the "Documenting Your Module" guide and moves imports up from the bottom.

* Tidies consul_acl module documentation.

* Updates link to guide about Consul ACLs.

* Removes new line spaces from error message string.

* Provide better error message if user forgets to associate a value to a Consul ACL rule.

* Minor refactoring of Consul ACL module.

* Fixes bug that was breaking idempotence in Consul ACL module.

* Detects redefinition of same rule.

* Adds test to check the Consul ACL module can set rules for all supported scopes.

* Fixes return when updating an ACL.

* Clean up of Consul ACL integration test file.

* Verify correct changes to existing Consul ACL rule.

* Adds tests for idempotence.

* Splits Consul ACL tests into cohesive modules.

* Adds test for deleting Consul ACLs.

* Test that Consul ACL module can set all rule scopes.

* Fixes issues surrounding the creation of ACLs.

Thanks for the comments by manos in https://github.com/ansible/ansible/pull/25800#issuecomment-310137889.

* Stops Consul ACL's name being "forgotten" if ACL updated by token.

* Fixes incorrect assignment when a Consul ACL is deleted.

* Fixes value of `changed` when Consul ACL is removed.

* Fixes tests for Consul ACL.

* Adds interal documentation.

* Refactors to separate update and create (also makes it possible to unit test this module).

* Improves documentation.

* Completes RETURN documentation for Consul ACL module.

* Fixes issue with equality checking for `None` in ACL Consul.

* Fixes Python 2 issue with making a decision based on `str` type.

* Fixes inequality check bug in Python 2.

* Adds tests for setting ACL with token.

* Adds support for creating an ACL with a given token.

* Outputs operation performed on Consul ACL when changed.

* Fixs issue with test for creating a Consul ACL with rules.

* Corrects property used to set ACL token in python-consul library.

* Fixes tear-down issue in test that creates a Consul ACL using a token.
7 years ago
saichint 14186af558 Fix for nxos_ospf idempotent issue (#27913) 7 years ago
Ricardo Carrillo Cruz 9f26b853e8 Remove vyos_facts neighbors integration tests (#27957)
The tests rely on setting the lldp IP on the management interface.
However, the IP discovered is the private IP of the node, and tests
require accessing it via Nodepool node public IP.
Removing that test for now to get CI green again, we'll reasses once we
release 2.4.
7 years ago
Trishna Guha a005ca035d remove replace config test (#27953)
remove replace config eos_config test
7 years ago
Ricardo Carrillo Cruz 0f77afbd60 Change play timeout for persistent connection command timeout (#27948)
There's been a change in persistent connect framework that switches
playbook timeout (which corresponds to 'timeout' param) to command_timeout.
While we fix this and return the functionality, let's put the command_timeout
in place to avoid CI being red.
7 years ago
Ganesh Nalawade c05b303db5 junos lldp interface test fix (#27946) 7 years ago
Trishna Guha dd8b65395f fix eos failed tests (#27945)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Dag Wieers 6874ba23ff New module: Support manipulating XML files (#25323)
* Import original unmodified upstream version

This is another attempt to get the xml module upstream.
https://github.com/cmprescott/ansible-xml/

This is the original file from upstream,
without commit 1e7a3f6b6e2bc01aa9cebfd80ac5cd4555032774

* Add additional changes required for upstreaming

This PR includes the following changes:

- Clean up of DOCUMENTATION
- Rename "ensure" parameter to "state" parameter (kept alias)
- Added EXAMPLES
- Remove explicit type-case using str() for formatting
- Clean up AnsibleModule parameter handling
- Retained Python 2.4 compatibility
- PEP8 compliancy
- Various fixes as suggested by abadger during first review

This fixes cmprescott/ansible-xml#108

* Added original integration tests

There is some room for improvement wrt. idempotency and check-mode
testing.

* Some tests depend on lxml v3.0alpha1 or higher

We are now expecting lxml v2.3.0 or higher.
We skips tests if lxml is too old.

Plus small fix.

* Relicense to GPLv3+ header

All past contributors have agreed to relicense this module to GPLv2+, and GPLv3 specifically.

See: https://github.com/cmprescott/ansible-xml/issues/113

This fixes cmprescott/ansible-xml#73

* Fix small typo in integration tests

* Python 3 support

This PR also includes:
- Python 3 support
- Documentation fixes
- Check-mode fixes and improvements
- Bugfix in check-mode support
- Always return xmlstring, even if there's no change
- Check for lxml 2.3.0 or newer

* Add return values

* Various fixes after review
7 years ago
schwatvogel b8d371ca8b Fixes #23558 rpm key ids (#27847)
* Changed rpm-keyid extraction and verification method
* minor style fixes
* fixed rpm key deletion,added integration test for mono key,fixed wording in integration tests
7 years ago
saichint babec35faa Fix nxos_vtp_password and nxos_vrf_interface for remove idempotency tests (#27724)
* fixes for 27600 27676

* add sanity tests
7 years ago
David Newswanger b985c34dd4 added integration tests for vyos_facts (#26748)
* broke vyos facts into two files

* list vyos facts when failing

* dynamically determine ip

* broke up assert
7 years ago
Abhijeet Kasurde e244deedbd Add wait for vcsim to come online (#27887)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Mike Wiebe 65cf31e1ce Fix nxos_interface_ospf idempotence issue (#27783)
* Add tests and fix 27167

* Add modify test
7 years ago
Dag Wieers 3a86579b69 vcenter_license: New module to manage vCenter licenses (#25143)
This module supports check-mode and diff output.
It also includes basic integration tests.

This PR fixes #24971
7 years ago
Jordan Borean 0b69f3e40d win_stat: removed file in use test as it is too tempormental (#27832) 7 years ago
Jordan Borean 107e177658 win_stat: add explicit error message when file is in use (#27826)
* win_stat: add explicit error message when file is in use

* make the lock last a bit longer
7 years ago
Ricardo Carrillo Cruz 0343ac1a9d Fix asserts of junos_command netconf_json notequal and lessthanorequal (#27818) 7 years ago
Ricardo Carrillo Cruz 99e92f4bca Fix junos_command netconf_json lessthanorequal (#27808) 7 years ago
Ricardo Carrillo Cruz 0e4cbb4bf1 Remove inventory_hostname assert on junos_command netconf_text contains (#27807)
CI nodes have UUIDs as hostnames, not Ansible inventory hostnames.
7 years ago
Ricardo Carrillo Cruz 6a6bcb6749 Fix junos_command netconf_xml notequal asserts (#27806) 7 years ago
Ricardo Carrillo Cruz 2ad56c0700 Add a timeout to force socket creation on re-setting netconf port (#27801) 7 years ago
René Moser fdaa803cca cloudstack: cs_vmsnapshot: fix pep8 (#27792) 7 years ago
René Moser f1ef61da4e cloudstack: cs_domain: tests: add update tests (#27791) 7 years ago
Matt Clay c59e32469f Add Fedora Python 3 Docker images and fix tests. (#27794)
* Add new Fedora docker images with Python 3.
* Use consistent env var for lookup test.
* Fix testing of virtualenv with Python 3.
* Fix docker_secret tests on Fedora 26.
* Add Python 3 support to Fedora postgresql test.
* Add Python 3 support to Fedora mysql tests.
* Fix uri test server for Python 3 on Fedora.
* Fix iso_extract test for Python 3 on Fedora.
* Add Python 3 support for Fedora to openssl tests.
* Fix dnf group test for Python 3 on Fedora.
* Use force with user deletion in become test.
7 years ago
Matt Clay bf17cb6edd Test iso_extract on OS X. 7 years ago
Ganesh Nalawade 634327c5f6 Fix ios_fact integration test issue (#27771)
Fixes #27563
7 years ago
Ganesh Nalawade 02bcd7c0ed Fix for junos_netconf test failures in dci (#27776) 7 years ago
Dag Wieers 25e67d804c iso_extract: Reimplement using 7zip (not requiring root) (#24937)
* Reimplement iso_extract using 7zip (not requiring root)

So one of the drawbacks of the original implementation is that it required root for mounting/unmount the ISO image.
This is now no longer needed as we use 7zip for extracting files from the ISO.

* Fall back to using mount/umount if 7zip not found

As discussed with others.

Also improved integration tests.
7 years ago
Ricardo Carrillo Cruz 8e9fe76434 Replace mtu for for local-index on junos_command lessthan (#27772) 7 years ago
Ganesh Nalawade 0f261964f7 Make junos integration test checks platform independent (#27768) 7 years ago
Ganesh Nalawade 3c09f69765 change netconf test port from 8080 to 22 (#27761) 7 years ago
Ganesh Nalawade 181b31e282 junos integration test fixes for dci (#27759) 7 years ago
René Moser 5700b09610 cloudstack: new module cs_instance_nic_secondaryip, replaces cs_nic (#26491) 7 years ago
Ricardo Carrillo Cruz c4c99d66fc Replace fxp0 for lo0 on junos_command equal and notequal tests (#27758)
The nodes in the CI do not use fxp nomenclature, but em.
Use lo0, as that's common for nodes in our CI and our test lab.
7 years ago
Ricardo Carrillo Cruz 19b1361184 Remove assert that junos command xml contains inventory_hostname_short (#27754)
The test assumes the node has the hostname set as the inventory_hostname_short.
That's not the case in our CI, we the inventory_hostname is a UUID, returned
by the openstack dynamic inventory.
7 years ago
Ricardo Carrillo Cruz 623235857f Change tx delay to 2 on the rest of junos_lldp tests (#27753) 7 years ago
Ricardo Carrillo Cruz 3acd192843 Fix assert on junos_lldp tx delay (#27752) 7 years ago
Ricardo Carrillo Cruz a904f9c047 Change the transmit delay on junos_lldp test (#27750)
We are getting this error message:
"Advertisement-interval should be greater than or equal to four times the tx-delay".
Changing transmit delay to 2 meets that constraint.
7 years ago
Ganesh Nalawade d3e5d30f7c Add aggregate for junos modules and sub spec validation (#27726)
* Add aggregate for junos modules and sub spec validation

*  aggregate support of junos modules
*  aggregate sub spec validation
*  relevant changes to junos integration test
*  junos module boilerplate changes

* Add new boilerplate for junos modules

* Fix CI issues
7 years ago
George Nikolopoulos 31b4ae2e6a New module: manage Citrix Netscaler GSLB site configuration (network/netscaler/netscaler_gslb_site) (#27639)
* Add netscaler_gslb_site

* Lowercase enabled, disabled option values

* Add fixes in netscaler module utils needed for unit test success
7 years ago