Commit Graph

1412 Commits (23e57fe095a861f6b31cf01605e9b2a06a89795f)

Author SHA1 Message Date
Trishna Guha 7f55954cc1
nxos_igmp and nxos_hsrp fix (#38513)
* fix nxos_igmp issues (#38496)

(cherry picked from commit 361437b042)

* fix nxos_hsrp issues (#38410)

* fix nxos_hsrp issues

* shippable fix

* add examples for md5 auth

(cherry picked from commit dabe5e6d07)

* update changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Jordan Borean 7e621b3dbe
win_uri: backport 2.5 fix for when status codes are provided as a comma separated list (#38509)
* fix for when status codes are provided as a comma separated list (#38080)

* fix for when status codes are provided as an array of strings

* convert status codes to int, additional tests

(cherry picked from commit c38617a736)

* Added changelog fragment
7 years ago
Jordan Borean 3ac6c6ebd9
win_exec_wrapper: fix tests after recent change (#38504) (#38506)
(cherry picked from commit 0d374f28d2)
7 years ago
Adrian Likins 31e28a04a5 Fix 'New Vault password' on vault 'edit' (#35923) (#38003)
* Fix 'New Vault password' on vault 'edit'

ffe0ddea96 introduce a
change on 'ansible-vault edit' that tried to check
for --encrypt-vault-id in that mode. But '--encrypt-vault-id'
is not intended for 'edit' since the 'edit' should always
reuse the vault secret that was used to decrypt the text.

Change cli to not check for --encrypt-vault-id on 'edit'.

VaultLib.decrypt_and_get_vault_id() was change to return
the vault secret used to decrypt (in addition to vault_id
and the plaintext).

VaultEditor.edit_file() will now use 'vault_secret_used'
as returned from decrypt_and_get_vault_id() so that
an edited file always gets reencrypted with the same
secret, regardless of any vault id configuration or
cli options.

Fixes #35834

(cherry picked from commit 6e737c8cb6)
7 years ago
Jordan Borean 38a13f41cd
powershell: 2.5 backport display non-ascii characters in command outputs (#38365)
* powershell: display non-ascii characters in command outputs (#37229)

(cherry picked from commit 71e8527d7c)

* Added changelog fragment
7 years ago
John R Barker 4f0389ad4e
Backport/2.5/38386 (#38462)
* openssl_certificate: Handle dump() in check_mode (#38386)

Currently, when ones run the module in check_mode it tries to retrieve
values from the actual certificate generated in the generate() function.

Since in check_mode we call dump() without calling generate(), self.cert
is None, leading to self.cert.get_notBefore(), self.cert.get_notAfter()
and self.cert.get_serial_number() raising an error.

>  NoneType' object has no attribute 'get_notBefore'

The solution is to have two way to handle dump() method, whether its run
in check_mode=True or check_mode=False leading to different way the
information is retrieved.
(cherry picked from commit 99497ce54c)
7 years ago
David Newswanger f10b82c0d3
Add eos_smoke integration tests (#36957) (#38397)
* added eos_smoke tests

* removed left over file

* added note to uncomment broken eapi test when #36919 is fixed

* uncommented fixed test, added unbecome test

* skip become tests when connection=local

(cherry picked from commit 712d30f46c)
7 years ago
David Newswanger f25eea16e6
added junos_smoke tests (#37216) (#38396)
* added junos_smoke tests

* enable check mode test

* fix check mode test

(cherry picked from commit 0bd2cd4394)
7 years ago
David Newswanger cbeadb2c9a
added iosxr_smoke (#37828) (#38395)
* added iosxr_smoke tests

* finalized netconf tests

* cleaning up files

(cherry picked from commit 38fa1d0b15)
7 years ago
Deepak Agrawal 4aafa90c89
Backport/2.5/37287 Eos :do not push config to device if check_mode is enabled (#38382)
* Eos :do not push config to device if check_mode is enabled (#37287)

* eos can not check config without config session support

* add testcase for check_mode without config session

* fix eos eapi to read use_session env var

(cherry picked from commit a1026dbce5)

* Backport/2.5/37287 - Eos do not push config is check_mode is enabled
7 years ago
Trishna Guha 536dff507d
stable-2.5 nxos bugfix cherry-pick (#38372)
* nxos_vlan purge (#38202)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 119352b538)

* fix nxos_aaa_server issues (#38117)

(cherry picked from commit 697c301f04)

* fix nxos_aaa_server_host issues (#38188)

(cherry picked from commit 24cc6b80bd)

* fix nxos_static_route issues (#37614)

* fix nxos_static_route issues

* remove nxos_static_route from ignore

(cherry picked from commit 0df5cfd41f)

* fix nxos_acl issues (#38283)

* fix nxos_acl issues

* typo fix

* typo fix in sanity.yaml

* another typo fix in sanity.yaml

(cherry picked from commit 1bf29651af)

* nxos_acl_interface tests addition (#38230)

(cherry picked from commit b8cb382a40)

* update changelog with nxos bugfixes for 2.5

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

* revert ignore.txt

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Jordan Borean ff03fc0f67
win_setup: backport Added connection name to interfaces (#38362)
* win_setup: Added connection name to interfaces (#37327)

(cherry picked from commit fd4d264253)

* Added changelog fragment
7 years ago
David Newswanger 58bafcb01c added nxos_smoke tests (#36647) (#37252)
* added nxos_smoke tests

* add connection information, check length of output

* updated name of task

(cherry picked from commit 5e827f4cc4)
7 years ago
Jordan Borean 09dc621238
win_service: backport of special char in name handler (#38250)
* win_service: fix when dealing with paths with special chars and change WMI to CIM cmdlets (#37897)

* win_service: fix when dealing with paths with special chars and change WMI to CIM cmdlets

* compare username in lowercase for test

(cherry picked from commit f37a44430f)

* Added changelog fragment
7 years ago
Jordan Borean 800980ec83
win_copy: backport 2.5 preserve local tmp path when sending multiple files (#37977)
* win_copy: added fix for win_copy deleting local tmp folder (#37964)

(cherry picked from commit b1ac65d95a)

* Added changelog fragment
7 years ago
Jordan Borean 886a88a967
win_uri: backport fix custom header override (#37889)
* append request headers instead of replacing (#37845)

(cherry picked from commit 2c44061a04)

* Added changelog fragment
7 years ago
Jordan Borean 0c88f199ec
azure_rm_networkinterface: backport no public IP fix (#37762)
* azure_rm_networkinterface: fixed issue when public ip address should not be created (#36824)

* fixed issue when public ip address should not be created

* adding test for public ip address

* fixed samples

* another fix to sample formatting

* fixed test

* fix test

* fixed test

* another attempt to fix test

* maybe it works now

* still wrong

* improved check per customer request

* removed stupid semicolon

* updated test to match main scenario

* changed ip configurations to list

* another attempt

(cherry picked from commit 89401f13f7)

* Added changelog fragment
7 years ago
Jordan Borean d0f1a23c45
Ansible.ModuleUtils.FileUtil - backport catch DirectoryNotFoundException (#37976)
* Ansible.ModuleUtils.FileUtil: catch DirectoryNotFoundException when testing a path (#37968)

(cherry picked from commit 68e44e082e)

* Added changelog fragments
7 years ago
Abhijeet Kasurde 87119348b5 VMware: Use environment variable for connection (#37726) (#37745)
This fix adds environment variables for connection in vmware_*
modules.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 0ae7a0e88c)
7 years ago
Ganesh Nalawade f91cda4b02
Fix junos modules check_mode issue (#37311) (#37918)
Fixes #37208

If check_mode is enabled instead of committing th config need to
discard all the chnages to cnadidate db
In case of cli to discard changes issue `rollback 0` command
and for netconf execute `discard-changes` rpc call
(cherry picked from commit 8eaa9cc938)
7 years ago
Ganesh Nalawade ec59181a28
Fix eos_facts eapi integration test failures (#37919)
(cherry picked from commit af777c0f89)
7 years ago
Ganesh Nalawade 4dffcd35cd
eos_config module exit session gracefully (#37920)
Fixes #36979
If `abort` is not issued in the top level session prompt
the existing session goes to pending state.
The fix is to come out of config mode by issuing `end` command
and again to same config session and execute `abort` which
`abort` is issued at the top level session prompt.

(cherry picked from commit 017ea018d0)
7 years ago
Trishna Guha a716fe97e3
nxos bugfixes cherry-pick (#38091)
* Fix nxos_switchport (#37328)

(cherry picked from commit ff57fd0bb4)

* Fix nxos_l2_interface and test typo (#37336)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit ba5e562c76)

* fix ios_l2_interface (#37389)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit dd37857884)

* fix required args for nxos_snapshot and docs improvement (#37232)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit a10df8b0b5)

* add nxos_snapshot test for missing required param (#37248)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 2501834c42)

* Ensure network_cli nxos test is run only once - remove unnecessary files (#37462)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 957ab02e52)

* Integration Tests only: nxos_user (#37852)

* add new integration file to nxos_user

* fix shippable error

* change nxapi to connection

* review comments

(cherry picked from commit 63da50e1d8)

* fix UnboundLocalError nxos_bgp_af module (#37610)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 00abe6dbe7)

* Fix nxos_vrf issues (#37092)

* fix nxos_vrf issues

* fix doc

(cherry picked from commit dc61f4c6b1)

* fix nxos_vrf_af issues (#37211)

(cherry picked from commit 74e79d9f5e)

* fix nxos_udld issues (#37418)

(cherry picked from commit 05b266cc66)

* fix nxos_vlan issues (#38008)

(cherry picked from commit 6f2cb28bb9)

* add changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Will Thames 60e7aa0dbd [cloud]Ensure SGs in default VPCs get default egress rule (#38018)
SGs created when a VPC ID was not specified would not necessarily
get the default egress rule, even when no explicit egress rules
were set.

Add some checks for egress rules in results from existing tests

(cherry picked from commit 98b29f8ad6)
7 years ago
msven ae4c246a3c ec2_asg: fix #28087 and #35993 (#36679)
Fixes #35993 - Changes to update_size in commit eb4cc31 made it so
the group dict passed into update_size was not modified. As a result,
the 'replace' call does not see an updated min_size like it previously
did and doesn't pause to wait for any new instances to spin up. Instead,
it moves straight into terminating old instances. Fix is to add batch_size
to min_size when calling wait_for_new_inst.

Fixes #28087 - Make replace_all_instances and replace_instances behave
exactly the same by setting replace_instances = current list of instances
when replace_all_instances used. Root cause of issue was that without lc_check
terminate_batch will terminate all instances passed to it and after updating
the asg size we were querying the asg again for the list of instances - so terminate batch
saw the list including new ones just spun up.

When creating new asg with replace_all_instances: yes and lc_check: false
the instances that are initially created are then subsequently replaced.
This change makes it so replace only occurs if the asg already existed.

Add integration tests for #28087 and #35993.

(cherry picked from commit a2b3120e85)
7 years ago
Matt Martz 0b0bb65198
Backport #36372 for 2.5 (#37666)
* Fix name parameter templating in include_role module (#36372)

An IncludedFile() object built using the original_task will have
its _task bound to the original_task. The iterative reassignment of
original_task._role_name during with_item loops leaves all returned
included_files with the same ._task._role_name (the final name from
the with_items list). This commit builds IncludedFile() objects
from an original_task.copy() to avoid the problematic binding.

(cherry picked from commit 54e70fc783)

* Test include role with items in name #36372 (#37001)

* Tests for #36372

* Tests for #36372

* Tests for #36372

(cherry picked from commit 8c4f349743)

* Add changelog for #36372
7 years ago
Matt Clay 2665912356 Fix docker_secret test on RHEL.
(cherry picked from commit f1899f784b)
7 years ago
Matt Clay 61887e7c2f Fix uri test on Python 2.6.
(cherry picked from commit 1fd9a616a4)
7 years ago
Sebastian Gumprich 20fcaeb854 fix spelling mistakes in several modules (#36296)
* fix more spelling mistakes

* fix spelling mistakes

(cherry picked from commit 16c564c4b4)
7 years ago
Matt Clay 5ebce3e618 Disable failing github_issue integration test.
(cherry picked from commit 30bb70cf2d)
7 years ago
Dag Wieers 1381de72d0 Backport of ACI document changes (#37502)
* Backport of ACI document changes

* Add missing test change
7 years ago
Toshio Kuratomi c264061272 Bkprt conn err msg no template (#37381)
*  Connection error messages are unsafe: wrap them (#37329)

* Check that connection error msg are not unsafe

* Connection error messages are unsafe: wrap them

For example, in case of error, docker connection plugin returns exception
message containing Go template. These messages weren't tagged as unsafe
and were consequently rendered:

The conditional check 'result is failed' failed. The error was:
{
  'msg': u'Docker version check ([\'/usr/bin/docker\', \'version\', \'--format\', "\'{{.Server.Version}}\'"]) failed: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/version: dial unix /var/run/docker.sock: connect: permission denied\n',
  'failed': True
}:
template error while templating string: unexpected '.'.
String: Docker version check (['/usr/bin/docker', 'version', '--format', "'{{.Server.Version}}'"]) failed: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/version: dial unix /var/run/docker.sock: connect: permission denied

(cherry picked from commit 4378542ac7)

* Add a changelog for the no-template error message fix
7 years ago
Jordan Borean acef6d25b1 powershell: backport environment string handler fixes 2.5 (#37223)
* win: handle non string as an environment value (#37215)

* win: handle non string as an environment value

* Changed powershell environment handler to use .net function instead for special chars

(cherry picked from commit 708869edd6)

* Added changelog fragement for powershell environment handler fix

* typo in changelog
7 years ago
René Moser 9e315f15ee
cs_instance: fix py3 user_data base64 (#37135) (#37199)
* cs_instance: tests: reproduce py3 user_data base64 issue

* cs_instance: fix base64 encoding with py3

(cherry picked from commit 0130490faa)
7 years ago
Abhijeet Kasurde 4477ce809f VMware: Re-enable VM poweroff testcases (#36734) (#36765)
This testcases were failing due to vcsim version.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 87d6bdaf98)
7 years ago
Trishna Guha 2e145cd1f2
fix nxos_switchport/l2_interface trunk_vlans state absent (#37180) (#37181)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 02999b77a4)
7 years ago
Jordan Borean 09de6dc020
win_uri: backport return value fix for non 200 responses (#37156)
* win_uri: return response info on non 200 responses, convert DateTime values to ISO 8601 (#37104)

(cherry picked from commit c1f5e11cdf)

* Added changelog fragment for win_uri return value fix
7 years ago
Trishna Guha ee67c6c1e3
fix nxos_l2_interface tests for fretta (#37086) (#37101)
(cherry picked from commit b7bc61c7df)
7 years ago
Jordan Borean f0a808e02c Win lineinfix fix (#36888)
* Win lineinfile fix (#35100)

* win_lineinfile: fix #33858. Removed conversion from \r\n

* win_lineinfile: added test for #33858

* win_lineinfile: added documentation and more tests for change

* win_lineinfile: fixed wrong hash in testing

(cherry picked from commit e15a903bdf)

* Added changelog for win_lineinfile fix

* fix typo in changelog
7 years ago
Ganesh Nalawade bbf27efe06
Fix eos integration test failures (#37020) (#37054)
Fixes #36919

Fix other eos modules integration test failure in dci
(cherry picked from commit ba3201cd2f)
7 years ago
Nathaniel Case a3f96ec4af
ios_static_route idempotence fix (#35912) (#37012)
* Remove default admin_distance and fix the idempotence thereof

Fixes #33290

* Fix tests and use yaml anchors to shorten tests

* Add test for undefined admin_distance

* Read config from `show run` if `show ip static route` fails

* Restore flags to ios.get_config &  use get_config where appropriate

(cherry picked from commit 7016b3b9ca)
7 years ago
Ganesh Nalawade 3f8377c2d9
Enable eapi integration test for eos modules (#36934) (#36935)
(cherry picked from commit 83c3561ee5)
7 years ago
Ganesh Nalawade a275a39299
Fix eos_vrf integration test failures (#36893) (#36896)
(cherry picked from commit 5c2a1a6124)
7 years ago
Trishna Guha fb630c926a
nxos_facts fix and integration tests (#36796) (#36820)
* fix nxos_facts ipv6 error

* time_range not supported for N35

(cherry picked from commit db43fe6a76)
7 years ago
René Moser eb12520854
cs_sshkeypair: fix ssh key rename (#36726) (#36730)
* tests: cs_sshkeypair: add reproducer for failed key rename

* cs_sshkeypair: fix rename ssh key

(cherry picked from commit cdb2969703)
7 years ago
Trishna Guha b1bdc5dae2
nxos_vlan, nxos_linkagg fix (#36711)
* fix nxos_vlan aggregate (#36710)

* fix nxos_vlan aggregate

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

* Add test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 44332bda78)

* nxos_linkagg fix (#36706)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit d6912cf40e)
7 years ago
Ganesh Nalawade d60eac9bc4
Decouple config and state check in vlan and vrf network modules (#36386) (#36704)
* Decouple config and state check in {network_os }_vlan and { network_os }_vrf modules

Fixes #35567
Fixes #34754

`interfaces` option is used for configuration as well as operational state
check. If interface is configured to given vlan or vrf but if
operational state of interface is disabled it results in module failure.

Fix is to decouple same option usage for config and state.
With this fix `interfaces` is used as config option and a new
option named `associated_interfaces` will be used for intent check
for assigned interfaces.

* Fix CI failures

* Fix review comment

* Fixed integration test failure

(cherry picked from commit 5a6b893240)
7 years ago
Matt Clay a48254275f Temporarily disable subversion test on osx.
(cherry picked from commit f283edcb19)
7 years ago
Matt Davis ed9781bbfb
Do not cache the loop item label so that it will update with each item (#36609)
Add integration test for #36430 (#36432)

(cherry picked from commit d1f76939e5)
(cherry picked from commit 9fced4f0a9)
7 years ago
Dag Wieers b1e125b718 Backport missing integration tests (#36610)
Somehow this file was missing from the previous backport.
7 years ago