Commit Graph

5586 Commits (6d38167d49eb41c67d0b58061b8555cf7255705f)

Author SHA1 Message Date
Nilashish Chakraborty 18235af363
Fix baud rate and nxos_logging default case idempotency bug (#43295)
* Fix baud rate and idempotency bug

* Fix Shippable errors

* Combine commands calls

* Fix Shippable errors II
6 years ago
Matt Clay 72f1a6cc1f Fix bug preventing coverage of setup module. 6 years ago
Julien Champseix 19dc267e4c Allow specifying the output encoding in the template module (#42171)
Allow specifying the source and destination files' encodings in the template module

* Added output_encoding to the template module, default to utf-8
* Added documentation for the new variables
* Leveraged the encoding argument on to_text() and to_bytes() to keep the implementation as simple as possible
* Added integration tests with files in utf-8 and windows-1252 encodings, testing all combinations
* fix bad smell test by excluding windows-1252 files from the utf8 checks
* fix bad smell test by excluding valid files from the smart quote test
6 years ago
Toshio Kuratomi 5b4a7cc283 Fix journald unittests
d7df072b96 changed how we call
journal.send() from positional arguments to keyword arguments.  So we
need to update the test to check for the arguments it was called with in
the keyword args, not in the positional args.
6 years ago
saichint fa5f396a4b nxos_file_copy enhancement (#42424)
* add file_pull option

* typo correction

* fix shippable error

* review comments

* fix for review comments by mwiebe

* possible shippable fix

* remove file_copy from ignore

* more review comments addressed

* review comments

* add localhost for remote scp server in tests

* timeout fix
6 years ago
mjmayer a488b3a8ed elb_application_lb purge rules option (#43113)
* Add parameter to keep elb rules

Does not purge elb rules. This is usefull if running the elb_application_lb
 role and there is the desire to keep existing rules.

* Change variable name keep_rules to purge_rules

The descriptor purge has been used in the past.

* Changed default for purge_rules

Default is purge_rules. This is how the module has functioned previously. This change maintains
 the previous behavior.

* Add integration test for purge_rules flag

* Change wording of test task

* Fix merge conflcit

* Changed default for purge_rules

Default is purge_rules. This is how the module has functioned previously. This change maintains
 the previous behavior.

* merge conflcit

* Change wording of test task

* Add purge_rules option to test

* Change test description wording

* Expand purge_rules documentation

* Clarifies documentation for purge_rules option
6 years ago
Jordan Borean 2c9cbae3f9
Removed deprecated Windows items slated for removed in 2.7 (#43231) 6 years ago
tomelrod 5eb47066e3 Documentation change for resizefs (#43224)
* Documentation change for resizefs

Changed documentation to match the default value of resizefs set in the code.
Added a note on the resizefs use on the example utilizing it.

* Remove test now it validates fine
6 years ago
Adam Miller 85fedf9fcf
make sure to get correct python version for rpmfluff in setup_rpm_repo (#43228)
* make sure to get correct python version for rpmfluff in setup_rpm_repo

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Dag Wieers 939de473c6
Add a 'finished' test for async jobs (#38325)
This provides a more convenient way for testing (async) jobs.

When used with a non-async job it will report a warning so the user is
aware that he may be doing something incorrect.

Since the 'finished' result value is an integer (!), the test is turning
this in a proper boolean.
6 years ago
Andreas Olsson 611928b658 Fix cloudflare_dns legacy test 6 years ago
Gregory Hellings 6f007c35c1 Improved the documentation of known_hosts
The documentation for the key parameter was lacking in specificity and
also lacking in testing. These parts are both remedied herein.

Fixes #43157
6 years ago
Brian Coca cdc762dd9e
don't assume all delegation subkeys exist (#43032)
* don't assume all delegation subkeys exist

fixes #43026

* add tests
6 years ago
Deepak Agrawal bf544c2200
Add support for commit label in iosxr_config (#42931)
* Add support for commit label in iosxr_config

* sanity pep8 etc fixes
6 years ago
Matt Clay 4e489d1be8
Update Shippable integration test groups. (#43118)
* Update Shippable integration test groups.
* Update integration test group aliases.
* Rebalance AWS and Azure tests with extra group.
* Rebalance Windows tests with another group.
6 years ago
Jordan Borean 04431216e7
win_user: use different method to validate credentials that does not rely on SMB/RPC (#43059)
* win_user: use different method to validate credentials that does not rely on SMB/RPC

* Use Add-Type as SetLastError on .net reflection not working on 2012 R2
6 years ago
Jordan Borean 48ad90ac8e
powershell: support recursive requires statements (#43143) 6 years ago
Jordan Borean 93c05074ee
win_chocolatey: refactor module to fix bugs and add new features (#43013)
* win_chocolatey: refactor module to fix bugs and add new features

* Fix some typos and only emit install warning not in check mode

* Fixes when testing out installing chocolatey from a server

* Added changelog fragment
6 years ago
Matt Clay 547f11ad8f Fix win_reboot test and mark win_uri unstable. 6 years ago
Adam Miller 562ff66a98 Fix pkg_mgr_name fact finding for Fedora (#40922)
* Properly handle default package manager vs apt

For distros where apt might be installed but is not the default
package manager for the distro, properly identify the default distro
package manager during fact finding and re-use fact finding from
DistributionFactCollector and instead of reimplementing small
portions of it in PkgMgrFactCollector

Add unit test to always check the apt + Fedora combination to test
the new code.

Fixes #34014

Signed-off-by: Adam Miller <admiller@redhat.com>

* remove q debugging output I accidentally left behind

Signed-off-by: Adam Miller <admiller@redhat.com>

* add os_family to the conditional so we're only hitting that code path when needed

Signed-off-by: Adam Miller <admiller@redhat.com>

* setup for a _check* pattern for general os_family group pkg_mgr checking

Signed-off-by: Adam Miller <admiller@redhat.com>

* use Mock.patch decorator for os.path.exists in TestPkgMgrFactsAptFedora

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Yunge Zhu 40fbee6369 Fix azure_rm_keyvaultkey/azure_rm_keyvaultsecret bugs (#41683)
* fix keyvault tests

* missing keyvault requirement

* fix keyvault auth bug

* apply fix in secret

* fix lint

* enable keyvault key and secret tests

* add azure service principal object_id lookup plugin

* fix lint

* add dependency in integration test

* fix bug

* put azure sp lookup plugin into test

* fix lint

* move lookup plugin

* repath lookup plugin

* repath lookup plugin

* repath files

* put az sp lookup plugin to lookup_plugins folder
6 years ago
Jordan Borean 64f5f9c2f9
win_acl: fix recent bug and add basic tests (#43054) 6 years ago
Jordan Borean 35f6bbf18b
win_wait_for: add a bit more stability to the tests (#43114) 6 years ago
Abhijeet Kasurde b02e0c07d8
dnsimple: refactor dnsimple module (#42548)
* Update dnsimple-python minimum version to 1.0.0 as it supports API v2 and API v1 is deprecated.
* Update examples.
* Update documentation.

Fixes: #42495

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Yanis Guenane b1c60eaa83 Vultr: Introducing vr_startup_script_facts module (#43004)
This commit introduces a new module called vr_startup_script_facts.

This module aims to return the list of startup scripts avaiable
avaiable in Vultr.

Sample available here:

```
"vultr_startup_script_facts": [
  {
    "date_created": "2018-07-19 08:52:55",
    "date_modified": "2018-07-19 08:52:55",
    "id": 327140,
    "name": "myteststartupscript",
    "script": "#!/bin/bash\necho Hello World > /root/hello",
    "type": "boot"
  }
]
```
6 years ago
Andrey Laguta 2e62e36590 Fix multiple var files combining (followup to #36357) 6 years ago
Abhijeet Kasurde cadbd6ea9c
VMWare: update documentation for linked_clone (#42881)
linked_clone requires snapshot_src parameter. This fix makes them required_together
and update documentation. Also, testcase is added.

Fixes: #42349

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Ganesh Nalawade 97d4e53131
Support setting persistent command timeout per task basis (#42847)
* Support setting persistent command timeout per task basis

Fixes #42200

*  Add variable `ansible_command_timeout` to `persistent_command_timeout`
   option for `network_cli` and `netconf` connection plugin so that the
   command_timeout can be set per task basis while using `connection=network_cli`
   or `connection=netconf`
   eg:
   ```
   - name: run copy command
     ios_command:
       commands:
       - show version
     vars:
      ansible_command_timeout: 40
   ```

* Modify `ansible-connection` to read command_timeout value from
  connection plugin options.

* Add `ansible_command_timeout` to `persistent_command_timeout`
  option in `persistent` to support `connection=local` so that
  it is backward compatibilty

* To support `connection=local` pass the timeout value as variables
  from persistent connection to `ansible-connection` instead of sending
  it in playcontext

* Fix CI failure

* Fix review comment
6 years ago
Pilou 06f5e49dfb inventory plugins: add test about config API usage (#41888)
* Check get_option method works with inventory plugins

This use case is already tested by some cloud inventoty plugin but
these tests are slow and aren't always executed, hence this new quick
test.

* AnsiblePlugin: Fix typo in docstring
6 years ago
Matej Vadnjal 7c318d4e30 ios_user module - implement sshkey option (#38782)
* ios_user module - add sshkey support

* ios_user - Add version_added to sshkey option

* ios_user - pep8 indentation fixes in unit tests

* ios_user - use b64decode method that works on python 2 and 3
6 years ago
Sam Doran 0ca61e9d87
Only report change when home directory is different on FreeBSD (#42865)
* Only report change when home directory is different

Add tests with home: parameter

Have to skip macOS for now since there is a bug when specifying the home directory path for an existing user that results in a module failure. That needs to be fixed in a separate PR.
6 years ago
Will Thames 786613f426 Handle FieldLevelEncryptionId in cloudfront_distribution (#41770)
Ensure that FieldLevelEncryptionId is properly handled - passing it if
set, and keeping it if returned by GetDistribution

Update cloudfront_distribution tests to remove references to
test_identifier so test suite actually works

Fixes #40724
6 years ago
John McDonough f89d3721b4 UCS NTP Server module (#42375)
* UCS NTP Server module initial commit

* change name to ntp_server, keep name as alias for ntp_server
6 years ago
David Soper c527af58f1 ucs_storage_profile module and integration tests (#42205)
* ucs_storage_profile module and integration tests

* Remove space in doc link to fix docs-build issue.

* Added suboption documentation and argument spec supporting list suboptions.

* Various small edits
6 years ago
Yanis Guenane 1754f533b5 Vultr: Introducing vr_firewall_group_facts module (#42997)
This commit introduces a new module called vr_firewall_group_facts.

This module aims to return the list of firewall groups avaiable
avaiable in Vultr.

Sample available here:

```
"vultr_firewall_group_facts": [
  {
    "date_created": "2018-07-17 12:22:51",
    "date_modified": "2018-07-17 12:24:47",
    "description": "ansible-firewall-group",
    "id": "fb5a0876",
    "instance_count": 0,
    "max_rule_count": 50,
    "rule_count": 1
  }
]
```
6 years ago
Yanis Guenane f6ca231729 Vultr: Introducing vr_dns_domain_facts module (#42994)
This commit introduces a new module called vr_dns_domain_facts.

This module aims to return the list of DNS domains avaiable avaiable in
Vultr.

Sample available here:

```
"vultr_dns_domain_facts": [
  {
    "date_created": "2018-07-19 07:31:14",
    "domain": "ansibletest.com",
  }
]
```
6 years ago
Adam Harwell a9b1af8bdd Yum: Add support for --downloadonly (#41506) 6 years ago
Yanis Guenane 2c4ba7a9e9 Vultr: Introducing vr_user_facts module (#42951)
This commit introduces a new module called vr_user_facts.

This module aims to return the list of user avaiable avaiable in Vultr.

Sample available here:

```
"vultr_user_facts": [
  {
    "acls": [],
    "api_enabled": "yes",
    "email": "mytestuser@example.com",
    "id": "a235b4f45e87f",
    "name": "mytestuser"
  }
]
```
6 years ago
Frank Vissing 66adabfd42 disable_excludes (#42510)
* implementing disable_excludes

* add check for yum version

* limit choices

* add testcases for disable_exclude

* fix formating

* add documentation

* syntax fix for test case

* fix indentation

* need to ignore errors when we want to do a test that fails

* test disable_excludes with zip and not sos

* add tests for yum < 3.4 not supported

* fix formating

* centos 6.1 does not support map

* drop unsupported selectattr

* cleanup testcases

* fix test cases beloging to wrong test scenarion (propper when)

* evaluate expression

* minor test fixes

* check output of msg
6 years ago
Samer Deeb 3ca4a35334 Add support for global IGMP configuration on onyx switches (#42164)
* Add support for global IGMP configuration on onyx switches

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

* Add support for global IGMP configuration on onyx switches

Signed-off-by: Samer Deeb <samerd@mellanox.com>
6 years ago
Anil Kumar Muraleedharan 0897e79bd1 Persistence connection for cnos_vlan (#42500)
* Changing Lenovo Inc to Lenovo and update License file to be consistent.

* Changing cnos_vlan from paramiko to persistence connection of Ansible. Also talking care of CLI changes in CNOS commands with backward compatibility.

* Fixing Validation issues

* Trailing lines removal

* Review comments of Gundalow are getting addressed. He mentioned only at one place for cnos.py. But I have covered the entire file.

* Changes to incorporate Review comments from Qalthos

* Removing configure terminal command from module code

* Aligning with change in run_cnos_commands method changes

* Editing cliconf for latest CNOS CLIs
6 years ago
Yanis Guenane 9a1185e57c Vultr: Introducing vr_plan_facts module (#42470)
This commit introduces a new module called vr_plan_facts.

This module aims to return the list of plan avaiable avaiable to use on
booted servers.

Sample available here:

```
"vultr_plan_facts": [
  {
    "available_locations": [
      1
    ],
    "bandwidth": 40.0,
    "bandwidth_gb": 40960,
    "disk": 110,
    "id": 118,
    "name": "32768 MB RAM,110 GB SSD,40.00 TB BW",
    "plan_type": "DEDICATED",
    "price_per_month": 240.0,
    "ram": 32768,
    "vcpu_count": 8,
    "windows": false
  }
]
```
6 years ago
Yanis Guenane aef97c5ac4 Vultr: Introducing vr_os_facts module (#42473)
This commit introduces a new module called vr_os_facts.

This module aims to return the list of OSes avaiable avaiable to use to
boot servers.

Sample available here:

```
"vultr_os_facts": [
  {
    "arch": "i386",
    "family": "ubuntu",
    "id": 216,
    "name": "Ubuntu 16.04 i386",
    "windows": false
  }
]
```
6 years ago
Yanis Guenane 11fd20b5ea Vultr: Introducing vr_region_facts module (#42471)
This commit introduces a new module called vr_region_facts.

This module aims to return the list of region avaiable avaiable to use
where boot servers.

Sample available here:

```
"vultr_region_facts": [
    {
      "block_storage": false,
      "continent": "Europe",
      "country": "FR",
      "ddos_protection": true,
      "id": 24,
      "name": "Paris",
      "regioncode": "CDG",
      "state": ""
     }
  ]
```
6 years ago
Yanis Guenane 9b898ebc20 Vultr: Introducing vr_sshkey_facts module (#42615)
This commit introduces a new module called vr_sshkey_facts.

This module aims to return the list of SSH keys avaiable in Vultr.

Sample available here:

```
"vultr_sshkey_facts": [
   {
    "date_created": "2018-07-10 14:49:13",
    "id": "5b43c760d7d84",
    "name": "me@home",
    "ssh_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+ZFQv3MyjtL1BMpSA0o0gIkzLVVC711rthT29hBNeORdNowQ7FSvVWUdAbTq00U7Xzak1ANIYLJyn+0r7olsdG4XEiUR0dqgC99kbT/QhY5mLe5lpl7JUjW9ctn00hNmt+TswpatCKWPNwdeAJT2ERynZaqPobENgewrwerqewqIVew7qFeZygxsPVn36EUr2Cdq7Nb7U0XFXh3x1p0v0+MbL4tiJwPlMAGvFTKIMt+EaA+AsRIxiOo9CMk5ZuOl9pT8h5vNuEOcvS0qx4v44EAD2VOsCVCcrPNMcpuSzZP8dRTGU9wRREAWXngD0Zq9YJMH38VTxHiskoBw1NnPz me@home"
  }
]
```
6 years ago
Jordan Borean 8447f25e10
win_chocolatey_config: added module to manage Chocolatey config (#42915) 6 years ago
Jordan Borean 7ae5912d91
win_chocolatey_feature: new module (#42848)
* win_chocolatey_feature: new module

* Fixed up copyright header in PowerShell file
6 years ago
Jordan Borean 933d36b25f
win_chocolatey_source: add new module to manage Chocolatey sources (#42790)
* win_chocolatey_source: add new module to manage Chocolatey sources

* Added examples and fix diff run

* Minor fixes from review

* When editing a source, recreate with the explicit options instead of using the existing source

* Fixed up copyright header in PowerShell file
6 years ago
Dag Wieers 95a1170908 Windows: Add "special" parameter types to docs (#42853)
* Windows: Add special parameter types

Adding explicit parameter types now exposes this information in the
module documentation, and proves really helpful.

We only do this for non-string types as strings, mostly because strings
are implicit.

PS We also make copyright statements consistent and use #Requires for
explicit library imports

* Type "string" must be type "str"

* A few more Copyright corrections

* More fixes

* Don't add file encoding to Powershell files

* Don't add missing interfacetypes parameter

Otherwise CI demands an incorrect version_added

* Small fix
6 years ago
Tim Rupp 290df027e3
Adds the ipaddress compat library backport from Python 3.x (#42265)
This library is a backport (to 2.x versions of Python) of the code
that is found in the mainline versions of Python 3.x. It is being
included so that networking vendors, and others, can make use of it
without needing to add a python module dependency to their own modules.

A separate dependency would add to user burden of satisfying those
dependencies before using some Ansible modules.

In a previous core meeting, this was approved. Naming of the directory
it is found in was up for debate, but "compat" was the first directory
to have some sort of concensus.
6 years ago
Dag Wieers e899824c49
ACI: Add parameter types to module docs (#42893)
* ACI: Add parameter types to module docs

* Update validate-modules ignore list
6 years ago
Jiri Tyr 92c58e9a66 Adding namespace option into the xattr module (#42755)
* Adding namespace option into the xattr module

* Include namespace into the tests

* Make it backward compatible, remove re and operator module
6 years ago
Wojciech Sciesinski cf4e7fd70a Make the code more PowerShell compliant (#39464)
* Make the code more PowerShell compliant

* Correction of the mistaken comment

* Revert style changes to If/Else/Elseif

* Remove an ignored PSScriptAnalyzer rule due to the code correction

* Decreasing of an entropy ;-) and replacing the next to aliases

* minor whitespace changes
6 years ago
Dag Wieers 2ad234f98e
aci_ap: Ensure AP is removed before tests start (#42744) 6 years ago
Matt Martz 27b4d7ed31
Add feature to expose vars/defaults with include/import_role (#41330)
* First pass at making 'private' work on include_role, imports are always public

* Prevent dupe task execution and overwriting handlers

* New functionality will use public instead of deprecated private

* Add tests for public exposure

* Validate vars before import/include to ensure they don't expose too early

* Add porting guide docs about public argument and change to import_role

* Add additional docs about public and vars exposure to module docs

* Insert role handlers at parse time, exposing them globally
6 years ago
Sloane Hertel 2c3e6f8bd3 [elb_target_group] fix docs and add default for wait_timeout - fixes #42324 (#42477)
Add default for wait_timeout and version_added flag
6 years ago
Sloane Hertel 1fdd84b88c Rename AWS unit tests that are not running when changing the module (#42712)
now can use `ansible-test units module_name` for the aws_s3 and aws_api_gateway modules

changes to modules/cloud/amazon/aws_api_gateway and modules/cloud/amazon/aws_s3 are not triggering the unit tests; also fix aws_s3 from importing non-exist module and skipping tests

changes to module_utils/aws/core.py are only being unit tested on modules that import from the file (if they have a corresponding test) or tests that import from the file themselves.
6 years ago
jamessemai dc32842573 win_security_policy: Allow setting a value to empty (#42051)
* win_security_policy: allow removing values (resolves #40869)

* Removing warning

* Adding test for remove policy setting

* Fixing string comparison

* Make idempotent

* Adding idempotency and diff test

* added changelog fragment
6 years ago
Ryan Brown 45f5964fed Fix patching of wrong boto3_conn in API Gateway tests (#42700) 6 years ago
Clement Trebuchet 7c97bb5077 Devel ios vrf submode (#41659)
* add submode features ipv4/ipv6

* add tests for submode

* the parameters both_ * were not idempotent, in what is read in the configuration we have a list with 2 entries (import, export) while the input parameter has only one parameter which will be applied twice

* add docstring to the ios_vrf module + provide a fix for: https://github.com/ansible/ansible/issues/41581

* complete tests

* add missing description

* fix KeyError for address-family ipv*

* fix both_* tests

* fix E231, W292, W293

* fix W293

* remove set has it doesn't preserve order of routes

* fix E106

* remove ImportError: cannot import name OrderedDict

* We should be able to mix the parameters for the routes targets , while remaining imdepotent. During the first implementation we did not take this into account, which did not correspond to the reality of the needs in production (to be able to use each parameter indifemently together)

* remove epdb reference

* FIX E111, E106

* FIX E302

* using loop produce a result who  was not imdepotent

* FIX E241

* fix: used pass intead of list
6 years ago
Kevin Breit 2038ff5569 meraki_mx_l3_firewall - Fix idempotency for default rule logging (#42649)
* Fix idempotency and default syslog bugs

* Fix idempotency check for syslog_default_rule

* Syntax errors
6 years ago
Kevin Breit 9105149595 Cange URL for organization device lookup (#42648) 6 years ago
Henryk Konsek ebeb46aa61 Added Scaleway volume module (#41667)
* Added Scaleway volume module.

* Fixed imports order.

* Fixed version added.

* Improved sanity checks.

* Fixing style formatting.

* Added new line at the end of file. Fixed typo in comment.
6 years ago
Calvin Wu 7e42e88cc1 ecs_taskdefinition can absent without containers argument (#41398)
* ecs_taskdefinition can absent without containers argument

* add regression test for absent with arn

* Add PassRole privilege for ecs_cluster to pass
6 years ago
Nathaniel Case 6b162142a7 ios_file: Don't leave leftover files behind (#42622)
* Don't leave leftover files behind

* Fix writing files in python3

* Replace nonascii.bin with one that will not pass for unicode
6 years ago
Ganesh Nalawade 6a94090e7f
Fix junos facts integration test failures (#42623)
*  Make fetching old style facts optional
   and try to fetch the old style facts only when
   `ofacts` value is present in `gather_facts`
* Fix in junos_facts integration test
6 years ago
Clement Trebuchet c7981c4cc8 Add the NIOS RECORD PTR Module (#41900)
* Add the NIOS RECORD PTR Module

* FIX E241,E231, E105

* FIX module should not be executable

* FIX module RWX

* Remove change in nios_srv_record

* Remove change in nios_srv_record

* FIX test_nios_ptr_record_update_comment

* ADD: Integration and target tests for the NIOS PTR RECORD module.

* FIX module name in integrations tests

* Update integration

* Refactor nios_ptr_record module

* Refactor the nios_ptr_record_idempotence

* FIX name

* Smoketests for the NIOS modules does not take care of the PTR:RECORD object

* REM the default for view

* Add finals test, after adding the PR (https://github.com/ansible/nios-test-container/pull/1) in order to handle PTR:RECORD

* add the define nios specific constant for PTR:RECORD

* fix: documentation style

* add create an ipv6 ptr record

* rename class name, add ipv6 unittest
6 years ago
Sumit Jaiswal 8b61dd6efc
Updating the nios_test_container version to 1.1.0 from 1.0.0 (#42526)
* updating the nios_test_container version

* changing the version
6 years ago
Fran Fitzpatrick 5928ec04ca Adds an ipmath filter (#41985) 6 years ago
Will Thames 42eaa00371 Provide kubernetes definition diffs in check_mode (#41471)
Move dict_merge from azure_rm_resource module to
module_utils.common.dict_transformations and add tests.

Use dict_merge to provide a fairly realistic, reliable
diff output when k8s-based modules are run in check_mode.

Rename unit tests so that they actually run and reflect
the module_utils they're based on.
6 years ago
hitsumabushi cf7a42b4f4 allow empty line in src template file (#42493) 6 years ago
Jordan Borean 940d4a0e89
win_reboot: fix 2.6 issues and better handle post reboot reboot (#42330)
* win_reboot: fix 2.6 issues and better handle post reboot reboot

* changed winrm _reset to reset

* Add handler to reset calls when .reset() throws an AnsibleError on older hosts

* Moving back to _reset to get the issue fixed
6 years ago
Matt Clay 11d0eb04ce Temporarily switch RHEL and Windows tests to AWS. 6 years ago
Matt Clay 8e26a58443 Revert "Temporarily switch RHEL and Windows tests to AWS."
This reverts commit c3134ce6e2.
6 years ago
Matt Clay 2fbc2abf86 Fix openshift integration test requirements. 6 years ago
Fabian von Feilitzsch c0c8766903 Ensure openshift dependency is also installed on test runner (#42582) 6 years ago
Deepak Agrawal 8157fa0b01
run ovs tests on centos/rhel (#42556) 6 years ago
Nathaniel Case 381263ad99
ios test cleanup pt 2 (#42570)
* Remove local from ios_config to avoid needing to add provider

* ios_smoke should test all with local to pick up the slack
6 years ago
Yuwei Zhou e9bf3c70e6 disk fact should return create_option value (#42398) 6 years ago
Yanis Guenane 593f484d77 Fix E324 for vultr modules. (#42464) 6 years ago
Matt Clay 528de5b82f Remove unwanted containers at CI job start. 6 years ago
Matt Martz 50905b980d Support item label in v2_playbook_on_include (#42478)
* Support item label in v2_playbook_on_include. Fixes #42301

* test fixes
6 years ago
Nathaniel Case 399d13d593
Update ios tests (#42509)
* 192.168.0.1/24 conflicts with management IP

* Images don't have the hostnames we expect
6 years ago
Zhikang Zhang 70e33ef92c
Make ios_vlan identify vlans starting with 9 (#42247)
* Make ios_vlan identify vlans starting with 9

* Add unit test for vlan id start with 9
6 years ago
Jakub Libosvar 26b0908270 openvswitch_db: Make 'key' parameter optional (#42110)
The OVSDB schema consists of typed columns. The 'key' parameter is
required only for columns with type of a 'map'. This patch makes 'key'
an optional parameter to allow setting values for other column types
like int.

Fixes #42108
6 years ago
Fabian von Feilitzsch e9c7b513a1 [k8s] allow user to pass list of resources in to definition parameter (#42377)
* allow user to pass list of resources in to definition parameter

* Add new validator for list|dict|string

* use string_types instead of string

* state/force information is lost after the first item in the list

* Add tests

* Appease ansibot
6 years ago
Paul Neumann dfb2b3fdd5 ios_facts: Report space of file systems (#41850)
* ios_facts: Report file system space

Parse total and free space from dir output. For this, add a hash
filesystems_info containing the keys spacetotal_kb and spacefree_kb.

* ios_facts: Add unit test for file system space reporting

* ios_facts: Add integration test for file system space reporting
6 years ago
Kevin Breit 7b07c9b220 meraki_network - Add support for disableMyMerakiCom (#42418)
* Add support for disable_my_meraki parameter

- Meraki added support for the disabling access to Meraki websites on
devices. This module now supports this.
- I haven't tested this as it was developed on an iPad. It will work
before submitting PR.
- Rework of payload generation code is required or at least
recommended.
- Integration tests need to be developed.

* Added support for disableMyMerakiCom parameter

* - Remove proposed functions as it isn't required for updates
- Add integration tests
- Still pending a case response from Meraki since I can't seem to
set disableMyMerakiCom to false after it's true

* Fixed word wrap problem

* Add version_added to disable_my_meraki
6 years ago
Kevin Breit 9cd2388d1a New module - meraki_ssid (#42329)
* Initial commit of meraki_ssid module
- CRUD functionality for Meraki wireless SSIDs
- Much more testing is needed
- Module is not currently idempotent

* Improve integration tests
- Original integration tests didn't have any assertions in it
- Single bug fix in module found via integration test

* Added idempotency support
- Changes are only made when needed.
- Added integration test to check for idempotency.
- Relies on a forthcoming PR to make idempotency check a single pass.

* Improved documentation
6 years ago
Kevin Breit 132943cac5 New module - meraki_mr_l3_firewall (#42328)
* Initial commit for meraki_mr_l3_firewall module

- CRUD functionality for layer 3 firewall rules on the Meraki MR access points
- Complimentary integration test
- Need to add support for SSID lookup

* Added support for specifying SSID name and improved documentation

* Added examples to documentation

* Removed whitespace
6 years ago
Kevin Breit 3d3d919c11 New module - meraki_mx_l3_firewall (#42326)
* Initial commig for meraki_mx_l3_firewall
- View and modify L3 firewalls applied to Meraki MX firewalls
- Initial integration tests included

* Added example documentation

* Added documentation for responses

* Documentation tweaks for typos

* PEP8 fix
6 years ago
Kevin Breit eeada86554 Add net_id support to config_template (#42446)
- Added net_id support to config_template
- Changed integration test to use blocks to cleanup on failure
6 years ago
Kevin Breit 9036f846a3 meraki - Enabled support for configuration template configuration (#42392)
* Enabled support for configuration template configuration
- get_nets() now pulls down templates and networks
- A few changes in VLAN and network to operate as a POC

* Ansibot changes

- Fix undefined variable
- Document net_id in meraki_vlan

* Fix indentation
6 years ago
Kevin Breit 779f3c0c1a Allow module to claim devices into an organization (#42448)
- Before this, it allowed claiming devices into a network only
- Make integration tests a block
- Note, API doesn't allow unclaiming in an organization, only net
- Added an integration test for claiming into an org
	- Requires unclaiming manually
- There is a bug in the API which isn't showing claimed devices
6 years ago
René Moser d7c3d5501b
cs_vpc: fix disabled or wrong vpc offering taken (#42465) 6 years ago
Julien Vey 0f612d1b76 efs_facts: improve performance by reducing the number of api calls (#36520)
* efs_facts: improve performance by reducing the number of api calls

* Remove efs_facts tests from running in CI
6 years ago
René Moser 0e6628395a
cs_firewall: fix idempotence and tests for cloudstack v4.11 (#42458) 6 years ago
René Moser 8a3d29cf6d
cloudstack: tests: use expected vpc offering (#42462) 6 years ago
Sam Doran 1d1595b990
Fix pause module so it does not stack trace when redirecting stdout. (#42217)
* Use separate variables for stdin and stdout file descriptors

* Do not set stdout to raw mode when output is not a TTY
6 years ago
Jordan Borean 8bdd04c147 Fix remote_tmp when become with non admin user (#42396)
* Fix tmpdir on non root become

 - also avoid exception if tmpdir and remote_tmp are None
 - give 'None' on deescalation so tempfile will fallback to it's default behaviour
   and use system dirs
 - fix issue with bad tempdir (not existing/not createable/not writeable)
   i.e nobody and ~/.ansible/tmp
 - added tests for blockfile case

* Revert "Temporarily revert c119d54"

This reverts commit 5c614a59a6.

* changes based on PR feedback and changelog fragment

* changes based on the review

* Fix tmpdir when makedirs failed so we just use the system tmp

* Let missing remote_tmp fail

If remote_tmp is missing then there's something more basic wrong in the
communication from the controller to the module-side.  It's better to
be alerted in this case than to silently ignore it.

jborean and I have independently checked what happens if the user sets
ansible_remote_tmp to empty string and !!null and both cases work fine.
(null is turned into a default value controller-side.  empty string
triggers the warning because it is probably not a directory that the
become user is able to use).
6 years ago
Dag Wieers f98a0b521f
Add querying all bindings (#42366)
Also fix an issue with one of the check-mode tests.
6 years ago
Ganesh Nalawade f4d21bd542
Fix junos integration test CI failures (#42369)
*  reset_connection task is not required as the persistent
   connection to remote host is closed at end of playbook
   run
6 years ago
Dag Wieers b90ae65e5c
aci_static_binding_to_epg: Add description parameter (#42244)
* aci_static_binding_to_epg: Add description parameter

This PR adds the description parameter to this module.

Tis fixes #42154

* Fix added_version
6 years ago
Deepak Agrawal 30688fecf3
Idempotency for net_get and net_put modules (#42307)
* Idempotency for net_get and net_put modules

* pep8 warnings fix

* remove import q
6 years ago
John R Barker d962611528 Allow documentation of module options type (#42285)
* Allow documentation of module options

Pass through the `type` of a modules option so it's displayed on the
html module docs

* docs
6 years ago
Nilashish Chakraborty ed5a0f2d9c
nxos_logging new feature - remote logging (#41237)
* Added feature - Remote Logging + More tests

* Fixed Shippable Errors

* Fixes - new feature version added error
6 years ago
Kevin Breit c3c86a0248 Small fixes for bad variable names (#42287) 6 years ago
Ganesh Nalawade c068b88b38
Update eos, ios, vyos cliconf plugin (#42300)
* Update eos cliconf plugin methods

*  Refactor eos cliconf plugin
*  Changes in eos module_utils as per cliconf plugin refactor

* Fix unit test and sanity failures

* Fix review comment
6 years ago
hlrichardson 2aa81bf05d add tests for exos_command module (#42268) 6 years ago
Deiwin Sarjas 6412cbf84b aws_eks_cluster: Add wait functionality (#42259)
* aws_eks_cluster: Improve output documentation

This data is already returned by the module, it just wasn't documented. These
fields are required for accessing the created Kubernetes API with e.g. the
k8s_raw module.

* aws_eks_cluster: Add wait functionality

This enables further cluster configuration once it's created and active.

20 minutes was chosen as an arbitrary default, so that if it takes longer than
the documented "usually less than 10 minutes" it's still likely to succeed.

* Correct security group name in aws_eks tests

* Improve teardown of aws_eks tests

Fix minor teardown issues. The `pause` step is a placeholder until
a waiter for `state: absent`
6 years ago
mjmayer b60fc33eef Add execution_role_arn parameter (#41849)
* Add execution_role_arn parameter

* Change ecs_taskdefinition to use AnsibleAWSmodule

Botocore version checking is becomming more common. Changing the ecs_taskdefinition
to use AnsibleAWSmodule allows more easily for this.

* Change launch type check to use botocore_at_least function

* Remove execution_role_arn param from params dict

* Change check to use parameter

* Fix typo

* Add test for old botocore version

* Add test for execution role parameter

* Remove iam_role_facts task

Task was unecessary. The same information could be gathered by registering
the iam_role task.
6 years ago
fxfitz f92b95b8cb Remove ipa_ modules from sanity ignore; fix the docs 6 years ago
Dag Wieers 459cdef993
Fix integration tests aliases (#42245) 6 years ago
Deepak Agrawal febf88c81b
test file required for ios_files tests (#42248) 6 years ago
Trishna Guha 805d13f287
nxos CI failures bugfix (#42240)
* fix nxos_portchannel and remove deprecated param in test

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

* fix _nxos_switchport CI failures

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

* fix nxapi nxos_command test

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

* remove unsupported param nxos_smoke test

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

* fix nxos_vxlan_vtep_vni

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

* syntax error

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Kevin Breit f9cbdcd426 Meraki - Integration tests now clean up on failure (#42227)
* Added block and always support to meraki_network integration test

* Add blocks to admin and vlan integration test

* Resolved bad variable names
6 years ago
Kevin Breit 08ddd202fb meraki_config_template - Check for HTTP status code (#42145)
* Check for HTTP status code

- All requests now check returned status code
- Fail if status code isn’t what is expected

* Fix blank line error

* Change HTTP check logic and improve integration tests
- Set HTTP status code check so default path is accept
- Added create and delete network for integration test
- Remove a few comments to clean up code
6 years ago
Dag Wieers 09fec5a482
aci_interface_policy_ospf: Create OSPF interface policies (#42184)
* aci_interface_policy_ospf: Create OSPF interface policies

New module to create OSPF interface policies

* Fix documentation issues

* Add missing integration tests

* Update documentation and examples
6 years ago
Dag Wieers 57c0471b54
Fix ACI validate-modules issues (#42222) 6 years ago
tstoner db7300904d Enforcing NXAPI default HTTP behavior (#41817)
* nxos_nxapi http default behavior

* Use nxos_nxapi module in prepare_nxos_tests

* Refactor nxos_nxapi configure test to use yaml block

* Extend nxos_nxapi https & http test cases

* Removed NXOS internal release naming

* Resolved ansibot sanity errors

* Fix typo in prepare_nxos_tests

* Address PR comments

* Shippable indicates this is no longer needed

* Add port change logic and testing
6 years ago
Nathaniel Case a197125954
Nxos restore provider to nxapi tests (#41818)
* Quick and dirty sed to add provider

* Manually verify the rest of the cases

* Add missing provider
6 years ago
Ganesh Nalawade 1659951710
Fix eos integration test failure (#42188)
* Fix error message in eos_config integration test
* Fix set_become invoke login in httpapi connection plugin
6 years ago
Nathaniel Case 5850591d14
Base connection class for network-style connections (#41839)
* Create base class for network-style connections

* clean up some differences

* Move NetworkConnectionBase

* Tweak netconf for tests

* Tweak when network_os is checked to avoid failing tests

* Pull back exec_command
6 years ago
Kevin Breit 380d08af5d Fix integration tests (#42088)
- Integration test assertions had some invalid variables
6 years ago
Sam Doran fb55038d75 Add warning when using an empty regexp in lineinfile (#42013)
* Revert "Account for empty string regexp in lineinfile (#41451)"

This reverts commit 4b5b4a760c.

* Use context managers for interacting with files

* Store line and regexp parameters in a variable

* Add warning when regexp is an empty string

* Remove '=' from error messages

* Update warning message and add changelog

* Add tests

* Improve warning message

Offer an equivalent regexp that won't trigger the warning.
Update tests to match new warning.

* Add porting guide entry for lineinfile change
6 years ago
Matt Clay c3134ce6e2 Temporarily switch RHEL and Windows tests to AWS. 6 years ago
John R Barker e9dbebfa57
Fix some broken links (#42079)
* Fix some broken links

* We now only serve via https
* redirects don't work with anchors, so update those links (devel/dev_guide)
6 years ago
John R Barker 6024a766e9
Allow removed_in 2.11 (#42119) 6 years ago
David Soper 5f5fbffe8a UCS Server UUID pool modules and integration tests (#41743)
* UCS Server UUID pool modules and integration tests

* change version added to 2.7

* Doc and result changed updates from review.
6 years ago
David Soper f8f22f77ed Fix issue with vNIC redundancy templates (#36608)
* Fix bug with redundancy templates and add integration tests for redundancy templates.

* vlan_list absent state support and fix for vlans as strings in vlan_list
6 years ago
John McDonough bf932a852b Module for UCSM Manager Timezone Management (#36974)
* Module for UCSM Manager Timezone Management

* Module for UCSM Manager Timezone Management

* Module for UCSM Manager Timezone Management

* Addressed PR comments and added integration tests

* fixed mismatched default value between doc and argument_spec

* changed main() to call run_module()

* Change version to 2.7

* updated integration aliases indicating unsupported testing

* updates to DOCUMENTATION
6 years ago
Ganesh Nalawade e41d427d1b
Add run_commands api for ios and vyos cliconf plugin (#42093)
* Add run_commands api for ios and vyos cliconf plugin

*  Add run_commands api to ios and vyos cliconf plugin
*  Refactor ios and vyos module_utils to check return code
   in run_commands

* Fix Ci failures
6 years ago
saichint bd9b8b422d fix nxos_gir issues (#41809)
* fix nxos_gir issues

* review comments
6 years ago
Yanis Guenane 42c2fd72ae Fix test_create_jks_success failing on SELinux machine (#42001)
Currently TestCreateJavaKeystore::test_create_jks_success is failing on
a machine with SELinux because set_context_if_different is not mocked
and hence tries to access a file that doesn't exist because it has been
mocked previously.

Also, changing path to a path that won't exist for sure.
6 years ago
Eitan Akman fb7882bf86 Issue #39860: Add 'not_contains' method to parsing.py (#39874)
* Issue #39860: Add 'not_contains' method to parsing.py

* Issue #30860 Adds self.negate to Conditional class in lib/ansible/module_utils/network/common/parsing.py

* Issue #39860 Fix singleton-comparison issue per sanity tests

* Issue #39860 'test/integration/targets/nxos_command/tests/cli/not_comparison_operator.yaml' integration test

* Issue #39860 Add unit tests to '../../test/units/module_utils/network/common/test_parsing.py'

* Issue #39860 Fix singleton comparison issue

* Fix E302 expected 2 blank lines, found 1

* Issue #39860 Add license header to unit tests

* Issue #39860 Move integration test to 'test/integration/targets/nxos_command/tests/common/'; remove unnecessary comment from unit test

* Issue #39860 remove unnecessary comment from unit test
6 years ago
Andrew Saraceni bcb49f2575 Refactor/fix win_group_membership to use SIDs for internal comparisons (#40725)
* refactor win_group_membership to use SIDs for comparisons instead of name parsing

* carry over previous doc cleanup changes

* remove trailing whitespace from docs
6 years ago
Jordan Borean cc97e89620
Revert "win_security_policy: allow removing values (resolves #40869) (#41125)" (#41986)
This reverts commit f2bd6b6bfd.
6 years ago
jamessemai f2bd6b6bfd win_security_policy: allow removing values (resolves #40869) (#41125)
* win_security_policy: allow removing values (resolves #40869)

* Removing warning

* Adding test for remove policy setting

* Fixing string comparison
6 years ago
Matt Martz 1401fa74cc
Cache items when task.loop/with_items is evaluated to set delegate_to vars (#41969)
* If we evaluate task.loop/with_items when calculating delegate_to vars, cache the items. Fixes #28231

* Add comments about caching loop items

* Add test for delegate_to+loop+random

* Be more careful about where we update task.loop
6 years ago
Troy Murray 15ce7c5bab change OS X to macOS (#41294)
* change OS X to macOS

<!--- Your description here -->

+label: docsite_pr

* Update all Mac OS X references to be macOS

* Drop extra Mac
6 years ago
Matthew Stone c5c3900c52 Adding slxos_lldp module (#39259)
* Adding slxos_lldp module
6 years ago
Kevin Breit 7ab3f755ce Fixes idempotency check for partial configurations (#41941)
- Previous PR would overwrite new and existing values improperly
6 years ago
Pierre-Louis Bonicoli 358c759bd9 test: manual tower projects don't require creds 6 years ago
Jordan Borean 2af36412f9
runas + async - get working on older hosts (#41772)
* runas + async - get working on older hosts

* fixed up sanity issues

* Moved first task to end of test for CI race issues

* Minor change to async test to be more stable, change to runas become to not touch the disk

* moved async test back to normal spot
6 years ago
Sam Doran 4b5b4a760c
Account for empty string regexp in lineinfile (#41451)
* Use context managers for interacting with files

* Account for empty string as regexp

Rather than explicitly testing for None, also test for an empty string which will evaluate to False. An empty string regexp matches every line, which ends up replacing the incorrect line.

* Store line parameter in a variable

* Add tests
6 years ago
Sam Doran eaae1318f8
Skip if insertbefore BOF until later (#41767)
If a line match is found in the file and no regexp is specified, insertbefore would improperly try to add a line if set to BOF.

Add tests for this scenario.
6 years ago
Jordan Borean 9b7b564d75
Stop displaying kinit pass input on a failure (#41882)
* Stop displaying kinit pass input on a failure

* Fixed up minor logic info and added tests
6 years ago
Martin Krizek a8d4bf8642
Fix rabbitmq_* integration tests (#41836) 6 years ago
Dennis Benkert 28d0a173db [aws] add limit on number of CloudFormation stack events fetched by cloudformation module (#41840)
* Add a module parameter to configure the max fetched AWS CFN stack events
* Add version documentation for new configuration option
* Increase default in order to make sure that enough are fetched by default. This align roughly with the limit of manageable resources in CloudFormation.
6 years ago
Ganesh Nalawade 773c031d33
vyos and ios cliconf plugin refactor (#41846)
* vyos and ios cliconf plugin refactor

*  Refactor vyos cliconf plugin
*  Change vyos module_utils and vyos_config as per refactor
*  Minor changes in ios cliconf plugin

* Fix unit test failure

* Fix sanity issues

* Add get_diff to rpc list
6 years ago