Commit graph

5447 commits

Author SHA1 Message Date
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>
2018-07-18 12:20:21 -04:00
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
2018-07-18 12:17:08 -04:00
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
  }
]
```
2018-07-18 12:39:55 +02:00
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
  }
]
```
2018-07-18 11:32:04 +02:00
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": ""
     }
  ]
```
2018-07-18 10:42:20 +02:00
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"
  }
]
```
2018-07-18 09:53:58 +02:00
Jordan Borean
8447f25e10
win_chocolatey_config: added module to manage Chocolatey config (#42915) 2018-07-18 10:36:59 +10:00
Jordan Borean
7ae5912d91
win_chocolatey_feature: new module (#42848)
* win_chocolatey_feature: new module

* Fixed up copyright header in PowerShell file
2018-07-18 10:36:43 +10:00
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
2018-07-18 10:36:21 +10:00
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
2018-07-17 14:29:05 -07:00
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.
2018-07-17 11:37:23 -07:00
Dag Wieers
e899824c49
ACI: Add parameter types to module docs (#42893)
* ACI: Add parameter types to module docs

* Update validate-modules ignore list
2018-07-17 18:03:55 +02:00
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
2018-07-16 13:26:06 -04:00
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
2018-07-16 11:34:01 +10:00
Dag Wieers
2ad234f98e
aci_ap: Ensure AP is removed before tests start (#42744) 2018-07-15 23:03:39 +02:00
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
2018-07-15 09:59:30 -05:00
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
2018-07-13 15:09:33 -04:00
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.
2018-07-13 10:56:57 -04:00
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
2018-07-13 14:08:14 +10:00
Ryan Brown
45f5964fed Fix patching of wrong boto3_conn in API Gateway tests (#42700) 2018-07-12 13:06:31 -04:00
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
2018-07-12 20:27:10 +05:30
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
2018-07-12 16:47:17 +02:00
Kevin Breit
9105149595 Cange URL for organization device lookup (#42648) 2018-07-12 16:41:16 +02:00
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.
2018-07-12 08:43:23 -05:00
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
2018-07-12 23:16:41 +10:00
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
2018-07-12 12:26:14 +05:30
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
2018-07-12 09:53:03 +05:30
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
2018-07-11 23:55:28 +05:30
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
2018-07-11 23:34:30 +05:30
Fran Fitzpatrick
5928ec04ca Adds an ipmath filter (#41985) 2018-07-11 10:52:31 -07:00
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.
2018-07-11 16:32:03 +10:00
hitsumabushi
cf7a42b4f4 allow empty line in src template file (#42493) 2018-07-11 11:29:07 +05:30
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
2018-07-11 09:12:29 +10:00
Matt Clay
11d0eb04ce Temporarily switch RHEL and Windows tests to AWS. 2018-07-10 15:15:01 -07:00
Matt Clay
8e26a58443 Revert "Temporarily switch RHEL and Windows tests to AWS."
This reverts commit c3134ce6e2.
2018-07-10 10:47:25 -07:00
Matt Clay
2fbc2abf86 Fix openshift integration test requirements. 2018-07-10 10:07:19 -07:00
Fabian von Feilitzsch
c0c8766903 Ensure openshift dependency is also installed on test runner (#42582) 2018-07-10 09:54:31 -05:00
Deepak Agrawal
8157fa0b01
run ovs tests on centos/rhel (#42556) 2018-07-10 19:25:09 +05:30
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
2018-07-10 09:03:04 -04:00
Yuwei Zhou
e9bf3c70e6 disk fact should return create_option value (#42398) 2018-07-10 16:16:28 +08:00
Yanis Guenane
593f484d77 Fix E324 for vultr modules. (#42464) 2018-07-10 07:51:05 +02:00
Matt Clay
528de5b82f Remove unwanted containers at CI job start. 2018-07-09 21:48:11 -07:00
Matt Martz
50905b980d Support item label in v2_playbook_on_include (#42478)
* Support item label in v2_playbook_on_include. Fixes #42301

* test fixes
2018-07-09 11:27:00 -04:00
Nathaniel Case
399d13d593
Update ios tests (#42509)
* 192.168.0.1/24 conflicts with management IP

* Images don't have the hostnames we expect
2018-07-09 10:12:48 -04:00
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
2018-07-09 09:50:06 -04:00
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
2018-07-09 19:12:41 +05:30
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
2018-07-09 08:33:16 -05:00
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
2018-07-09 09:15:31 -04:00
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
2018-07-09 11:21:34 +02:00
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
2018-07-09 11:18:12 +02:00