Compare commits

...

770 commits

Author SHA1 Message Date
Sandra McCann
c6f1dede4b [Doc-Release-2.9][2.6] eol the 2.6 release (#64118)
* eol the release

* remove version selector
2019-10-31 13:15:48 -07:00
Matt Davis
d9afce4b33 Update Ansible release version to v2.6.20.post0. 2019-10-17 10:53:01 -07:00
Matt Davis
9bdb89f740 New release v2.6.20 2019-10-17 09:28:29 -07:00
Sam Doran
87f8d77d70 [stable-2.6] Properly mask no_log values is sub parameters during failure (#63405)
ci_complete
(cherry picked from commit 99ddd411a6)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-10-14 15:31:32 -07:00
Jill R
9849fc183d [stable-2.6] Fix STS assume role error message when role does not exist (#63249)
AWS appears to have changed this error message again.
Fixes https://app.shippable.com/github/ansible/ansible/runs/145643/115/tests
(cherry picked from commit ce402f003f)

Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com>
2019-10-14 14:19:09 -07:00
Matt Martz
16684f1187 [stable-2.6] Wrap CLI passwords as AnsibleUnsafeText (#63352) (#63393)
* [stable-2.6] Wrap CLI passwords as AnsibleUnsafeText (#63352)

* isa string should rewrap as unsafe in get_validated_value

* _is_unsafe shouldn't be concerned with underlying types

* Start with passwords as text, instead of bytes

* Remove unused imports

* Add changelog fragment

* Update changelog with CVE.
(cherry picked from commit baeff7462d)

Co-authored-by: Matt Martz <matt@sivel.net>

* Update tests
2019-10-11 10:32:00 -07:00
Toshio Kuratomi
d961f676c0 Fix for plugins which used the boto libraries leaking the boto credentials to logs
(cherry picked from commit 3753304d209f2fdc28f0b2ebf1e139eb3d8c22b1)

https://github.com/ansible/ansible/pull/63366
2019-10-10 21:22:44 -07:00
ndclt
d8d7e5a072 documentation: modify the link to the docker.txt listing all images (#61838) (#61851)
The file was moved.

(cherry picked from commit aadb192846)
2019-09-05 10:38:08 -05:00
Toshio Kuratomi
30a29133a8 Update Ansible release version to v2.6.19.post0. 2019-08-15 19:56:32 -07:00
Toshio Kuratomi
38036f07d8 New release v2.6.19 2019-08-15 14:07:58 -07:00
Matt Clay
c64e9736a3 [stable-2.6] Start dbus when setting up postgresql tests.
(cherry picked from commit c309570540)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-08-15 13:24:36 -07:00
Brian Coca
4b5aed4e5a prevent templating of passwords from prompt (#59246) (#59554)
* prevent templating of passwords from prompt (#59246)

* prevent templating of passwords from prompt

  fixes CVE-2019-10206

(cherry picked from commit e9a37f8e31)

* Improve performane of UnsafeProxy __new__

This adds an early return to the __new__ method of the UnsafeProxy object
which avoids creating the unsafe object if the incoming object is already
unsafe.

(cherry picked from commit c1e23c22a9fedafaaa88c2119b26dc123ff1392e)
(cherry picked from commit 490f17c7f9)
2019-08-12 18:06:01 -07:00
Sandra McCann
fcf8dc8d0c add eol banner (#59254)
(cherry picked from commit 00699735e9)
2019-08-07 07:26:16 -07:00
Sam Doran
1a9f703309 [stable-2.6] Wait for Ansible Tower instance to be ready
(cherry picked from commit ea209e1c2f)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-08-02 13:57:21 -07:00
Matt Clay
203d57d0da Remove redundant "Sanity Tests »" from page title.
The docs now have multi-level breadcrumbs so including "Sanity Tests »" in the title on a sanity test page is redundant.

(cherry picked from commit b4494fa547)
(cherry picked from commit dd42aac878)
(cherry picked from commit 2e66d73940)
2019-07-26 10:51:06 -07:00
Toshio Kuratomi
7fc75e54e6 [stable-2.6] Fix nightly rpm release
The nightly rpm builds were using a timestamp from the last git commit
in their Release field.  Unfortunately, that was using author timestamp
which is nonsequential.  Change to using commit timestamp which is
sequential.

note that this still has a cornercase if the branch's history is ever
rewritten.
(cherry picked from commit 97edfcc)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2019-07-24 10:03:48 -07:00
Sloane Hertel
2404579946 disable s3_lifecycle tests (#59311)
(cherry picked from commit 1d3f2c7764)
2019-07-22 19:01:15 -07:00
Sam Doran
d614abe02d [stable-2.6] Improve dnf test formatting and fix RHEL 8 module name (#58648)
- use single include_vars task rather than multiple set_fact tasks
- use multi-line YAML to break up long conditionals
- use version() test rather than direct comparisions
(cherry picked from commit 16d6fcf514)
2019-07-17 15:39:55 -07:00
Sandra McCann
73bbdf4392 Add a banner message to warn when not on latest documentation (#58526) (#58767)
* add banner to versions that are not latest
(cherry picked from commit 35b6345bdc)
2019-07-08 14:21:05 -05:00
Toshio Kuratomi
39adb25827 [stable-2.6] Fix unicode error in changelog generation
(cherry picked from commit fed90ef)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2019-07-05 11:47:36 -07:00
Toshio Kuratomi
749758e91f Update Ansible release version to v2.6.18.post0. 2019-07-03 13:41:35 -07:00
Toshio Kuratomi
a5f3791a91 New release v2.6.18 2019-07-03 09:43:54 -07:00
Sam Doran
f3ce22b168 Make nuage_vspk test more reliable
- don't background the nuage-vsd-sim
- increase the asncy timeout
- use uri to actually query the simulator API to make sure it is ready for connections

(cherry picked from commit 911a2ec6d3)
2019-06-26 14:54:25 -07:00
Matt Clay
d981461a7b [stable-2.6] Fix nuage_vspk integration test:
- Wait for API to be ready.
- Enumerate test cases on controller.
(cherry picked from commit 29de0619e8)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-06-26 14:54:25 -07:00
markafarrell
37284b0581 [stable-2.6] also allow None Type for safe eval (#58269)
(cherry picked from commit 8555b72)

Co-authored-by: markafarrell <mark.andrew.farrell@gmail.com>
2019-06-25 12:18:21 -07:00
Sam Doran
f71a7b9fbd [stable-2.6] Add Fedora 30 to test matrix (#57713)
Remove Fedora 28 from test matrix.
(cherry picked from commit 7b9d991f78)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-06-24 14:21:42 -07:00
Matt Clay
8047c3d53d [stable-2.6] Add work-around for scp issue in tests.
(cherry picked from commit 414ac12ddd)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-06-21 15:37:01 -07:00
Sam Doran
f44d23a601 [stable-2.6] passwordstore lookup - replace expired GPG key (#58141)
- Replace private key that expired an 2019-06-20 with a key that does not expire
- Document how to generate a new GPG key using an input file
(cherry picked from commit b9d77b997e)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-06-20 15:33:41 -07:00
Sandra McCann
33a92419a3 backport 2.6 - add dropdown version changer - 55655 (#58098) 2019-06-19 15:53:14 -05:00
Sam Doran
2aa20a9740 [stable-2.6] Change integration tests in order to pass on Fedora 30 (#58081)
* Use different package for DNF tests
    Ninja caused errors in Fedora 30. This works in both Fedora 29 and 30.

* Fix git integration tests
    Git >= 2.21.0 has either a bug or change in behavior where it errors when fetching a
    repository containing submodules that are behind the upstream submodule commits.
    It's weird and I don't fully understand it.

    Get around this my checking out specific commits from a repository rather than
    switch the origin URL.

* Fix PostgreSQL tests
    The error message is slightly different.
(cherry picked from commit 18feeb51a8)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-06-19 10:06:38 -07:00
Brian Coca
3ff6505e8f safe_eval fix (#57188)
* just dont pass locals

 - also fix globals
 - added tests

* fixed tests

(cherry picked from commit b9b0b23015)
2019-06-17 13:56:04 -07:00
Matt Clay
c68f53f951 [stable-2.6] Limit tests to paramiko < 2.5.0.
(cherry picked from commit 1e6edf2ccc)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-06-10 16:13:56 -07:00
Ed Costello
c112ab30b1 Update link to AWS guidelines to point at the devel docsite since the (#57467)
GUIDELINES.md has been moved to the docsite from devel on github.
2019-06-10 09:57:23 -05:00
Sandra McCann
7f845ffcd9 fix breadcrumbs (#57426) 2019-06-05 15:28:02 -05:00
Martin Krizek
b6c6046987 ansible-test: prefer shlex.quote (#56823)
(cherry picked from commit 484c023316)
2019-05-28 12:41:51 -07:00
Matt Martz
03bab95231 [stable-2.6] Validate types before asserting lengths (#56882)
(cherry picked from commit 9c5b721)

Co-authored-by: Matt Martz <matt@sivel.net>
2019-05-26 08:51:25 -07:00
Toshio Kuratomi
fb96b88122 Update Ansible release version to v2.6.17.post0. 2019-05-23 11:51:29 -07:00
Toshio Kuratomi
1b7828561e New release v2.6.17 2019-05-23 10:43:59 -07:00
Matt Clay
5cbc6b0566 [stable-2.6] win_get_url: ignore defender false positive in tests (#56826)
* [stable-2.6] win_get_url: ignore defender false positive in tests (#56812)
(cherry picked from commit 124400f319)

Co-authored-by: Jordan Borean <jborean93@gmail.com>

* Adapt tests to work without remote_tmp_dir.
2019-05-23 09:38:27 -07:00
Alicia Cozine
45e9ff7eb4
Removed misleading padding from highlighted results of a search query (#55464) (#56653)
(cherry picked from commit 0330ea616e)
2019-05-21 12:48:51 -05:00
Alicia Cozine
674980afcc
Backport/2.6/docs default lists (#56666)
* Improve rendering of default lists (#56041)

(cherry picked from commit 53ed1bfc49)

* Add compat tojson filter for jinja2 versions missing it (#56596)

(cherry picked from commit 3f4a22d8ef)
2019-05-21 11:51:56 -05:00
Alicia Cozine
e61a089b5e
Speed up the Sphinx documentation build (#55593) (#56663)
* speeds up the docs build by changing the navigation collapse setting

(cherry picked from commit 47a440774f)
2019-05-21 11:46:27 -05:00
Alicia Cozine
80d37638c6
Update default roles_path documentation (#56320) (#56664)
(cherry picked from commit c1ebc8d9c2)
2019-05-20 17:11:25 -05:00
Alicia Cozine
99fdfbe93f
creates reversed glob TOCs for porting guide and roadmap index pages (#56656) 2019-05-20 17:10:33 -05:00
Alicia Cozine
50418e7532
clean backport of PR 56355 (#56652) 2019-05-20 17:08:16 -05:00
EvgenyF
83f09036a2 [stable-2.6] Changing the license to Apache 2
(cherry picked from commit ea4842c0d3)

Co-authored-by: EvgenyF <evgenyf@radware.com>
2019-05-20 12:28:46 -07:00
Sandra McCann
e988a85a0e [backport][Doc-Release-2.8] backport release table for 2.8 (#56661)
* backport table of supported releases
2019-05-20 13:26:55 -05:00
Jordan Borean
327016404d win_acl - fix network path qualifier parsing (#55970)
(cherry picked from commit cc3b8b9f72)
2019-05-17 23:20:59 -04:00
Matt Martz
7a1ccef131 [stable-2.6] Bump erlang ping to 1:20.3.8.18-1
(cherry picked from commit 4b00141)

Co-authored-by: Matt Martz <matt@sivel.net>
2019-05-16 12:00:15 -04:00
James Tanner
79ae21e68e [stable-2.6] Nullify improperly licensed test file
(cherry picked from commit 940d58e)

Co-authored-by: James Tanner <tanner.jc@gmail.com>
2019-05-15 15:17:49 -04:00
Matt Clay
f3f266874c [stable-2.6] Install rabbitmq from s3 in tests..
(cherry picked from commit e105f5b436)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-04-30 12:41:05 -05:00
Sandra McCann
7e5d22d0c2 Update Ansible docsite CSS to fix multi-page printing issue (#51472) (#55667)
* Update css to fix multi-page printing issue
* Add margin edit

(cherry picked from commit 51ac4d3441)
2019-04-23 14:04:04 -05:00
Martin Krizek
3ae0296b14 ansible-test yamllint: fix UnicodeDecodeError (#55364)
* ansible-test yamllint: fix UnicodeDecodeError

* Conditional fix

(cherry picked from commit f8bebc61c8)
2019-04-22 09:37:50 -07:00
Dag Wieers
c1b640b65d ACI: Ensure we use native strings for signature (#55163)
* ACI: Ensure we use native strings for signature

* Add changelog fragment
2019-04-16 14:57:50 -07:00
Matt Clay
126b68591d [stable-2.6] Fix ansible-test unicode error with redact option.
(cherry picked from commit 2ef4ba3b4d)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-04-15 13:34:30 -07:00
Jordan Borean
2fab4dd204 win_domain - fix for checking for domain on new host (#55195)
(cherry picked from commit 6039ff9a24)
2019-04-12 12:28:53 -07:00
Matt Clay
a3f1fda8de [stable-2.6] Compat fix for ansible-core-ci on Python 3.7.
(cherry picked from commit 5b133f3455)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-04-10 10:47:45 -07:00
Matt Clay
29bbb1b3bb [stable-2.6] Fix apache shutdown in subversion test.
(cherry picked from commit 58f4947ffe)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-04-08 11:19:43 -07:00
Matt Clay
2f48995a24
[stable-2.6] Limit supervisor in tests to < 4.0.0. (#54938)
Tests fail when using version 4.0.0.

(cherry picked from commit 4b3662605d)
2019-04-05 18:33:24 -07:00
Lukasz Szczesny
0d3b577774 Backport/2.6/54105 pamd: fix idempotence issue when removing rules 2019-04-04 12:08:06 -07:00
Martin Krizek
8b05790a45 2.6: Fix copy module to reset filesystem acls (#51868) (#54795)
* Fix copy module to reset filesystem acls (#51868)

The controller's fixup_perms2 uses filesystem acls to make the temporary
file for copy readable by an unprivileged become user. On Python3, the
acls are then copied to the destination filename so we have to remove
them from there.

We can't remove them prior to the copy because we may not have
permission to read the file if the acls are not present. We can't
remove them in atomic_move() because the move function shouldn't know
anything about controller features. We may want to generalize this into
a helper function, though.

Fixes #44412

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
(cherry picked from commit d15812fabf)

* Fix get_bin_path usage
2019-04-04 12:07:26 -07:00
Toshio Kuratomi
61aa22f32a Update Ansible release version to v2.6.16.post0. 2019-04-04 10:30:55 -07:00
Toshio Kuratomi
da048ae80d New release v2.6.16 2019-04-03 15:38:52 -07:00
Matt Clay
d2d7556da7 [stable-2.6] Reduce testing of Ubuntu versions.
Removing:

- Ubuntu 14.04 with Python 2.7
- Ubuntu 16.04 with Python 3.5

Keeping:

- Ubuntu 16.04 with Python 2.7
- Ubuntu 18.04 with Python 3.6.
(cherry picked from commit c8f2becb7a)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-04-02 22:52:00 -07:00
Simon Westphahl
7d6c925e38 Catch all request timeouts for winrm connection (#54104)
* Catch all request timeouts for winrm connection

The current implementation only catches 'ConnectTimeout' exceptions.
Instead we should catch 'Timout' which also catches ReadTimeout
exceptions.

Improves on: #51744

Co-Authored-By: westphahl <westphahl@gmail.com>

* Changelog for winrm error handling improvement
2019-04-01 14:38:52 -07:00
Jordan Borean
707c75ab0b win_user_right - fix non json output issue (#54495)
(cherry picked from commit e2d2874d81)
2019-04-01 14:38:17 -07:00
Jordan Borean
40edb80f39 Get tests working on older Ansible versions 2019-04-01 14:37:42 -07:00
Jordan Borean
2166d4bc48 win_acl - remove test return values
(cherry picked from commit 1034b892df)
2019-04-01 14:37:42 -07:00
Jordan Borean
64eb25eb1d win_acl - fix support for registry paths (#54427)
(cherry picked from commit 10f006036c)
2019-04-01 14:37:42 -07:00
Felix Fontein
e1c53bdfed openssl_publickey: fix handling of OpenSSH private keys with passphrase (#54192)
* Cleanup.
* Make sure that OpenSSH passphrases are handled correctly.
* Add changelog.

(cherry picked from commit 1a94cf140c)
2019-03-22 11:16:28 -07:00
Matt Clay
d983dbad27 [stable-2.6] Disable failing azure_rm_managed_disk test.
(cherry picked from commit 1a286a95e5)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-03-21 07:10:50 -07:00
Matt Clay
0e4558e805 [stable-2.6] Add constraint for deepdiff.
(cherry picked from commit 9a135fbcef)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-03-19 15:19:09 -07:00
Jordan Borean
92b3c3a65b win_file - fix glob like paths (#54003)
(cherry picked from commit c053bc1fc7)
2019-03-19 11:09:35 -07:00
Jordan Borean
1859c5bac6 win_copy - fix glob like paths (#54006)
(cherry picked from commit 2f1bc34589)
2019-03-19 11:09:35 -07:00
Jordan Borean
fed3df4d44 win_certificate_store - fix glob like paths (#54007)
(cherry picked from commit eb18df1a0f)
2019-03-19 11:09:35 -07:00
Jordan Borean
7c800167c0 win_find - fix glob like paths (#54005)
(cherry picked from commit 8a4079ddbf)
2019-03-19 11:09:35 -07:00
Jordan Borean
0429b10ddc Merge pull request #53845 from jborean93/win-paths-2.6
Windows - Fix issues with glob like path chars - 2.6
2019-03-18 14:35:28 -07:00
Toshio Kuratomi
00a02574c2 Make the timeout decorator raise an exception out of the function's scope (#49921)
* Revert "allow caller to deal with timeout (#49449)"

This reverts commit 63279823a7.

Flawed on many levels

* Adds poor API to a public function
* Papers over the fact that the public function is doing something bad
  by catching exceptions it cannot handle in the first place
* Papers over the real cause of the issue which is a bug in the timeout
  decorator
* Doesn't reraise properly
* Catches the wrong exception

Fixes #49824
Fixes #49817

* Make the timeout decorator properly raise an exception outside of the function's scope

signal handlers which raise exceptions will never work well because the
exception can be raised anywhere in the called code.  This leads to
exception race conditions where the exceptions could end up being
hanlded by unintended pieces of the called code.

The timeout decorator was using just that idiom.  It was especially bad
because the decorator syntactically occurs outside of the called code
but because of the signal handler, the exception was being raised inside
of the called code.

This change uses a thread instead of a signal to manage the timeout in
parallel to the execution of the decorated function.  Since raising of
the exception happens inside of the decorator, now, instead of inside of
a signal handler, the timeout exception is raised from outside of the
called code as expected which makes reasoning about where exceptions are
to be expected intuitive again.

Fixes #43884

* Add a common case test.

Adding an integration test driven from our unittests.  Most of the time
we'll timeout in run_command which is running things in a subprocess.
Create a test for that specific case in case anything funky comes up
between threading and execve.

* Don't use OSError-based TimeoutError as a base class

Unlike most standard exceptions, OSError has a specific parameter list
with specific meanings.  Instead follow the example of other stdlib
functions, concurrent.futures and multiprocessing and define a separate
TimeoutException.

* Add comment and docstring to point out that this is not hte Python3 TimeoutError

(cherry picked from commit bd072fe83a)
2019-03-18 14:35:04 -07:00
Jordan Borean
19dfb2f396 Handle binary files when scanning metadata in python 3 (#53773)
(cherry picked from commit c2466c545b)
2019-03-18 14:34:27 -07:00
Jordan Borean
a36b86c0c0 win_psexec: make the tests more stable (#53716)
(cherry picked from commit 33939f7fe8)
2019-03-18 14:33:40 -07:00
Matt Clay
b4aa70e0a1 [stable-2.6] Changelog lint and generation bug fixes. (#53792)
* Add missing dict entry for changelog generation.
* Enforce str and list types on sections.
* Check type of section list items.
* Support non-ascii characters in changelogs..
(cherry picked from commit 90a38670be)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-03-15 10:11:02 -07:00
Jordan Borean
7ee89d4ac6 win_chocolatey Fix incompatibilities with latest Chocolcatey release 2019-03-15 10:10:41 -07:00
Toshio Kuratomi
995a7e6453 Update Ansible release version to v2.6.15.post0. 2019-03-14 21:39:41 -07:00
Toshio Kuratomi
dd6a174ff0 New release v2.6.15 2019-03-14 20:21:57 -07:00
Matt Clay
2cae458ba9 [stable-2.6] Keep existing to_yaml behavior with pyyaml >= 5.1. (#53772)
In pyyaml versions before 5.1 the default_flow_style for yaml.dump
was None. Starting with 5.1 it is now False. This change explicitly
sets the value to None to maintain the original to_yaml behavior.

The change to pyyaml was made in the following commit:

507a464ce6
(cherry picked from commit 7f0e09aa31)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-03-13 18:30:30 -07:00
S
4c3a5629b3 Fixed win_file crash with hidden files (#52584)
* Fixed crash with hidden files

added "-force" parameter on "Get-Item" cmdlet. this is needed to get file info if the file is "hidden" 
without this option modules like win_file, win_template, win_copy crashes on hidden files. this is because with "test-path" it sees that the file exists, but "get-item" can't get the file info. 
for more information on "-force option": https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-item

* Add changelog and integration tests

* fix tests for older Windows versions

(cherry picked from commit 3bc474bf99)
2019-03-11 11:50:10 -07:00
Jordan Borean
1e8b9daaa2 win_domain: fix issue when running without credential delegation (#53480)
* win_domain: fix issue when running without credential delegation

* Add check for reboot is required to complete role e install

* Fix changelog sanity issue

* removed meta file accidentally committed

(cherry picked from commit 008db85d44)
2019-03-11 11:49:48 -07:00
Sloane Hertel
b7b780650d Mark ec2_vpc_vgw as disabled to avoid hitting the resource limit (#53082)
* Mark ec2_vpc_vgw as disabled to avoid hitting the resource limit

(cherry picked from commit c4d0c58c5a)
2019-03-08 22:39:47 -08:00
Jordan Borean
2bf946d25e winrm - try and recover from a send input failure (#53187) (#53306)
(cherry picked from commit ae24bbff4a)
2019-03-06 14:49:49 -08:00
Jordan Borean
8b483b1640 OpenSUSE - Add OpenSUSE 15 test containers (#52793)
* OpenSUSE - Add OpenSUSE 15 test containers ci_complete

* Reset matrix back to normal

* Set container version instead of latest

* Remove old Docker completion file

(cherry picked from commit 3635c59b23)
2019-03-04 17:10:55 -08:00
Jordan Borean
1ab1c22659 Add changelog fragment 2019-03-04 07:13:35 -08:00
Robin Roth
150edc4605 Make zypper work with python3
(cherry picked from commit 24e94ec3c6)
2019-03-04 07:13:35 -08:00
Wojciech Sciesinski
8ac0f26b28 Don't run integration tests for OS'es older than Windows 2016 (#53057) 2019-03-01 15:14:37 -08:00
s-hertel
19590192f4 fix no_log indentation so AWS temporary credentials aren't displayed in tests
(cherry picked from commit 6cacbcba665af685608253d16275d3bcf33dfa79)
2019-03-01 15:13:46 -08:00
Dag Wieers
fd38985604 ACI: Fix examples in documentation (stable-2.6) 2019-02-26 10:05:17 -08:00
Jordan Borean
91dee57e5f Suse add py3 package vars (#52794)
(cherry picked from commit 80652ad054)
2019-02-22 11:05:44 -08:00
Jordan Borean
c078da9e09 test - add setup target that creates the nobody user (#52750)
* test - add setup target that creates the nobody user

* do not set explicit gid/uid for nobody user

* Do no create group and only touch basic attributes

(cherry picked from commit 17bfc60423)
2019-02-22 11:05:25 -08:00
Jordan Borean
b94a34d9fa test - add Python 3 package for OpenSUSE in setup_openssl (#52775)
(cherry picked from commit 63c22f6eb0)
2019-02-21 17:07:58 -08:00
Jordan Borean
68507a55b8 fix filesystem tests on OpenSUSE 15+ (#52716)
(cherry picked from commit 5e3e0eb946)
2019-02-21 17:07:47 -08:00
Jordan Borean
8964ef5cfc test suse: get tests working on newer OpenSUSE distributions (#52539)
(cherry picked from commit c312287731)
2019-02-21 17:07:25 -08:00
plumbeo
9fcfd0a221 backport/2.6/40092 (#51910)
* mysql_user: Match quotes, double quotes and backticks when checking current privileges

(cherry picked from commit 1ae0e2138332dad30f5bdd9a46d46b1abf9be868)

* Add changelog fragment for PR #40092

(cherry picked from commit 8974ce3c78557a4ea36b7c33b5dc9361bdea92a1)

* mysql_user: fix malformed regex used to check current privileges
2019-02-21 16:40:55 -08:00
Toshio Kuratomi
a8a07fc66d Update Ansible release version to v2.6.14.post0. 2019-02-21 12:48:13 -08:00
Toshio Kuratomi
446012263a New release v2.6.14 2019-02-21 09:18:18 -08:00
Jordan Borean
f66c006d8c git: kill gpg-agent in tests on newer OpenSUSE hosts (#52476)
(cherry picked from commit bb0a69e084)
2019-02-18 10:19:58 -08:00
Zim Kalinowski
92e62a1bf1 resolved merge conflicts 2019-02-18 10:17:50 -08:00
Zim Kalinowski
ef54e0410c fixed merge conflicts 2019-02-18 10:17:15 -08:00
Zim Kalinowski
22709af2e9 Fixing managed disk facts (#51781)
(cherry picked from commit 0c8c72a0bf)
2019-02-18 10:16:48 -08:00
Jordan Borean
77e2512744 alternatives - fix OpenSUSE dir on newer distros (#52458)
(cherry picked from commit 3ecd6e19f7)
2019-02-18 10:13:07 -08:00
Jordan Borean
7c33ce5542 zypper_repository: fix return check on newer OpenSUSE versions (#52457)
(cherry picked from commit d6453a79f5)
2019-02-18 10:11:34 -08:00
Jordan Borean
81b022b4ed zypper: fix tests to use new URL for OpenSUSE 15.0 (#52453)
(cherry picked from commit 4b296da6a2)
2019-02-18 10:10:49 -08:00
Zim Kalinowski
c9449694b8 Backport/2.6/45378 (#52448)
* backporting fix for sql tags

* removed unnecessary tests
2019-02-18 10:10:23 -08:00
Jordan Borean
07e0de6cf1 opensuse - install password-store from specific repo (#52439)
(cherry picked from commit 4a94bd8d9d)
2019-02-18 10:09:23 -08:00
Simon Westphahl
ab4cfa1b50 Backport: Raise AnsibleConnectionError on winrm connnection errors (#52226)
* Raise AnsibleConnectionError on winrm con errors

Currently all uncaught exceptions of the requests library that is used
in winrm will lead to an "Unexpected failure during module execution".

Instead of letting all exceptions bubble up we catch the connection
related errors (inkl. timeouts) and re-raise them as
AnsibleConnectionError so Ansible will mark the host as unreachable and
exit with the correct return code.

This is especially important for Zuul (https://zuul-ci.org) to
distinguish between failures and connection/host related errors.

* Update lib/ansible/plugins/connection/winrm.py

Co-Authored-By: westphahl <westphahl@gmail.com>

* Add changelog fragment
2019-02-14 12:46:43 -08:00
Wojciech Sciesinski
bec375d691 Install the NuGet package provider if needed (#52130)
* Install the NuGet package provider if needed

* Add the changelog fragment file
2019-02-14 12:46:05 -08:00
Matt Martz
4be3215d2f [stable-2.6] Disallow use of remote home directories containing .. in their path (CVE-2019-3828) (#52133)
* Disallow use of remote home directories containing .. in their path

* Add CVE to changelog
(cherry picked from commit b34d141)

Co-authored-by: Matt Martz <matt@sivel.net>
2019-02-13 09:24:28 -08:00
Jordan Borean
b5122be9e1 Add Windows Server 2019 to Shippable matrix (#51685)
* Test out Server 2019 - ci_complete

* run tests and continue on error - ci_complete

* Add the full matrix back in

(cherry picked from commit 0334c20630)
2019-02-13 08:12:43 -08:00
Jordan Borean
19d20304de win become - fix token elevation issues
This is an implementation of 8bffcf8e50
that was done in the PR https://github.com/ansible/ansible/pull/48082 to devel.
The changes have been manually brought across to the the stable-2.7 branch as it
cannot be cleanly cherry picked due to the substantial differences in become
between these versions.

Currently we impersonate the `SYSTEM` token in order to elevate our become
process with the highest privileges it has available but there are some edge
cases where the first `SYSTEM` token we come across doesn't have the
`SeTcbPrivilege` which is required for the above. This PR adds a further check
in the search for a `SYSTEM` token to make sure it has the `SeTcbPrivilege`
before continuing.

(cherry picked from commit cc5088c9e1)
2019-02-12 11:30:42 -08:00
Matt Davis
adbe9d5d9e fix string_format sanity check (#51780)
* newer version of Pylint moved the impl; use conditional import to find for new/old

(cherry picked from commit 6654c7aeea)
2019-02-11 12:27:02 -08:00
Wojciech Sciesinski
abe3437119 Correct integration tests for the win_disk_facts module (#51044)
* Correct integration tests for the win_disk_facts module

* Exclude W2K8, W2K8-R2 from tests run under CI
2019-02-11 12:26:32 -08:00
Toshio Kuratomi
2f41b12076 Update Ansible release version to v2.6.13.post0. 2019-02-07 17:16:22 -08:00
Toshio Kuratomi
97a37b9ebc New release v2.6.13 2019-02-07 14:08:03 -08:00
Matt Davis
de1c9ff56c [stable-2.6] fix azure_rm_deployment test
* recent changes to args for hosted template file broke the test; changed test to use a specific known-working commit instead of `master`.
* long-term may want to consider hosting the template in httptester or just embedding a local copy
(cherry picked from commit 46bf387)

Co-authored-by: Matt Davis <mrd@redhat.com>
2019-02-07 13:22:19 -08:00
Jordan Borean
4829854791 Get docker tests working on OpenSUSE (#51896)
(cherry picked from commit c92fcf0b57)
2019-02-07 13:12:18 -08:00
Jordan Borean
c96b9cda21 test win_setup - make py3 compatible (#51693)
(cherry picked from commit f78cdcd2c5)
2019-02-04 12:34:19 -08:00
Jordan Borean
2255325287 win_service - use custom binary for tests (#51689)
(cherry picked from commit 2e99dea867)
2019-02-04 12:32:21 -08:00
Jordan Borean
5d7064db66 fix for proper variable name 2019-02-04 12:31:44 -08:00
Jordan Borean
72703bd3b7 win_power_plan: fix for Windows 10 and Server 2008 compatibility (#51471)
(cherry picked from commit f27078df52)
2019-02-04 12:31:44 -08:00
Brian Coca
e9e3999ddc Handle complex quoting in extra args in pull cli (#50212)
* added tests

fixes #40729

(cherry picked from commit b6824669df)
(cherry picked from commit e010034151)
2019-02-04 12:28:27 -08:00
Jordan Borean
114d5c0368 ansible-test: make the httptester for Windows more resiliant around the shell chosen (#51416)
(cherry picked from commit ce8db479f0)
2019-01-31 08:43:04 -08:00
Jordan Borean
251961897a ansible-test: add Ubuntu 18.04 container (#50790)
* ansible-test: Add Ubuntu 18.04 to Shippable CI nodes

* re-add ubuntu1604/3 to matrix

* forgot to add environment for git kill gpg-agent

(cherry picked from commit 828df4b336)
2019-01-24 12:00:59 -08:00
Sam Doran
197daf095b Catch sshpass authentication errors and don't retry multiple times to prevent account lockout (#50776)
* Catch SSH authentication errors and don't retry multiple times to prevent account lock out

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Subclass AnsibleAuthenticationFailure from AnsibleConnectionFailure

Use comparison rather than range() because it's much more efficient.

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Add tests

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Make paramiko_ssh connection plugin behave the same way

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Add changelog

Signed-off-by: Sam Doran <sdoran@redhat.com>
(cherry picked from commit 9d4c0dc111)
2019-01-24 10:43:11 -08:00
Matt Clay
ae96e6e261 [stable-2.6] Disable failing azure_rm_postgresqlserver test..
(cherry picked from commit 37767849ee)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-01-22 22:35:06 -08:00
Abhijeet Kasurde
5613bb311f Merge pull request #51118 from Akasurde/backport/2.6/51047
[backport/2.6] Update vmware.py minor typo
2019-01-21 08:34:22 -08:00
Jacob Olsen
c77f6b1d8c check for chroot in systemd module (#43904)
* check for result['status'] in systemd module

* instead of checking for result['state'], actually check for chroot and warn

* allow systemctl status to work if in a chroot, update warn text

* simply change warning message


(cherry picked from commit 37960ccc87)
2019-01-21 08:34:11 -08:00
Matt Clay
182b5c621c [stable-2.6] Fix subversion integration test on Fedora 29. (#51089)
* Fix subversion integration test on Fedora 29.

This upgrades the sqlite-libs and subversion packages to make sure
that the version of sqlite expected by subversion is installed.

* Fix compatibility with RHEL and CentOS.
(cherry picked from commit d4dbc7f2e0)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-01-18 16:24:39 -08:00
Ganesh Nalawade
60a867441e Fix mandatory statement error for junos modules (#50074)
* Fix mandatory statement error for junos modules

Fixes #40267

*  Add error regex in junos terminal plugin to error out
   in case of commit fails

*  If commit fails add logic to discard changes before existing
   else next task will result in error

* Add integration test

* Minor update

(cherry picked from commit cc8e90395a)
2019-01-18 12:54:47 -08:00
Arnab Rakshit
82661d5cf4 Fixed broken link in _docker.py (#50950)
* Fixed broken link in _docker.py

* Update lib/ansible/modules/cloud/docker/_docker.py

Co-Authored-By: ArnabRaxit <arnabready@gmail.com>
2019-01-18 12:54:04 -08:00
Jordan Borean
6b485fb8f5 ansible-test git: kill gpg-agent to remove locks (#50917)
* ansible-test git: kill gpg-agent to remove locks

* skip gpg-agent kill for OpenSUSE

(cherry picked from commit 3db6b9b416)
2019-01-18 12:53:28 -08:00
Jordan Borean
9f95850fa7 ansible-test: fix cloud_init_data_facts for Ubuntu 18.04 (#50916)
(cherry picked from commit 03669cdcdd)
2019-01-18 12:53:28 -08:00
Jordan Borean
7b716a11c4 ansible-test: fix dpkg_selections on Ubuntu 18.04 (#50915)
(cherry picked from commit a54eb58156)
2019-01-18 12:53:28 -08:00
Jordan Borean
208dd467a8 ansible-test: add postgresql var file for Ubuntu 18.04 (#50914)
(cherry picked from commit 8c5b2048de)
2019-01-18 12:53:28 -08:00
Jordan Borean
4f7cf928fb ansible-test: rename setup_mysql_db Ubuntu name to work with 18.04 (#50907)
(cherry picked from commit 518699988f)
2019-01-18 12:53:28 -08:00
Jordan Borean
428f8da941 ansible-test: apt cleanup and futher 18.04 fixes (#50906)
(cherry picked from commit bbad033a5e)
2019-01-18 12:53:28 -08:00
Jordan Borean
8ca2abf292 ansible-test setup_dep_repo trust package repo (#50795)
(cherry picked from commit 2fcc3593cc)
2019-01-18 12:53:28 -08:00
Jordan Borean
798b240cd6 test subversion - support Ubuntu 18.04 (#50791)
(cherry picked from commit 91522bd9c4)
2019-01-18 12:53:28 -08:00
Jordan Borean
c18cf08a91 setup_rabbitmq - fix erlang pinned dependencies (#51048)
(cherry picked from commit 18c35b69fb)
2019-01-17 16:57:50 -08:00
Toshio Kuratomi
0a4f113e44 Update Ansible release version to v2.6.12.post0. 2019-01-17 11:17:32 -08:00
Toshio Kuratomi
3996d84173 New release v2.6.12 2019-01-17 09:19:17 -08:00
Brian Coca
421a378022 added missing docs for option in acl module (#50775) (#50806)
* added missing docs for option in acl module (#50775)

* added missing docs for option in acl module
* remove acl from ignore

(cherry picked from commit 91d8383898)
2019-01-16 13:54:01 -08:00
Jérémy Lecour
f9dcf40de5 [backport 2.6] Lineinfile must not insert lines multiples times with insertbefore/insertafter (#50086)
* Change test suite to fit expected behaviour

This reverts some changes from ansible/ansible@723daf3
If a line is found in the file, exactly or via regexp matching, it must
not be added again.
insertafter/insertbefore options are used only when a line is to be
inserted, to specify where it must be added.

(cherry picked from commit 31c11de2af000972ba13f584e82001a2bc9c062a)
(cherry picked from commit eb92ce3d6f036be24fee1bad479daa4e6bc33221)

* Implement the change in behaviour mentioned in the previous commit

(cherry picked from commit a4141cfa2e49973310bba8c0962ef82d66c35f29)
(cherry picked from commit 6afe25d93e9bfe8059e7aa013b412984e272529d)

* Fix comment to reflect what the code does

(cherry picked from commit 150f5cb232f10e38509823cb5864a9fd800b6df5)
(cherry picked from commit 1a13bf06a3b6920c2c99094980bc85ae53e661cd)

* Set the correct return message.

In these cases, the lines are added, not replaced.

(cherry picked from commit 3216c31401d15906e2435422e71dfb96e30678c4)
(cherry picked from commit 5bd04bd5d57dd283de46ae3049dde6e97cdcf0e0)

* Add a changelog

(cherry picked from commit c39cf6b33269eac35c3c769de41e7c3dea642b68)
(cherry picked from commit fc071636b47c6982eb9b5a508545f78ad8e70e96)
2019-01-14 17:52:18 -08:00
Felix Fontein
ed945c7f36 docker_volume: revert #47390 (#50663)
* Revert "Fix option change detection / force support for docker_volume. (#47390)"

This reverts commit 8ef994fbc5.

* Update changelog.

* Adjusting tests.

(cherry picked from commit 0e7a9a2771)
2019-01-14 16:35:56 -08:00
Matt Clay
26b8fbddad [stable-2.6] Cleanup integration test inventory. (#50753)
* Move var_blending test inventory into test.
* Remove Amazon specific inventory entry for tests.
* Remove Azure specific inventory entry for tests.
* Move var_precedence test inventory into test.
* Move unicode test inventory into test.
* Remove unused inventory entry.
* Move gathering_facts test inventory into test.
* Move delegate_to test inventory into test.
* Clean up inventory for binary_modules test.
* Clean up integration test inventory..
(cherry picked from commit e5094e8071)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-01-11 19:46:44 -08:00
Sloane Hertel
5b8e465fc3 [stable-2.6] Add unstable alias to s3_bucket integration tests (#50508)
(cherry picked from commit d21ed42f4b)

Co-authored-by: Sloane Hertel <shertel@redhat.com>
2019-01-11 16:59:07 -08:00
Matt Clay
644a155da1 [stable-2.6] Move unrelated connection test to separate target.
(cherry picked from commit d59bc9ae48)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-01-11 15:49:55 -08:00
Matt Clay
62b4376561 [stable-2.6] Fix dpkg_selections integration test.
Download package from S3 since the previous location no longer exists.
(cherry picked from commit fd56788a14)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-01-11 10:27:47 -08:00
Matt Clay
935f07b6fa [stable-2.6] Disable retry files for integration tests.
(cherry picked from commit 39824f50b1)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-01-09 23:43:57 -08:00
Matt Clay
64225c0d2b [stable-2.6] Improve performance of no-tests-as-filters test.
(cherry picked from commit 7995f69a44)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-01-09 23:27:14 -08:00
Sviatoslav Sydorenko
9783e98043 [stable-2.6] 🚸 🐍 🍒 ⛏ Integrate cherry picker (#41403)
This enables developers to use cherry-picker for backporting purposes.
This tool originally comes from Core Python Development Workflow.

Ref: https://pypi.org/p/cherry-picker
Ref: https://github.com/python/core-workflow/tree/master/cherry_picker

Also:
* 📝 Add docs about supporting cherry-picker
(cherry picked from commit 97cc0cce7f)

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2019-01-09 22:21:52 -08:00
Matt Clay
fab9249597 [stable-2.6] Minor cleanup of code-smell tests. (#45658)
* Minor cleanup of code-smell tests.
* Add exception handling for YAML load..
(cherry picked from commit e7426e3795)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-01-09 21:48:19 -08:00
Matt Clay
df4ea96e94 Use relative inventory paths instead of symlinks.
(cherry picked from commit 4915920d71)
2019-01-09 21:11:48 -08:00
Matt Clay
f01caec0cb Move any_errors_fatal test inventory into test.
(cherry picked from commit c04b69208d)
2019-01-09 21:11:48 -08:00
Matt Clay
7be568fe39 Move include_import test inventory into test.
(cherry picked from commit 828e8d4957)
2019-01-09 21:11:48 -08:00
Matt Clay
c0592484f0 Move strategy_linear test inventory into test.
(cherry picked from commit 893548addb)
2019-01-09 21:11:48 -08:00
Brian Coca
bcdd9abcd3 allow openstack invetnory to work cacheless
fixes #45431

(cherry picked from commit a47671aad1)
2019-01-09 17:03:47 -08:00
Dag Wieers
c2f6116476 win_firewall_rule: Remove invalid 'bypass' action (2.6 backport) (#50224)
* win_firewall_rule: Remove invalid 'bypass' action

This fixes #50143

* Add changelog fragment
2019-01-09 16:28:44 -08:00
Dag Wieers
d774a795d7 win_updates: Correctly report changes on success (2.6 backport) (#50226)
* win_updates: Correctly report changes on success

* Add changelog fragment
2019-01-09 15:48:23 -08:00
Jordan Borean
fb5cd98b6a win_psexec: added the pid return value to the docs (#50664)
(cherry picked from commit 13a2a8b5f6)
2019-01-09 15:38:36 -08:00
Matt Clay
a95c1e62bf [stable-2.6] Fix run.py --branch argument.
The API docs state that both `branch` and `branchName` are valid,
but only `branchName` appears to work.
(cherry picked from commit 31c1bdd6a8)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-01-07 16:50:34 -08:00
Matt Clay
056c1a057e [stable-2.6] Fix rabbitmq_plugin test.
These changes were part of a feature pull request, which is why they were not backported:

https://github.com/ansible/ansible/pull/48599
(cherry picked from commit cd9b364da8)

Co-authored-by: Matt Clay <matt@mystile.com>
2019-01-07 16:26:48 -08:00
Jordan Borean
a574e0a1c9 win_copy - fix remote dir copy when it contains an empty dir (#50126)
(cherry picked from commit 65ce1b727e)
2019-01-07 16:07:50 -08:00
Jordan Borean
daf5c86338 win_lineinfile - fix malformed returned json (#50066)
(cherry picked from commit efda3eaf1c)
2019-01-07 15:17:13 -08:00
Jordan Borean
23a633a31a ansible test: re-enable mysql tests with fix (#50430)
(cherry picked from commit 6620facd19)
2019-01-07 14:49:33 -08:00
Matt Clay
6ba039cc6a [stable-2.6] Add env command to ansible-test and run in CI. (#50176)
* Add `env` command to ansible-test and run in CI.
* Avoid unnecessary docker pull.
(cherry picked from commit 01833b6fb1)

Co-authored-by: Matt Clay <matt@mystile.com>
2018-12-22 00:10:20 -08:00
Matt Clay
c47045c454 [stable-2.6] Add retries for Invoke-ScriptAnalyzer in pslint.
Hopefully this will work around the intermittent CI failures due
to NullReferenceException, which then succeed on a retry.
(cherry picked from commit 4bd60c313b)

Co-authored-by: Matt Clay <matt@mystile.com>
2018-12-21 20:27:20 -08:00
Jordan Borean
3adbac1344 ansible-test: change Fedora 24, 25 to 28, 29 (#49586) - 2.6 (#49588)
* ansible-test: change Fedora 24 to 28 (#49586)

(cherry picked from commit 5392caee14)

* ansible-test - swap Fedora 25 for 29 (#49634)

(cherry picked from commit 6a09db5131)

* test make sure everything passes

* skip yum tests on Fedora hosts
2018-12-21 17:16:42 -08:00
Matt Clay
e5b2b2ff2b Switch Azure DB tests from GP_Gen4_2 to B_Gen5_1.
Also switch from uswest to uswest2.

GP_Gen4_2 is more expensive and is no longer available in all regions.
The uswest location is also more expensive than uswest2.

This is a bug fix since GP_Gen4_2 is no longer available in uswest.

Applying this fix directly to older stable branches as the tests have
changed significantly in devel.
2018-12-21 12:21:48 -08:00
Matt Clay
2627522046 [stable-2.6] Fix MySQL tests when running under Docker. (#50047)
(cherry picked from commit 0ccd231afd)

Co-authored-by: Matt Clay <matt@mystile.com>
2018-12-17 23:02:10 -08:00
Matt Clay
f0a10a914a [stable-2.6] Add OverlayFS work-around for CloudStack tests.
(cherry picked from commit 61b5adcf31)

Co-authored-by: Matt Clay <matt@mystile.com>
2018-12-17 23:01:58 -08:00
Jordan Borean
dc79598008 ansible-test: do not upgrade homebrew to speed up tests (#49914)
(cherry picked from commit 695feea541)
2018-12-13 19:07:14 -08:00
Matt Clay
fa3bda8442 Update Ansible release version to v2.6.11.post0. 2018-12-13 14:02:51 -08:00
Matt Clay
5e03754e8f New release v2.6.11 2018-12-13 09:26:54 -08:00
Matt Clay
92fcb40ede [stable-2.6] Disable failing ec2_vpc_vpn_facts test.
(cherry picked from commit df1c9d0f25)

Co-authored-by: Matt Clay <matt@mystile.com>
2018-12-10 14:56:40 -08:00
Matt Clay
1e7d9a48af [stable-2.6] Fix template_jinja2_latest aliases file.
(cherry picked from commit a1a0893ebd)

Co-authored-by: Matt Clay <matt@mystile.com>
2018-12-10 13:40:31 -08:00
Trishna Guha
61263a357c changelog
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-12-10 12:14:32 -08:00
Mike Wiebe
deac323c48 Fix n3k power supply facts (#49150)
(cherry picked from commit af1e6878e9)
2018-12-10 12:14:32 -08:00
Steve Dodd
413df66ac5 Fix LLDP to use json (#48318)
(cherry picked from commit e51964e7a6)
2018-12-10 12:14:32 -08:00
Trishna Guha
303bf53eec do not override lldp neighbors nxos_facts (#48087)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 27075ab7dd)
2018-12-10 12:14:32 -08:00
Paul Neumann
67fba987bd nxos_facts: Do not gather redundant neighbor data (#49024)
* nxos_facts: Remove dead code

The commit e51964e made this redundant as the structured case is handled
elsewhere.

* nxos_facts: Do not gather neighbors redundantly

LLDP reports the neighbor using the abbreviated interface name, whereas
CDP reports the neighbor using the full interface name. Normalize the
local interface name in the LLDP case, so there is no redundant
information. Due to the order of the gathering, CDP neighbors are saved
in case both LLDP and CDP data is available on a certain interface.

(cherry picked from commit 2019f0e430)
2018-12-10 12:14:32 -08:00
Steve Dodd
4caef8413e Fix LLDP to use json (#48318)
(cherry picked from commit e51964e7a6)
2018-12-10 12:14:32 -08:00
Trishna Guha
30b7f833e5 nxos_facts fix NameError (#48981)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 8796085569)
2018-12-10 12:14:32 -08:00
Olivier BLIN
64b68effe4 Fix nxos modules idempotence issue (#46437)
* nxos_interface vlan and port-channel idempotence fix for mtu

* Fix MTU reconfiguration at each execution

* nxos_interface port-channel idempotence fix for mode (#44248)

* Fix trunk mode idempotence for port-channel
* Gather ethernet and port-channel code for mode management

* nxos_linkagg port-channel idempotence fix for channel-group's mode

The regex to retrieve channel-group's mode is not enough accurate.
Therefore, the swhitchport mode  was matched instead of the
channel-group's mode.

* This fix add accuracy to match the right configuration command

* Add support for switchport mode dot1q-tunnel in nxos_interface

* Fix layer reconfiguration at each execution

(cherry picked from commit c51407c806)
2018-12-10 12:14:32 -08:00
Mike Wiebe
e3c4e49f59 Fix issues with nxos_os_install module (#48811)
* Use expect module to copy files

* Remove old and redundant upgrade files

* Return error message instead of code

* Cleanup copy command code

* Fix force issue in nxos_install_os

* new nxos_install_os integration tests

* Uncomment transport tests

* Revert negative test change

* Remove combined option that is no longer required

* Make shippable happy

* Add n5k test files

(cherry picked from commit a721572206)
2018-12-10 12:14:32 -08:00
Brian Coca
424c68f15a ensure ssh retry respects no log (#49569) (#49725)
* ensure ssh retry respects no log (#49569)

(cherry picked from commit ba4c2ebeac)

* add cve
2018-12-10 12:01:00 -08:00
Abhijeet Kasurde
28004da517 [Backport 2.6] VMware: update docs and return docs for vmware_host_service_facts
Follow up of 45155

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit be21140384)
2018-12-10 11:16:00 -08:00
Jordan Borean
48e56745ef win_hotfix: use S3 bucket for update files in test (#49696)
(cherry picked from commit 478fcf7abb)
2018-12-10 10:46:04 -08:00
Jonathan Hanson
18ef3feed1 [Backport 2.6] Fix type in ansible-galaxy info output
Changed from 'intalled_version' to 'installed_version'

(cherry picked from commit 12a573a7db)
2018-12-10 09:29:25 -08:00
Vinay Dandekar
dcee72ffda [aws] Revert back to getting the AWS role name from the URI (#49428)
* Revert back to getting the AWS role name from the URI with a small change (#49113)

- The role name and instance profile name _can_ be different
- Change the delimiter to `:` for keys that are discovered through the JSON parsing (which is not a valid delimiter for AWS IAM role names), this delimiter is still converted to underscore
- Now checks for the existence of that delimiter to remove the cases where the JSON keys are appended to the role name to find the role name

(cherry picked from commit ff9b86f560)

* Changelog update
2018-12-10 09:27:55 -08:00
Abhijeet Kasurde
5a7b01f8b9 VMware: Fix module usages in module_utils (#49421)
* VMware: Fix module usages in module_utils
* Skip test for Python 2.6 as SSL context is not available in Python 2.6

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 1b04571ea0)
2018-12-10 09:15:40 -08:00
Abhijeet Kasurde
69ba01e953 Handle special service where package is not available (#45155)
There are several services e.g. vmware-fdm, which does not have package name and
package description which will raise a error if queried for.

(cherry picked from commit b3b65d16b8)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-12-10 09:10:49 -08:00
Jordan Borean
0afde7c334 ansible-test: recursively scan setup dependencies (#49170)
* ansible-test: recursively scan setup dependencies

* removed need for default set()

(cherry picked from commit 694c505452)
2018-12-10 09:01:57 -08:00
Tim Burke
961552e1b6 Fix ReST formatting for Galaxy docs link (#49575) (#49624)
(cherry picked from commit 6e43f9fe8f)
2018-12-07 16:45:35 -06:00
Sam Doran
d85290dd53 Add setup roles for passlib and pexpect for use with pause and vars_prompt tests (#43613)
* Add passlib to RHEL test instance

This looks like the only tests instance that is missing this libary. It is needed for vars_prompt tests.

* Create setup roles for pexect and passlib

Switch to using aliases rather than installing directly in the test scripts

(cherry picked from commit 96c2375692)
2018-12-06 11:50:11 -08:00
Jordan Borean
1833a24acc create local subversion server for tests (#49047)
* create local subversion server for tests

* fix sanity issues

* don't touch system config when bringing up site

* removed original setup files

* fix opensuse config

(cherry picked from commit 0420d606de)
2018-12-06 11:50:11 -08:00
Xaroth
b38d30810c [stable-2.6] -Fix: The Ubuntu 14.04 image on Shippable runs an old version of python, causing issues with checking out bitbucket, adjust tests to compensate. (#49433)
-Add: Mention bitbucket dropping TLSv1 and TLSv1.1 support as per 01 Dec 2018, potentially causing issues with older clients.
(cherry picked from commit a6db7f7abd)

Co-authored-by: Xaroth <xaroth+github@xaroth.nl>
2018-12-04 19:58:55 -08:00
Matt Clay
438b5b82d3
Merge pull request #49203 from mattclay/bp-2.6
[stable-2.6] Backport test infra updates and test fixes.
2018-12-04 13:29:04 -08:00
Matt Clay
cac34646d5 [stable-2.6] Add change classification for powershell wrappers.
(cherry picked from commit c25db4ee8d)

Co-authored-by: Matt Clay <matt@mystile.com>
2018-12-04 13:28:55 -08:00
Xaroth
8e7a8250e0 [stable-2.6] -Change: set the 'canonical_url' theme option to enable rendering of canonical urls, promoting the 'latest' docs to search engines. (#49190) (#49215)
(cherry picked from commit 59e7a9442e)

Co-authored-by: Xaroth <xaroth+github@xaroth.nl>
2018-11-30 15:40:54 -06:00
Matt Clay
fe1b646f7f Update Ansible release version to v2.6.10.post0. 2018-11-30 12:49:54 -08:00
Matt Clay
e459665d3b New release v2.6.10 2018-11-30 09:28:53 -08:00
Jordan Borean
ad36fbcd24 powershell - add bootstrap wrapper to packaging manifest 2018-11-30 08:47:48 -08:00
Matt Clay
04d87a76c1 Update Ansible release version to v2.6.9.post0. 2018-11-29 15:54:34 -08:00
Matt Clay
619c4173ea New release v2.6.9 2018-11-29 12:56:42 -08:00
Matt Kunkel
29ab1e78b7 Backport/2.6/44726 Fix calling deprecate with correct arguments (#48375)
* Fix calling deprecate with correct arguments (#44726)

This fixes #44702

(cherry picked from commit 66eec42f53)

* Backport PR#44726 - Fix deperecate call
2018-11-27 13:16:41 -08:00
Sam Doran
4eae4c1d63 [stable-2.6] Prevent duplicate entries in rhsm_repository module (#48107)
* Complie regular expressions for better performance

* Skip on empty lines

This fixes a bug where the previous repo would be inserted in the result twice since an empty line did not match any of the conditions that would exit the loop iteration.
(cherry picked from commit 1e3b704ff1)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2018-11-27 13:07:49 -08:00
Christopher Gadd
3267b204da [stable-2.6] make password locking in user module idempotent (#43671)
* Simplify logic and add FreeBSD & NetBSD

* Remove incorrect flag for lock and unlock on FreeBSD

* Add tests and changelog

Co-authored-by: Chris Gadd <gaddman@email.com>
(cherry picked from commit f75a84e382)

Co-authored-by: Christopher Gadd <gaddman@email.com>
2018-11-27 13:07:40 -08:00
nervo
1c6c2e5b0d Sysvinit - Enabling a service should use "defaults" if no runlevels are specified 2018-11-27 12:10:30 -08:00
Maciej Delmanowski
687df97b7b Backport/2.6/48580: Do not require TTY for 'apt-key' operations (#48888)
* Do not require TTY for 'apt-key' operations (#48580)

The 'gpg' command supports the '--no-tty' option, which disables any use
of a TTY during its execution. This parameter is sometimes required for
non-interactive operation to avoid any questions for the user.

The 'apt-key adv' command can pass additional parameters to the
underlying 'gpg' command. This patch adds the '--no-tty' option to avoid
issues with APT key imports when Ansible pipelining active, which
disables the use of a dedicated TTY.
(cherry picked from commit c7e2226035)

* Add changelog fragment about 'apt_key' no TTY fix

(cherry picked from commit 7033e1dfc022fc09c006ac48c306810350308ce4)
2018-11-27 12:06:24 -08:00
Sam Doran
f936309d93 user: fix removing the expiry time when it's 0 (#47115)
user: fix removing the expiry time when it's 0 (#47115)

* user: fix removing the expiry time when it's 0

* Improve tests and add changelog

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
(cherry picked from commit 41dfc5162f)
2018-11-27 12:01:04 -08:00
Matt Davis
4d748d34f9 split PS wrapper and payload (CVE-2018-16859)
* prevent scriptblock logging from logging payload contents
* added tests to verify no payload contents in PS Operational event log
* fix script action to send split-aware wrapper
* fix CLIXML error parser (return to -EncodedCommand exposed problems with it)
* addresses CVE-2018-16859
2018-11-27 11:54:56 -08:00
Matt Clay
6937268444 [stable-2.6] Fix unit test issues with pytest >= 4.0.0.
(cherry picked from commit feb5b0b299)

Co-authored-by: Matt Clay <matt@mystile.com>
2018-11-26 13:39:47 -08:00
jfpanisset
e33da22346 Manual cherry pick of commit e4a2d2423acde4ff53cd692b672748cfc8dfa465 in PR 47912 due to deleted (#48406)
repository. As requested back port documentation change from devel(2.8) to stable-2.6
2018-11-26 13:51:16 -06:00
Matt Martz
6969edc3c0 [stable-2.6] Prevent metadata changes in a stable branch (#48994). (#49134)
* [stable-2.6] Prevent metadata changes in a stable branch (#48994).
(cherry picked from commit 7287d396e2)

Co-authored-by: Matt Martz <matt@sivel.net>

* Address rebase issues

* Fix metadata comparison
2018-11-26 11:09:11 -08:00
Matt Clay
cc7e480c75 Update Ansible release version to v2.6.8.post0. 2018-11-15 19:00:32 -08:00
Matt Clay
af5ef7c802 New release v2.6.8 2018-11-15 14:23:45 -08:00
Toshio Kuratomi
432b9cc25b [stable-2.6] Add an example to serial usage (#48669) (#48694)
(cherry picked from commit b759862daa)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-11-15 15:33:37 -06:00
Toshio Kuratomi
732fc01895 [stable-2.6] Fix the changelog links to porting guide to be anonymous
Prevents duplicate reference errors.
(cherry picked from commit 0070928)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-11-15 13:31:31 -08:00
Matt Clay
865ba62282 [stable-2.6] Improve release make summary shell compatibility.
This should work with at least bash, dash and zsh.
(cherry picked from commit 0755f16f9a)

Co-authored-by: Matt Clay <matt@mystile.com>
2018-11-15 12:10:25 -08:00
Matt Clay
4d557004c3 Revert "Relax ansible-test python version checking."
This reverts commit d6cc3c4187.

(cherry picked from commit de11b473a6)
2018-11-14 22:51:17 -08:00
Matt Clay
c2b8068def Use state: latest for dpkg_selections test.
We don't need to test with `upgrade: dist`, since we're not trying
to test the `apt` module. We just need to make sure the hold set
by the `dpkg_selections` module is working.

This change will avoid updating all the packages on the system,
which is slow, unnecessary, and can cause the installed python
to be changed.

(cherry picked from commit 136a2cca2f)
2018-11-14 22:51:17 -08:00
Martin Krizek
99d30f49c0 apt: disable ubuntu repos to not change test env
(cherry picked from commit 0c86df33a4)
2018-11-14 22:51:17 -08:00
Matt Clay
a5702b4b99 Fix ansible-test interpreter tracking.
Track the interpreter for each copy of the injector by the interpreter
path instead of the interpreter version. This avoids the possibility
of mixing different interpreters with the same version.

(cherry picked from commit fa53b4805b)
2018-11-14 22:51:17 -08:00
Matt Clay
d2289990ca Fix ansible-test merge change detection.
(cherry picked from commit aa7fe919d3)
2018-11-14 22:51:17 -08:00
Matt Clay
e433069ecc Correct ansible-test injector python behavior.
Inject a symlink to the correct python into the copied injector
directory instead of altering the shebang of the injector. This
has the side-effect of also intercepting `python` for integration
tests which simplifies cases where it needs to be directly invoked
without collecting code coverage.

(cherry picked from commit d6bf45cd9d)
2018-11-14 22:51:17 -08:00
Matt Clay
cb229a0874 Use correct interpreter for ansible-test injector.
(cherry picked from commit eec21a3d12)
2018-11-14 22:51:17 -08:00
Matt Clay
2ccbb97d1e Fix passing of env vars to Shippable.
(cherry picked from commit 9979a32e5c)
2018-11-14 22:51:17 -08:00
Matt Clay
ff61e8a430 Download hello package from S3 for apt test.
(cherry picked from commit 83fd82ca7e)
2018-11-14 22:51:17 -08:00
Matt Clay
a0fc98a1a1 [stable-2.6] Relax ansible-test python version checking.
(cherry picked from commit d6cc3c4187)

Co-authored-by: Matt Clay <matt@mystile.com>
2018-11-13 22:46:07 -08:00
Abhijeet Kasurde
625159e80a Update plugin filter documentation (#48557)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 6d36849)
2018-11-13 11:17:02 -06:00
Felix Fontein
32b3806e0e docker_container: fix container removal when auto_remove is used (#48061)
* Fix container removal when auto_remove is used.

(cherry picked from commit af2b477950)
2018-11-06 13:27:10 -08:00
Felix Fontein
d3a2c071ff docker_container: fix interaction of detach:no with auto_remove:yes (#47396)
* Behave better if auto_remove and output_logs are combined. Warn if output cannot be retrieved because of auto_remove.

* Add tests.

* Added changelog.

(cherry picked from commit 3afdb28209)
2018-11-06 13:27:10 -08:00
Felix Fontein
9f8f6ce682 docker_container: improve race condition behavior for detach:no, auto_remove:yes behavior (#47712)
* Don't die when get_container is called for container which is terminating during get_container call.

If it terminates between client.containers() and client.inspect_container(),
the module will fail with an error such as
    Error inspecting container: 404 Client Error: Not Found ("No such container: xxx")

* Add changelog.

(cherry picked from commit b9706e2ff5)
2018-11-06 13:26:25 -08:00
Felix Fontein
86c8fdfcb4 Improve paused test and behavior. (#48056)
(cherry picked from commit 569ec812e7)
2018-11-06 11:04:39 -08:00
Felix Fontein
74576470c2 docker_container: fix paused and add some tests (#47900)
* cleanup is already tested.

* Add test for paused.

* Add recreate and restart tests.

* timeout is a common docker option

* Implement paused and fix paused test.

* Add changelog.

* Improve paused test.

(cherry picked from commit 65768b996d)
2018-11-06 11:04:39 -08:00
Felix Fontein
c64f15ecf7 docker_* modules: simplify idempotency comparisons (#47709)
* More generic comparison code from docker_container to docker_common.

* More flexibility if a is None and method is allow_to_present.

Note that this odes not affect docker_container, as there a is never None.

* Update docker_secret and docker_config: simplify labels comparison.

* Added unit tests.

* Use proper subsequence test for allow_more_present for lists.

Note that this does not affect existing code in docker_container, since lists
don't use allow_more_present. Using allow_more_present will only be possible
in Ansible 2.8.

* pep8

(cherry picked from commit 73533d3fc2)
2018-11-06 11:04:39 -08:00
Felix Fontein
a43ea20ea5 docker_container: fix ipc_mode and pid_mode idempotency (#47997)
* Fix ipc_mode and pid_mode idempotency when container names are used.

* Add changelog.

* Update pid_mode documentation.

(cherry picked from commit 35809e99bc)
2018-11-06 10:52:07 -08:00
Martin Krizek
29a851348d 2.6: Backport _cond_not_supported_warn() (#41126) (#48175)
* 2.6: Backport _cond_not_supported_warn() (#41126)

(Partially cherry picked from commit 5f7ffd39dc)

* Fix changelog
2018-11-06 10:48:43 -08:00
Felix Fontein
61f76d7410 ACME: add support for POST-as-GET if GET fails with 405. (#44988)
* Add support for POST-as-GET if GET fails with 405.

* Bumping ACME test container version to 1.4. This includes letsencrypt/pebble#162 and letsencrypt/pebble#168.

* Also use POST-as-GET for account data retrival.

This is not yet supported by any ACME server (see letsencrypt/pebble#171),
so we fall back to a regular empty update if a 'malformedRequest' error is
returned.

* Using newest ACME test container image.

Includes letsencrypt/pebble#171 and letsencrypt/pebble#172, which make Pebble behave closer to the current specs.

* Remove workaround for old Pebble version.

* Add changelog entry.

* First try POST-as-GET, then fall back to unauthenticated GET.

(cherry picked from commit 92d9569bc9)
2018-11-05 22:59:45 -08:00
Felix Fontein
83e2fa7473 Refactoring GET request handling. (#45051)
(cherry picked from commit 26edeb7cce)
2018-11-05 22:59:45 -08:00
Jonathan Oddy
af00a9da8d Fix AWS EC2 inventory plugin caching of groups (#46961)
* Fix AWS EC2 inventory plugin caching of groups

* Added changelog fragment for aws_ec2 caching fix

* Store the AWS query results

The underlying inventory object contains inventory from other sources,
so caching it as ours would be wrong.
It seems easiest and safest to just cache the boto query results
instead.

* Remove unused functions

(cherry picked from commit 7ba09adee1)
2018-11-05 22:50:49 -08:00
Dani Hodovic
31e6ede9ee docker_service: parse scale parameter correctly to 2.6 (#47248)
* fix: Parse docker_service scale parameter to int (#45508)

* Changelog: add fragment for docker_service scale fix
2018-11-05 22:49:15 -08:00
Dusan Matejka
20cbe0b9d3 [2.6] zabbix_host: backport of #46521 (#47476)
* zabbix_host: fix link template error (#46521)

* add host interface before link template

(cherry picked from commit 5a35907b71)

* added changelog
2018-11-05 22:45:10 -08:00
Trishna Guha
6269c94619 Add changelog
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-11-05 22:37:55 -08:00
Trishna Guha
c5cc7224d9 nxos_file_copy fix for binary files (#46822)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 9c81634c77)
2018-11-05 22:37:55 -08:00
Trishna Guha
b3318f2595 nxos_evpn_vni check_mode (#46612)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit d69700b236)
2018-11-05 22:37:55 -08:00
Mike Wiebe
349bdffd1a Add force disruptive option (#47694)
* Use expect module to copy files

* Add force option for disruptive upgrades

* Revert changes to copy_kick_system_images.yaml

(cherry picked from commit c53e3ca8e9)
2018-11-05 22:37:55 -08:00
Trishna Guha
30d184525d fix trailing command in net_neighbors nxos_facts (#47548)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit d79b6c8406)
2018-11-05 22:37:55 -08:00
Jim Gu
f50e97210c VMware: Avoid misleading PyVmomi error if requests import fails (#47313)
* Avoid misleading PyVmomi error if requests import fails

Requests is imported by the VMware module_utils as an external
dependency; however, because it is in a try/catch block containing the
imports for PyVmomi, if requests fails to import properly, Ansible will
instead complain about PyVmomi not being installed.

By moving the import outside of the try/catch block, if requests fails
to import, an error like the following will be returned:

    ImportError: No module named requests

This should result in less confusion.

* catch requests ImportError

Signed-off-by: Jim Gu <jim@jimgu.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit 99ee30768a)
2018-11-05 22:34:03 -08:00
Jesse Pretorius
069f526cab Add issue 47301 changelog fragment
(cherry picked from commit 438d96be521580041a08d0e3db3404af2a979b73)
2018-11-05 22:32:04 -08:00
Jesse Pretorius
b8efdd3336 Add lvg module idempotence test
To ensure that the lvg module is tested for idempotency,
we add a basic integration test.

Support for MacOS and FreeBSD are skipped because the
module does not currently support those platforms.

(cherry picked from commit 204b40f70648c0c58bc5714928d9eb6bcd0f47d8)
2018-11-05 22:32:04 -08:00
Jesse Pretorius
4e402cf07b Fix lvg module idempotency
In [1] changes were made to ensure that the physical
devices were appropriately filtered, but the dev_list
which is used to prepare the filter is modified from
the original arguments to resolve any symlinks. This
results in the existing devices given in the module
args to be left out of the filter, resulting
in the module trying to add the same device again
every time the task is executed.

In this PR we change dev_list to be a copy of the
module arguments so that we're able to add the given
pv list from the module arguments into the filter
as well, ensuring that there is idempotence when
running the task again.

[1] https://github.com/ansible/ansible/pull/38446

(cherry picked from commit 1bae00b5d26816b3298e2363a5d1c3fe9f945865)
2018-11-05 22:32:04 -08:00
Abhijeet Kasurde
a08aa35831 VMware: restore timeout in set_vm_power_state operation (#47723)
'state_change_timeout' parameter was removed, this introduced
regression.

Fixes: #47722

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit a87a62ba8a)
2018-11-05 22:28:43 -08:00
Fran Fitzpatrick
dcf812e736 Backport: junos terminal regex prompt fix to v2.6 (#47204)
* Fix junos terminal regex (#47096)

Fix junos stdout regex

Change at hing

(cherry picked from commit fc341e01fa)

* Changelog: adds fragment for junos fix terminal
2018-11-05 22:27:38 -08:00
Dag Wieers
c6f712b438 psexec: Handle socket errors (Connection timeout) (Backport) (#47406)
* psexec: Handle socket errors (Connection timeout)

This ensures we get a nicer error message from psexec.

* Add changelog fragment
2018-11-05 22:21:01 -08:00
Jordan Borean
618beca1d5 win_uri: stop output from mixing with module result (#48140)
(cherry picked from commit 8a9d7b3695)
2018-11-05 21:59:24 -08:00
Matt Clay
8c5c4fbce3 [stable-2.6] Add Makefile to simplify upstream releases.
(cherry picked from commit 6a351c9c86)

Co-authored-by: Matt Clay <matt@mystile.com>
2018-11-05 16:48:56 -08:00
Felix Fontein
e9d29eca0c docker_container: warn if ipvX_address is used for networks but not supported by docker-py (#47395)
* Only add parameters which are actually used.

* Fail if ipvX_address is used when not supported.

* Added changelog.

(cherry picked from commit 4ffe3b14d4)
2018-11-05 14:12:27 -08:00
Matt Clay
f3dff6a6f6 Fix ansible-test invocation of pytest.
(cherry picked from commit 1939f6c412)
2018-11-05 12:00:23 -08:00
Matt Clay
7c97ca6ea1 Update default-test-container to version 1.4.1. (#47042)
(cherry picked from commit 5c7f876d0d)
2018-11-05 12:00:23 -08:00
Matt Clay
8d3b608c7c Use 4 nodes for sanity tests in CI.
(cherry picked from commit 6a51b5ed26)
2018-11-05 12:00:23 -08:00
Matt Clay
b15cdb7873 Fix ansible-test --exclude with delegation.
Previously the option worked with integration commands but not units or sanity.

(cherry picked from commit 38eba60849)
2018-11-05 12:00:23 -08:00
Matt Clay
6933c7e9e2 Add sphinx constraint for rstcheck compatibility.
(cherry picked from commit 7507bc9e19)
2018-11-05 12:00:23 -08:00
Matt Clay
e8617eae6c Add constraint for pycparser.
(cherry picked from commit 6a1aa51a74)
2018-11-05 12:00:23 -08:00
Matt Clay
3fd9952476 Split pylint runs into more contexts.
(cherry picked from commit ad940b86e4e8a3abba86bf8a935f4e364f8e0821)

See: https://github.com/ansible/ansible/pull/47036/
2018-11-05 12:00:23 -08:00
Matt Clay
35a6ec9f2e Fix issues reported by the latest pylint.
(cherry picked from commit 4db054364a777eae05a56a25e09358c5d7deea89)

See: https://github.com/ansible/ansible/pull/47036/
2018-11-05 12:00:23 -08:00
Matt Clay
1c3343e41d Split sanity tests into 3 groups.
(cherry picked from commit 5461bfbf31)
2018-11-05 12:00:23 -08:00
Felix Fontein
3fbeac4cf7 [2.6] Fixes #33045: get existing containers in a network via inspect_network (Rebased #33048) (#47471)
* Fix #33045: get existing network via inspect_network (Rebased #33048) (#43997)


(cherry picked from commit 2939f68897)

* Add changelog.
2018-11-05 11:32:01 -08:00
Felix Fontein
8cff6752e6 Fix option change detection / force support for docker_volume. (#47390) 2018-11-05 09:56:39 -08:00
Jordan Borean
800dfc7a41 gem: fix tests to work on newer Fedora hosts (#47158)
(cherry picked from commit f720499337)
2018-11-05 09:54:48 -08:00
Jordan Borean
0387649206 postgresql_user: fix test errors on newer Fedora versions (#47166)
(cherry picked from commit dd46f953f6)
2018-11-05 09:53:37 -08:00
Jordan Borean
4c177661d0 test: filesystem update note on test comment (#47260)
(cherry picked from commit 5d2927c9a0)
2018-11-05 09:52:38 -08:00
Jordan Borean
8a6890108f filesystem: fix test to work on newer Fedora (#47176)
(cherry picked from commit ae5aeb9a67)
2018-11-05 09:52:38 -08:00
Jordan Borean
67d1df0d37 openss: fix various test and Python 3 issues (#47188)
(cherry picked from commit 6666b070a9)
2018-11-05 09:51:38 -08:00
Jordan Borean
92a625b3f1 psexec: better error on import failure (#47327)
(cherry picked from commit 013c44484a)
2018-11-05 09:50:04 -08:00
Jordan Borean
f5f571475d dnf yum: fix tests running on Fedora 29 - 2.6 (#47910) (#47949)
* dnf yum: fix tests running on Fedora 29 (#47910)

* dnf yum: fix tests running on Fedora 29

* wrap in always block

(cherry picked from commit f0535bac80)

* Remove extra yum tests
2018-11-05 09:48:29 -08:00
Kevin Breit
9079095815 Update meraki_network.py (#47872) (#47952)
Fix examples from status to state
(cherry picked from commit ee7bbe1044)
2018-11-02 13:12:21 -05:00
Abhijeet Kasurde
62a028e7d0 VMware: improve readability and fix privileges names on scenario_clone_template (#47961)
(cherry picked from commit 89f03314ce)
2018-11-02 13:06:15 -05:00
Felix Fontein
f09bf0a75b [2.6] docker_container: fix memory_swappiness documentation (#47379)
* Documentation for docker_container: fix documentation for memory_swappiness. Default value will not equal 0, it will be inherited from the host machine (#47296)

(cherry picked from commit 4c2efa4b67)

* Add changelog.
2018-11-02 11:52:35 -05:00
Matt Clay
35f597bdde Update Ansible release version to v2.6.7.post0. 2018-10-31 19:44:39 -07:00
Matt Martz
37968a70a4 [stable-2.6] Detect the socket path after starting the service. Fixes #47582
(cherry picked from commit 10e129e)

Co-authored-by: Matt Martz <matt@sivel.net>
2018-10-31 16:34:01 -07:00
Toshio Kuratomi
afea9f4845 [stable-2.6] Fix mysql authentication errors
The mysql-server package on Ubuntu16.04 was recently updated to disallow
unauthenticated root user login over tcp/ip.  This, coupled with pymysql
using tcp/ip whenever host and port is specified causes us to fail to
connect to the database when testing Python3 on Ubuntu16.04.

The fix is to use the unix socket instead..
(cherry picked from commit 748ea39ecd)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-10-31 16:17:35 -07:00
Matt Clay
1e521717ae New release v2.6.7 2018-10-31 15:21:33 -07:00
Martin Krizek
f50cc0b8cb 2.6: user: do not pass ssh_key_passphrase on cmdline (#47487)
* user: do not pass ssh_key_passphrase on cmdline

* user: do not pass ssh_key_passphrase on cmdline

CVE-2018-16837

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
(cherry picked from commit a0aa53d1a1)

* Ignore user module use of subprocess.

(cherry picked from commit 8d00afc013)

* Fix python3 problem in user module cve fix

(cherry picked from commit 9088671c4e)

* Fix changelog entry for user module CVE fix

(cherry picked from commit 210a43ebeb)
(cherry picked from commit b618339c32)

* Remove E210
2018-10-31 08:55:54 -07:00
Matt Clay
de1341de54 Update Ansible release version to 2.6.6.post0. 2018-10-19 13:28:30 -07:00
Matt Clay
0f8a689f95 New release v2.6.6 2018-10-19 09:33:33 -07:00
Jordan Borean
d8b05366b6 ansible-test: add retry for Windows httptester download (#47334)
(cherry picked from commit e6a327fb82)
2018-10-19 07:30:14 -07:00
Jordan Borean
fca7eec760 win httptester: add wait for endpoint in case it is still coming up (#47326)
(cherry picked from commit c0546b4133)
2018-10-18 21:02:19 -07:00
Matt Clay
948f82c6f4 Add constraint for requests on python 2.6. (#47306)
* Add constraint for requests on python 2.6.

(cherry picked from commit f74f7b0373)
2018-10-18 14:24:04 -07:00
Matt Clay
9b65337e5c
Backport/2.6/44755 - win_nssm: tests and several bug fixes (#47159)
* win_nssm: add failing tests for issue #44079

(cherry picked from commit a5d1241fa13b308813173e7686277e15c09c0bdb)

* win_nssm: add more failing tests

These tests highlight several issues with this module:
 * Service not started when state=started
 * Errors with app_parameters (see #25265)
 * Exception when passing several dependencies separated by comma as specified in doc

(cherry picked from commit e50234bdb32304703fd1ce1d4f6067a0d551049e)

* win_nssm: use Run-Command instead of Invoke-Expression to prevent interpretation issue

Fix #44079

(cherry picked from commit 20a0d90ebeec92fc498e29d57393b280f6e639a5)

* win_nssm: fix service not started when state=started

Nssm status returns a multiline output that doesn't match any of the strict patterns in the switch statement.

(cherry picked from commit 8180a7c39b2936426e6def0fa06edd974845d36b)

* win_nssm: fix incorrect separator in doc for service dependencies

The dependencies parameter works with space as separator, but not with comma as shown in the documentation

(cherry picked from commit ddd4b4bea69a39e8e2aadac9d23c1f64bd1355f5)

* win_nssm: fix error with app_parameters parameter

Fix #25265

(cherry picked from commit aba0d48ba5fe74842ceb3584753e4fc9bca1bc92)

* win_nssm: add idempotence tests

(cherry picked from commit 46a5e4f3bfbeecb34693d0a8597e5d9643a03624)

* win_nssm: fix several idempotence issues and misbehaviors

Add missing space between arguments when app_parameters contains several keys.
Use Argv-ToString and Escape-Argument to improve arguments handling (parameters with quotes, backslashes or spaces).

(cherry picked from commit 933a4092bf584108849b5161bbdd00092c4c8c09)

* win_nssm: test parameters with spaces, quotes or backslashes

(cherry picked from commit 51843a7b3c7120721d19b192408d7a5984b12d67)

* win_nssm: restore comma as separator for service dependencies

Revert commit ddd4b4b

(cherry picked from commit ead882bb9b0bb9e576eda9e074f9150785f9512f)

* win_nssm: restore support of string as dict form for app_parameters and remove support of literal YAML dict

(cherry picked from commit 862855252b5f8ff9cdd6ef8a4b3e6afee6a3c326)

* win_nssm: wrong variable in tests

(cherry picked from commit 9b9c839461bc428e0ab3897b7681492a45728f73)

* win_nssm: add changelog fragment
2018-10-16 17:58:04 -07:00
Vlad Mencl
abc7d4d50a modules/systemd: fix logic: disabled means disabled (#46317)
* modules/systemd: fix logic: disabled means disabled

Fix logic determining whether a service with both systemd and initd files is enabled or disabled.

In situations where systemd thinks service is disabled, but rc.d symlinks mark it as enabled,
this module wrongly assumes the service is enabled.

Fix this logic: disabled means disabled

Only when the output from systemctl is-enabled does NOT include disabled, consider the status of rc.d symlinks.

This essentially replicates the fixes done to the systemd handling in the "service" module in 3c89a21e0c

Fixes #22303

Fixes #44409

Fixes #39116

* backport/2.6/46245: add changelog fragment
2018-10-16 16:46:49 -07:00
Brian Coca
6da8fedda5 use ansible json encoder for results in callbacks (#46830)
* use ansible json encoder for results in callbacks

(cherry picked from commit 643ff29d2d)
2018-10-16 16:18:55 -07:00
Brian Coca
78da8341a5 manage levels for 'multiple included lists' (#46359)
* manage levels for 'multiple included lists'

fixes #46343

(cherry picked from commit 80d977bac6)
(cherry picked from commit ef6637895301842ff0a62f35ef1a6e517af60e39)
2018-10-16 16:11:57 -07:00
Matt Martz
d61d285a6f [stable-2.6] Use the copied and merged task for calculating task vars in the free strategy. Fixes #47024 (#47060)
(cherry picked from commit c3d5779)

Co-authored-by: Matt Martz <matt@sivel.net>
2018-10-16 16:08:52 -07:00
Toshio Kuratomi
115b919cfd [stable-2.6] Mocking out __future__ could cause problems
(cherry picked from commit 473f70c)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-10-16 16:04:13 -07:00
cadl42
eb6a2408db Ignore empty result of rabbitmqctl list_user_permissions (#35598)
Fix #34863

(cherry picked from commit a7221dd289)
2018-10-16 16:02:08 -07:00
Sam Doran
5cc5be07fb Use proper index value with insertbefore on a one line file (#46071)
Add tests and changelog

(cherry picked from commit b74279d14c)
2018-10-16 15:59:20 -07:00
Sam Doran
4f8c82ca2c Use bytes rather than native string for result (#46281)
This prevents a stack trace in Python 3 when the result is an empty file since
the file is open in binary mode and a native string in Python 3 is str,
not bytes.

(cherry picked from commit 8b1ae30e2e)
2018-10-16 15:57:45 -07:00
Matt Clay
7774b37626 [stable-2.6] Update requirements for urllib3 for python 2.6.
(cherry picked from commit d048785640)

Co-authored-by: Matt Clay <matt@mystile.com>
2018-10-16 15:40:01 -07:00
Dominik Holler
b550320f14 Fix os_router ignores enable_snat: no (#45921)
If enable_snat is False, this should be used to build the
request, because the default value in the OpenStack Networking
API is True.

Fixes the issue #45915.

(cherry picked from commit 452a4ab781)
2018-10-16 14:08:33 -07:00
Felix Fontein
caf7885ef4 docker_container: fix behavior when image is not specified (#46322)
* Don't simply ignore container in present() if image is not specified.

* Use image from existing container for recreation if not specified.

* Added changelog.

* Improve comment.

(cherry picked from commit 895019c59b)
2018-10-16 12:26:33 -07:00
Felix Fontein
c41c3b4160 docker_container: fix problem with published_ports idempotency (#46595)
* Fix comparisons for expected_ports (set vs dict).

* Added changelog.

(cherry picked from commit c5ea3d058e)
2018-10-16 12:18:50 -07:00
Felix Fontein
05c6df53f0 docker_container: improve publish all ports functionality (#46594)
* Improve handling of published_ports: all.

* Add changelog.

(cherry picked from commit 8afe46dc02)
2018-10-16 12:18:50 -07:00
Felix Fontein
fac1405bcc [2.6] route53: fix CAA record ordering for idempotency (#46226)
* [aws] route53 module: fix idempotency for CAA records  (#46049)

* Fixing record order for CAA records to properly handle idempotency.

* Add integration tests that reproduce CAA failure

(cherry picked from commit a727a1ee67)

* Added changelog.
2018-10-16 12:16:10 -07:00
Jordan Borean
992f4468d6 azure_rm_common: use __version__ from module_util (#46184)
(cherry picked from commit 02c11e6b51)
2018-10-16 11:03:01 -07:00
Jordan Borean
a0a7fd0297 ps-lint: ignore rules that are not relevant to Ansible (#46376)
(cherry picked from commit ba638f40cf)
2018-10-16 11:02:35 -07:00
Jordan Borean
2f66f26991 ansible-test: setup up http runner in between each target (#47100)
* ansible-test: setup up http runner in between each target

* review changes

(cherry picked from commit 9a5561da0f)
2018-10-16 11:02:06 -07:00
Jordan Borean
67c117607c ansible-test: run win httptester with bypass policy (#47090)
(cherry picked from commit 69e1088ec1)
2018-10-16 11:02:06 -07:00
Jordan Borean
1cf3df53f0 win test: add http tester container to Windows tests (#46606)
(cherry picked from commit 6e2897647c)
2018-10-16 11:02:06 -07:00
Jordan Borean
5dd58923a1 ansible-test: add skip/windows/... alias to skip tests on specific Windows versions (#46845)
* ansible-test: add skip/windows/... alias to skip tests on specific Windows versions

* show what tests were skipped

* changes to logic to only skip if all Windows targets are set to skip

* codestyle improvements

* change warning message based on review

* check args type before running the Windows path

(cherry picked from commit 0f5331645f)
2018-10-16 11:02:06 -07:00
Jordan Borean
615d53ab42 win_uri: use variable for httpbin host (#46734)
(cherry picked from commit f34f75be45)
2018-10-16 11:02:06 -07:00
Risto Oikarinen
d8111b39a4 Clean playbook filters doc by adding whitespaces. Backport of #46569 (#47001) 2018-10-15 16:51:48 -05:00
Matt Clay
a95ba6ca39 Fix ansible-test custom docker image traceback.
(cherry picked from commit 712ad9ed64)
2018-10-11 18:32:58 -07:00
Jordan Borean
7b93d6e31b ansible-test: set ulimit to enforce consistent test environment (#46652)
* ansible-test: set ulimit to enforce consistent test environment

* fixed santiy issue

(cherry picked from commit 7b774117ab)
2018-10-09 23:40:12 -07:00
Jordan Borean
c46d799dc5 ansible-test: Create public key creating Windows targets (#43760)
* ansible-test: Create public key creating Windows targets

* Changed to always set SSH Key for Windows hosts

(cherry picked from commit adc0efe10c)
2018-10-09 18:54:41 -07:00
Matt Clay
a40241f99b Update MANIFEST.in (#46502)
* Update MANIFEST.in:

- Remove unnecessary prune.
- Include files needed by tests.
- Exclude botmeta sanity test.

These changes permit sanity tests to pass on sdist output.
(cherry picked from commit cbb49f66ec)
2018-10-09 18:54:41 -07:00
Matt Clay
503c4b9f97 Fix parametrize warning in unit tests.
(cherry picked from commit 1a28898a00)
2018-10-09 18:54:41 -07:00
Matt Clay
9693c67197 Add symlinks sanity test. (#46467)
* Add symlinks sanity test.
* Replace legacy test symlinks with actual content.
* Remove dir symlink from template_jinja2_latest.
* Update import test to use generated library dir.
* Fix copy test symlink setup.

(cherry picked from commit e2b6047514)
2018-10-09 18:54:41 -07:00
Matt Clay
c68e1aafeb Improve ansible-test environment checking between tests. (#46459)
* Add unified diff output to environment validation.

This makes it easier to see where the environment changed.

* Compare Python interpreters by version to pip shebangs.

This helps expose cases where pip executables use a different
Python interpreter than is expected.

* Query `pip.__version__` instead of using `pip --version`.

This is a much faster way to query the pip version. It also more
closely matches how we invoke pip within ansible-test.

* Remove redundant environment scan between tests.

This reuses the environment scan from the end of the previous test
as the basis for comparison during the next test.

(cherry picked from commit 0dc7f38787)
2018-10-09 18:54:41 -07:00
Matt Clay
d2268dcb37 Add file exists check in integration-aliases test.
(cherry picked from commit 33a8be9109)
2018-10-09 18:54:41 -07:00
Matt Clay
6db2c6d9ac Use default-test-container version 1.3.0.
(cherry picked from commit 6d9be66418)
2018-10-09 18:54:41 -07:00
Matt Clay
3dd444d170 Fix ansible-test encoding issues for exceptions.
(cherry picked from commit 0d7a156319)
2018-10-09 18:54:41 -07:00
Matt Clay
0bd9a73d47 Fix ansible-test multi-group smoke test handling. (#46363)
* Fix ansible-test smoke tests across groups.
* Fix ansible-test list arg defaults.
* Fix ansible-test require and exclude delegation.
* Fix detection of Windows specific changes.
* Add minimal Windows testing for Python 3.7.

(cherry picked from commit e53390b3b1)
2018-10-09 18:54:41 -07:00
Matt Clay
70c011481a Rebalance shippable/posix/ CI groups.
(cherry picked from commit 33b34f5c82)
2018-10-09 18:54:41 -07:00
Matt Clay
8d86820308 Reduce noise in docs-build test failures.
(cherry picked from commit 4085d01617)
2018-10-09 18:54:41 -07:00
Matt Clay
116554bee3 Fix ansible-test docker python version handling.
This removes the old name based version detection behavior and
uses versions defined in the docker completion file instead, as
the new containers do not follow the old naming scheme.

(cherry picked from commit 54937ba784)
2018-10-09 18:54:41 -07:00
Matt Clay
ab2f54d864 Fix integration test library search path.
This prevents tests from loading modules outside the source tree,
which could result in testing the wrong module if a system-wide
install is present, or custom modules exist.

(cherry picked from commit d603cd41fe)
2018-10-09 18:54:41 -07:00
Matt Clay
441dfd4cbe Bug fixes and cleanup for ansible-test. (#45991)
* Remove unused imports.
* Clean up ConfigParser usage in ansible-test.
* Fix bare except statements in ansible-test.
* Miscellaneous cleanup from PyCharm inspections.
* Enable pylint no-self-use for ansible-test.
* Remove obsolete pylint ignores for Python 3.7.
* Fix shellcheck issuers under newer shellcheck.
* Use newer path for ansible-test.
* Fix issues in code-smell tests.

(cherry picked from commit ac492476e5)
2018-10-09 18:54:41 -07:00
Matt Clay
d779f25fa1 Add python.py coverage injector for ansible-test.
This can be used to run Python scripts from the repository with the
correct interpreter and allow collection of code coverage.

Useful for testing contrib inventory scripts.

(cherry picked from commit 45b5685037)
2018-10-09 18:54:41 -07:00
Matt Clay
f5c9977771 Improve error handling for docs-build test.
(cherry picked from commit 2148999048)
2018-10-09 18:54:41 -07:00
Matt Clay
d2eb4c59d3 Improve ansible-test match error handling.
(cherry picked from commit 2056c981ae)
2018-10-09 18:54:41 -07:00
Dag Wieers
3dbb029f18 Fix incorrect use of subprocess.CalledProcessError (#45890)
(cherry picked from commit 24dd87bd0a)
2018-10-09 18:54:41 -07:00
Matt Clay
2fbee1d183 Support comments in ansible-test flat files.
(cherry picked from commit 5a3000af19)
2018-10-09 18:54:41 -07:00
Matt Clay
30250f34ea Make ansible-test available in the bin directory. (#45876)
(cherry picked from commit f3d1f9544b)
2018-10-09 18:54:41 -07:00
Matt Clay
73cfb88d0f Block network access for unit tests in docker.
(cherry picked from commit 99cac99cbc)
2018-10-09 18:54:41 -07:00
Matt Clay
96ab73a874 Minor fixes for unit test delegation.
(cherry picked from commit be199cfe90)
2018-10-09 18:54:41 -07:00
Matt Clay
6870700a23 Run unit tests in parallel. (#45812)
(cherry picked from commit abe8e4c9e8)
2018-10-09 18:54:41 -07:00
Matt Clay
f46998e0bd Fix ansible-test unit test execution. (#45772)
* Fix ansible-test units requirements install.
* Run unit tests as unprivileged user under Docker.

(cherry picked from commit 379a7f4f5a)
2018-10-09 18:54:41 -07:00
Matt Clay
da79fdf998 Fix unit test parametrize order on Python 3.5.
(cherry picked from commit 53b230ca74)
2018-10-09 18:54:41 -07:00
Matt Clay
623cafb709 Fix unit tests which modify the source tree. (#45763)
* Fix CNOS unit test log usage.
* Use temp dir for Galaxy unit tests.
* Write to temp files in interfaces_file unit test.
* Fix log placement in netapp_e_ldap unit test.

(cherry picked from commit 0686450cae)
2018-10-09 18:54:41 -07:00
Jordan Borean
d5a84098a8 add support for opening shell on remote Windows host (#43919)
* add support for opening shell on remote Windows host

* added arg completion and fix sanity check

* remove uneeded arg

(cherry picked from commit 6ca4ea0c1f)
2018-10-09 18:54:41 -07:00
Matt Clay
fcaf69f312 Use default Shippable container. (#46703)
(cherry picked from commit 40c9301b27)
2018-10-09 11:47:13 -07:00
Sloane Hertel
0172576fb7 Add 'auto' to documented default enabled inventory plugins (#46621) (#46638)
* Correct default inventory plugins enabled in docs and example/ansible.cfg

* Fix headers

(cherry picked from commit 43d12c11be)
2018-10-08 15:22:19 -05:00
Jordan Borean
18ecb90c7c docs: add Support section for plugin types (#46520) (#46644)
* docs: add Maintenance section for plugin types
* Added supported_by name in bold to match Status

(cherry picked from commit 1599752f26)
2018-10-08 15:21:04 -05:00
Sam Doran
eb520de517 Add documentation on underlying tools in user module (#46455) (#46512)
(cherry picked from commit bcfdc37be0)
2018-10-08 14:56:53 -05:00
Sandra McCann
414c72508d disable gather facts and update playbook output (#46409) (#46419)
* disable facts gather and update playbook output

* fix output

(cherry picked from commit a1fae193c7)
2018-10-02 16:23:41 -05:00
Sandra McCann
9b594f9dec Updates release & maintenance version docs for 2.7 (#46415)
(cherry picked from commit 04b726dc14)
2018-10-02 16:21:08 -05:00
Matt Clay
2e60b83cd5 Update Ansible release version to 2.6.5.post0. 2018-09-28 16:07:08 -07:00
Matt Clay
2042830bab New release v2.6.5 2018-09-28 14:05:03 -07:00
Sloane Hertel
46f189d937 Fix and re-enable sts_assume_role integration tests (#46026)
* Fix the STS assume role error message assertion when the role to assume does not exist.

(cherry picked from commit 18dc928e28)
2018-09-28 08:51:51 -07:00
Sloane Hertel
36414cc518 Fix ec2_group for EC2-Classic accounts (#46242)
* Fix ec2_group for EC2-Classic accounts

* changelog

(cherry picked from commit 9efc3dc761)
2018-09-28 08:50:50 -07:00
Daniel Speichert
6e90277c69 [stable-2.6] Migrate from MySQLdb to PyMySQL (#40123)
* Migrate from MySQLdb to PyMySQL

* Deduplicate driver loading and failure message

* Explain requirements

* Apply requirements docs change to proxysql too

* Add changelog.
(cherry picked from commit d34cf93f1a)

Co-authored-by: Daniel Speichert <DSpeichert@users.noreply.github.com>
2018-09-25 16:19:51 -07:00
Felix Fontein
85626291bf docker_container: fix various idempotency problems and non-working options (#45905)
* Sorting args.

* Doing comparisons of options with container parameters in a more context-sensitive way.

This prevents unnecessary restarts, or missing restarts (f.ex. if parameters are removed from ``cmd``).

* Make blkio_weight work.

* Fix cap_drop idempotency problem.

* Making groups idempotent if it contains integers.

* Make cpuset_mems work.

* Make dns_opts work.

* Fixing log_opts: docker expects string values, returns error for integer.

* Adding tests from felixfontein/ansible-docker_container-test#2.

* Make uts work.

* Adding changelog entry.

* Forgot option security_opts.

* Fixing typo.

* Explain strict set(dict) comparison a bit more.

* Improving idempotency tests.

* Making dns_servers a list, since the ordering is relevant.

* Making dns_search_domains a list, since the ordering is relevant.

* Improving dns_search_domains/dns_servers.

* Fixing entrypoint test.

* Making sure options are only supported for correct docker-py versions.
2018-09-25 16:17:49 -07:00
Matt Martz
e7740b80fd [stable-2.6] [stable-2.7] Fix logic to not re-download existing files when force=no (#45495) (#45509)
* [stable-2.7] Fix logic to not re-download existing files when force=no (#45495)

* Fix logic to not re-download existing files when force=no. Fixes #45491

* Reduce logic complexity.
(cherry picked from commit 5785de582f)

Co-authored-by: Matt Martz <matt@sivel.net>

* Backport of get_url fix cannot use result

result was only added in 2.8+.
(cherry picked from commit 99171a9c6f)

Co-authored-by: Matt Martz <matt@sivel.net>
2018-09-25 15:57:46 -07:00
Nathaniel Case
395b30c617 These won't get upgraded to bool if ansible doesn't know they are
Inspired by #45736, but that var doesn't exist yet, so label the one
that does exist.
2018-09-25 15:35:41 -07:00
Sloane Hertel
0be82f2b08 [2.6] ec2_group: fix regression for targets that are a list containing strings and lists (#45748)
* Fix targets that may be a list containing strings and lists which worked prior to 2.6.

(cherry picked from commit 450fb9f855ae7090acbdea3e726082d4038994f8)

* Add ec2_group integration tests for lists of nested targets

(cherry picked from commit 14e3399db162c7ddaa9cb9aa6c8a476471a376c2)

* changelog

(cherry picked from commit fb17db0876d75cb629a0ed180ead1058e15a737b)
2018-09-25 15:34:04 -07:00
Felix Fontein
fe2c9cdf13 [2.6] docker_container: don't parse/interpret options if state is 'absent' (#45768)
* Don't parse/interpret options if state is 'absent'. (#45700)

* Added changelog.
2018-09-25 15:31:32 -07:00
Matt Martz
c12f41907a [stable-2.6] Don't pass file_name to DataLoader.load in script inventory plugin (#45428)
* Don't pass file_name to DataLoader.load in script inventory plugin. Fixes #34164

* Add changelog fragment
(cherry picked from commit 263b9fa)

Co-authored-by: Matt Martz <matt@sivel.net>
2018-09-25 15:30:32 -07:00
Sloane Hertel
e889001b3a Remove placeboify from unit tests that are not calling AWS (i.e. creating a recording) (#45754)
(cherry picked from commit 2167ce6cb6)
2018-09-25 15:27:47 -07:00
Peter Söderlind
e23eefe60e netaddr.IPAddress used by property address will if route domain other than default is used.
This fix is for IPv4 addresses only.
2018-09-25 15:27:06 -07:00
Michael Mayorov
5ee5e4a35c Fix referenced before assignment in sysvinit module
* removed redundant variable initialization

(cherry picked from commit 7538a63f70)
2018-09-25 14:58:30 -07:00
Jonathan
a23dfce2c9 Added default value for when CloudFrontOriginAccessIdentityList is (#44984)
missing.

(cherry picked from commit 93cd050250)
2018-09-25 14:55:15 -07:00
Matt Martz
c3e1269ecb [stable-2.6] Support transfering empty files to target host. Fixes #36725 (#45751)
(cherry picked from commit b6fcbfe)

Co-authored-by: Matt Martz <matt@sivel.net>
2018-09-25 14:51:07 -07:00
Matt Martz
e0e266d070 [stable-2.6] Ensure loop with delegate_to can short circuit the same as without delegate_to. Fixes #45189 (#45231).
(cherry picked from commit 2ac647def8)

Co-authored-by: Matt Martz <matt@sivel.net>
2018-09-25 14:49:52 -07:00
Sloane Hertel
daac0514ef [aws unit test utils] only create a recordings directory when the env var is set (#45752)
* Only create placebo recording test directories when the environment variable PLACEBO_RECORD is set
(cherry picked from commit 5467ac3454)
2018-09-25 14:45:29 -07:00
Matt Martz
28632756d6 [stable-2.6] Support empty files with piped transfer_method. Fixes #45426 (#45618)
(cherry picked from commit e68f895)

Co-authored-by: Matt Martz <matt@sivel.net>
2018-09-25 14:43:26 -07:00
Trishna Guha
643726860b [2.6] Add ambiguous command check as the error message is not persistent on nexus devices (#45342)
* Add ambiguous command check as the error message is not persistent on nexus devices (#45337)

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

* changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-09-25 14:41:21 -07:00
Trishna Guha
e459893601 [2.6] Fix python2.6 nothing to repeat nxos terminal plugin bug (#45282)
* fix python26 nxos terminal plugin bug (#45271)

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

* nxos terminal plugin changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-09-25 14:40:35 -07:00
Nilashish Chakraborty
66de502798 Backport 2.6: Return correct version on installed VyOS (#39115) (#45714)
* Return correct version on installed VyOS (#39115)

* Return correct version on installed VyOS

Previously existing regexp will shows only "VyOS" without numeric output of router version.
For example: from  "Version:      VyOS 1.1.6" only VyOS will be written in ansible_net_version variable
For more informative output numeric value should be returned as well

* Fixed unittests

(cherry picked from commit 235b11f681)

* Added changelog
2018-09-25 14:37:21 -07:00
Sloane Hertel
8d7c4140db ec2_group - fix VPC precedence for security group targets (#45787)
Update the dictionary with the preferred values last to get the right order of VPC precedence

Fixes #45782
(cherry picked from commit 8d2df9be52)
2018-09-25 14:35:53 -07:00
Trishna Guha
d1621ba67d [2.6] fix nxos_facts indefinite hang for text based output (#45847)
* fix nxos_facts indefinite hang for text based output (#45845)

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

* add changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-09-25 14:34:50 -07:00
Felix Fontein
1a14c50ab7 Fixing HTTPError case of fetch_url for Python 3 compatibility. (#45628)
* Fixing HTTPError case of fetch_url for Python 3 compatibility.

* Adding unit test.

* PEP8.

* Changelog.
2018-09-25 14:34:05 -07:00
Nathaniel Case
3f9a08b056 [2.6] Clean up after ansible-connection if failure occurred in start() (#45929)
(cherry picked from commit 0d143ed)

Co-authored-by: Nathaniel Case <this.is@nathanielca.se>
2018-09-25 14:33:11 -07:00
Matt Davis
25f656413d fix premature exit when RG doesn't exist (#46013)
* fixes #45941
* corrects regression introduced by #26104; when the resource group doesn't exist, the module exits prematurely with an error instead of creating it.

(cherry picked from commit 3b52d968e6)
2018-09-25 14:19:31 -07:00
Vinay Dandekar
135b85e0b7 [aws] Change IAM role name parsing to come from the ARN (#45534)
(cherry picked from commit fe6b7f6b5d)
2018-09-25 14:16:49 -07:00
Matt Martz
268beeb9f9 [stable-2.6] Support nested JSON decoding in AnsibleJSONDecoder (#45924)
* Support nested JSON decoding in AnsibleJSONDecoder

* Add tests for vault portion of AnsibleJSONDecoder
(cherry picked from commit c0915e2)

Co-authored-by: Matt Martz <matt@sivel.net>
2018-09-25 14:15:44 -07:00
Matt Martz
47f3f4ebe3 [stable-2.6] Fix issues with PLUGIN_FILTERS_CFG config handling (#45994)
* Ensure that the value of PLUGIN_FILTERS_CFG is treated as type=path, and that we use the standard section of 'defaults' instead of 'default'

* deprecate the default section

* Don't add version_added for the corrected section
(cherry picked from commit 172137c)

Co-authored-by: Matt Martz <matt@sivel.net>
2018-09-25 14:14:34 -07:00
Jordan Borean
cd8208a4aa win_say - fix up syntax and test issues (#45450)
(cherry picked from commit c9c141fb6a)
2018-09-25 14:07:37 -07:00
Jordan Borean
e750df9c8a fix Ansible.ModuleUtils.FileUtil to respect ErrorAction if running in a try/catch (#45451)
(cherry picked from commit d4ce1b9f31)
2018-09-25 14:06:47 -07:00
Jordan Borean
948ef78c28 win_group_membership - fix random issue with CI on 2012 R2 (#45462)
(cherry picked from commit 3371a779b6)
2018-09-25 14:05:48 -07:00
Jordan Borean
67f3c27a3b powershell - fix for ANSIBLE_KEEP_REMOTE_FILES on older Pythons (#45942)
(cherry picked from commit ce515a626c)
2018-09-25 14:05:13 -07:00
Jordan Borean
0b39c66db7 powershell: do not quote join_path result to reflect ShellBase join_path (#45944)
(cherry picked from commit 198423d6fb)
2018-09-25 14:04:20 -07:00
Jordan Borean
1eae95d919 winrm: add further conditional to using pexect for kerb auth (#45952)
(cherry picked from commit d6251e5b27)
2018-09-25 13:57:44 -07:00
Jordan Borean
520a2bf89a reordered windows test groups for better efficiency (#45445)
(cherry picked from commit 25ae4f2b73)
2018-09-25 13:45:39 -07:00
Jordan Borean
1565eabe3e go back to FreeBSD 11.1 for tests due to 11.2 stability issues (#45872)
(cherry picked from commit a7d372c3ba)
2018-09-25 13:44:54 -07:00
Jordan Borean
9b5dd1ead3 append AWS region to test instance file (#45877)
(cherry picked from commit 582a4dfa13)
2018-09-25 13:44:42 -07:00
Jordan Borean
ffe364dd5d add skip/docker alias to skip tests when running on Docker (#45955)
* add skip/docker alias to skip tests when running on Docker

* changed warning message wording

(cherry picked from commit 27c10fa502)
2018-09-25 13:44:26 -07:00
Jordan Borean
312b821501 skip installing linux-image-extra in CI as it shouldn't be needed (#46101)
(cherry picked from commit 40379b76b1)
2018-09-25 13:44:04 -07:00
Alicia Cozine
dfdc82eb2a
Restore license agreement (#45809) (#46016)
* adds page for CLA in community docs with link from community index

(partial cherry pick from commit f430f60541)
2018-09-21 19:24:27 -05:00
tterranigma
305adf92ab Update fileglob.py (#45558) (#45841)
* Update fileglob.py
Closes #45557
(cherry picked from commit cc477ec920)
2018-09-21 14:06:04 -05:00
Sam Doran
341e1a0f64 Undeprecate include (#45583) 2018-09-13 13:13:41 -05:00
Alicia Cozine
5207991748
update porting guides (#40784) (#45516)
* update porting guides with info about `openstacksdk` library

(cherry picked from commit 8ae14bebda)
2018-09-12 14:54:33 -05:00
Matt Clay
35bbcd737a Update RHEL and FreeBSD versions used for tests:
- RHEL 7.4 -> 7.5
- FreeBSD 11.1 -> 11.2

(cherry picked from commit c50d6f1944)
2018-09-12 10:19:04 -07:00
Matt Clay
21c4eb8db5 Update default container to version 1.2.0.
(cherry picked from commit d478a4c3f6)
2018-09-11 18:02:51 -07:00
Matt Clay
cadccbe323 Reduce cost of Azure DB tests.
(cherry picked from commit ed49f37957)
2018-09-11 18:02:51 -07:00
Matt Clay
864ddbdb5c Fix ACI unit test on Python 3.7.0.
The previous logic was only needed for pre-release versions of 3.7.

(cherry picked from commit c0bf9815c9)
2018-09-11 18:02:51 -07:00
Matt Clay
bce9d21945 Avoid duplicate Azure storage account types.
(cherry picked from commit ae4d5e3257)
2018-09-11 18:02:51 -07:00
Matt Clay
6c448e38e1 Update Ansible release version to 2.6.4.post0. 2018-09-06 22:00:27 -07:00
Matt Clay
04353f3a98 New release v2.6.4 2018-09-06 14:50:53 -07:00
Matt Clay
e4bbc1d711 Remove obsolete default container.
(cherry picked from commit 4173a30941)
2018-09-05 19:21:27 -07:00
Matt Clay
93ec05dd53 Switch default test container to quay.io.
(cherry picked from commit 3f8edb440a)
2018-09-05 19:21:27 -07:00
Matt Clay
8dfb5c08ed Fixes for ansible-test sanity import test. (#45249)
* Fix import test on Python 3.7.
* Fix path processing in import sanity test.

(cherry picked from commit 6fb333faff)
2018-09-05 19:21:27 -07:00
Matt Clay
37f730790e Fix ansible-test virtualenv use in import test.
(cherry picked from commit 998badbda5)
2018-09-05 19:21:27 -07:00
Matt Clay
e4c96f11f5 Update test constraints. (#44975)
- Limit virtualenv version on Python 2.6.
- Limit pyopenssl version on Python 2.6.
- Pin pyfmg version to keep unit tests passing.

(cherry picked from commit b3a3e8ba7b)
2018-09-05 19:21:27 -07:00
Matt Clay
21f287e0b9 Flush output from timing script.
(cherry picked from commit 771768966f)
2018-09-05 19:21:27 -07:00
Matt Clay
bfa38a1d28 Add seccomp support to ansible-test.
(cherry picked from commit c1173a2aec)
2018-09-05 19:21:27 -07:00
Sandra McCann
2eb1c48dfc NCLU - Add example: Changing the hostname and committing on Cumulus Linux (#42872) (#45251)
* Add example to change the hostname and commit on Cumulus Linux

* Modify phrasing a bit

(cherry picked from commit f81e258043)
2018-09-05 20:16:13 -05:00
Matt Clay
c8887aa47f Get packages for dnf and yum tests from S3.
(cherry picked from commit 22d5f5d97f)
2018-09-05 15:26:40 -07:00
Sandra McCann
aa3123f6d8 junos_vlan: Add Vlan ID Range in description (#41855) (#45239)
(cherry picked from commit f968fcd288)
2018-09-05 14:03:04 -05:00
Sandra McCann
84551e4639 fixed network automation index issues (#44732) (#45241)
* fixed network automation index issues

* replace :doc: with :ref:

* fixed anchor misspelling

* fix toc/nav issue -do not put toctree under a subheader

(cherry picked from commit 1c42198f1e)
2018-09-05 14:02:17 -05:00
Ganesh B Nalawade
c9685dfe96 Fix diff_ignore_lines option issue in {eos,ios,nxos}_config module
* diff_ignore_lines option is to handle the running config fetch from
  remote host and ignore the lines that are auto updated eg: commit time and date
* This option should not be used while processing candidate (input) configuration
2018-09-04 22:36:49 -07:00
Felix Fontein
55dbf27362 [2.6] docker_container: fix working_dir (#44522)
* docker_container: fix working_dir (#42857)

WorkingDir should be read from Config instead of HostConfig, check
https://docs.docker.com/engine/api/v1.37/#operation/ContainerInspect

* Adding changelog entry.
2018-09-04 21:21:36 -07:00
Ganesh Nalawade
04296f4230 Fix ignore diff lines issue for lines in ios, eos, nxos (#43889)
* Fix ignore diff lines issue in ios_config

*  Pass `diff_ignore_lines` while creating
   candidate and running configuration object

* Add fix for other platforms

* Fix ignore limes for block

* Update changelog
2018-09-04 15:59:37 -07:00
Trishna Guha
7b840f3fe5 Pick 2.6 nxos bugfixes (#44105)
* Add md5sum check in nxos_file_copy module (#43423)

* Add md5sum check in nxos_file_copy module

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

* address review comment

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

* nxos_vlan refactor to support non structured output (#43805)

* nxos_vlan refactor to support non structured output

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

* unittest fix

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

* minor fixes

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

* use check_rc

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

* address review comment

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

* remove additional return statement

* address Nate's review

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

* nxos_facts test lldp feature and fix nxapi check_rc (#44104)

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

* nxos bugfix 2.6 changelog

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

* nxos_interface port-channel idempotence fix for mode (#44248)

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

* changelog

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

* check_mode in nxos_static_route module (#44252)

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

* changelog nxos_static_route

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

* nxos_linkagg mode fix (#44294)

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

* changelog nxos_linkagg

* nxos_system idempotence fix (#44752)

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

* nxos_system changelog

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

* use retry_json nxos_banner (#44376)

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

* nxos_banner changelog

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

* fix Python 2.6 regex bug terminal plugin nxos, iosxr (#45135)

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

* terminal plugin changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-09-04 15:56:57 -07:00
Brian Coca
b0678e71a8 fix no log templating (#44506)
* fix tempating issues with no_log and loops (#44468)

* fix tempating issues with no_log and loops

 - task is no log if any item is
 - added test cases

fixes #43294

(cherry picked from commit bda074d34e)

* use play context to avoid bug when jinja2+py3
2018-09-04 15:48:21 -07:00
Monty Taylor
499ddeadd5 Backport package manager detection fixes to stable 2.6 (#44415)
* 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>

* fix fedora version dnf fact, default pkg_mgr detection per distro family (#43261)

* fix fedora version dnf fact, default pkg_mgr detection per distro family
* loop over possible dnf/yum paths in case there are multiple canonical sources later in life

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

* pkg_mgr: fixed apt_rpm detection (#43769)

Instead of checking the distribution name (which apparently is tricky to find out)
check if /usr/bin/apt-get is managed by RPM.

Fixes #43539

* Ensure that apt is always chosen on debian/ubuntu

One can install alternate packages managers on debuntu machines.
However, doing so doesn't mean you want to suddenly start using them.

Add in a check similar to the fedora yum/dnf check that sets apt as the
pkg_mgr if the ansible_os_family is Debian.
2018-09-04 15:46:28 -07:00
Sumit Jaiswal
752b471d03 To resolve nios_network issue where vendor-encapsulated-options can not have a use_option flag (#44259)
* To resolve nios_network issue where vendor-encapsulated-options can not have a use_option flag  (#43925)

* to resolve 43657

* fix shippable error

(cherry picked from commit 4e5dbb92dc)

* adding changelog
2018-09-04 15:43:06 -07:00
Robson Roberto Souza Peixoto
207974fc7c Add AzureRMStorageAccount StorageV2 kind backport (#44244)
* Add AzureRMStorageAccount StorageV2 kind (#44242)

close 38455

(cherry picked from commit 2796be1132)

* Add changelog to AzureRMStorageAccount StorageV2 kind
2018-09-04 15:42:06 -07:00
Sumit Jaiswal
300aefcad2 To resolve the issue of handling exception for Nios lookup gracefully (#44254)
* to resolve 43705 (#44078)


(cherry picked from commit 6a395d8e24)

* adding changelog for backport

* adding new line
2018-09-04 15:41:03 -07:00
Monty Taylor
6d3db56c2a Fix openstack inventory plugin (#43581)
* Fix openstack inventory script for multi-cloud case

The shift to openstacksdk left us with a bug in that when running bare
with --list, the cloud argument to get_one is None. We just need _one_
of the clouds to pull the cache settings, since they are global (yet,
we'll go back and fix this in sdk)

If it's None, just use get_all and grab the first one.

* Fix openstack inventory plugin for API changes

The inventory plugin api grew a self.cache that wasn't there when we
first wrote it. There's also a need to pull in the documentation
fragments so that we have the cache parameters.
2018-09-04 15:39:01 -07:00
Tom Matthews
b617a85e3e Strip trailing comments from /etc/default/passwd (#43931)
* strip additional comments from /etc/default/passwd

Strip trailling comments from /etc/default/passwd like
MINWEEKS=1 #MINWEEKS=2
MAXWEEKS=12  # MAXWEEKS=8
Which otherwise cause failures with "failed to read /etc/default/passwd: too many values to unpack"

* fix carriage return typo in commit

* yet another typo in commit

* Fix indent problem

* add changelog fragment for PR 43931

(cherry picked from commit 5c1e620504)
2018-09-04 14:51:43 -07:00
Alexander Gubin
2d6ba872ce module_utils_service: Fix glob path of rc.d
Some distribtuions like SUSE has the rc%.d directories under /etc/init.d

Quote of /etc/rc.d.README on SLES11.

"Some people expect the system startup scripts in /etc/rc.d/.
We use a slightly different structure for better LSB compliance."

(cherry picked from commit c7d0e3b1666ff96eb0397bdf8c3bd3d144bbd7b0)
2018-09-04 14:50:39 -07:00
Guilherme Steinmuller
0db6467a84 Fix enable_snat parameter (#44418) (#44448)
* Fix enable_snat parameter (#44418)

Fixes the issue #44285
(cherry picked from commit b7139782cf)

* Fix enable_snat parameter (#44418)

Fixes the issue #44285
(cherry picked from commit b7139782cf)

* Fix enable_snat parameter (#44418)

Fixes the issue #44285
(cherry picked from commit b7139782cf)
2018-09-04 14:49:22 -07:00
The Fox in the Shell
80fc2163e8 ldap_passwd: Fix #44329
This is a backport of the fix provided by drewburr in #44336.
The ldap_passwd module is entirely unuseable without it.
2018-09-04 14:48:32 -07:00
Felix Fontein
408ad387d2 [2.6] More consistent Docker unit parsing (#44521)
* More consistent Docker unit parsing (#16748)

* Docker: Convert units for kernel_memory

Other memory arguments already use human_to_bytes to convert the
units.  This change makes the behavior more consistent.

* Update Docker unit parsing documentation

This explains the units more precisely and makes the documentation
more consistent.

This fixes #16526.

* Add changelog entry.
2018-09-04 14:47:09 -07:00
Jordan Borean
b91f5b5871 basic.py: catch ValueError when trying to import hash algorithms (#44551)
* basic.py: catch more Exceptions when trying to import md5 hash algorithms

(cherry picked from commit e07352b9de)
2018-09-04 14:45:11 -07:00
Felix Fontein
fdc0711c1a [2.6] docker_container: allow arbitrary log_driver (#44563)
* docker_container: allow arbitrary log_driver (#33579)

Docker supports logging plugin (see https://docs.docker.com/engine/admin/logging/plugins)
so it no longer makes sense to limit the log_driver option to a set of
fixed choices.

* Changelog entry.
2018-09-04 14:44:09 -07:00
Felix Fontein
82f6f7aab3 Clarify usage of env_file (#42211). (#44535) 2018-09-04 14:43:04 -07:00
Sam Doran
5a26560cca Properly un expire account on creation (#44174)
When creating a new account, check to see if the expiration parameter is negative and pass in the appropriate parameter. Since the negative integer passed into expires is converted to time.struct_time which in turn gets converted to a formatted time string when passed to the underlying command, a -1 or large negative number would result in passing a date before 1970-01-01 to the underlying command.

This had the opposite effect of creating an account with no expiration account resulting in a newly created account that was already expired, or just throwing an error on certain systems.

(cherry picked from commit df335d91b0)
2018-09-04 14:42:26 -07:00
Sam Doran
fc88c13363 Pass path to GalaxyRole object (#43051)
This will list all roles in all paths in roles_path rather than just the first path in roles_path.

(cherry picked from commit 05fff27415)
2018-09-04 14:41:28 -07:00
Toshio Kuratomi
2ee3786d9d [stable-2.6] Fix another corner case of too many warnings for world readable current working directory
There should be no warning if there is no ansible.cfg file i nthe
current working directory.
(cherry picked from commit f46c943)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-09-04 14:40:04 -07:00
Daniel-Sanchez-Fabregas
9e34ba0a7e Fix win_domain_computer error when empty description (#44627)
* Fix win_domain_computer

 Fixes #43653

- Change descrtiption parameter default to null.
  When reading an empty description from AD, powershell returns a null.
- Convert after and before diff keys to ordered hashes.
  Unordered state descriptions make --diff report equal values as
  changes.

(cherry picked from commit f58365698599e92b9fc5fd7f643d2c10f1eeafab)

* Add changelog
2018-09-04 14:39:06 -07:00
Samer Deeb
d7a7295c81 issue:43021 add support for onyx version 3.6.6000 and above (#44527)
* issue:43021 add support for onyx version 3.6.6000

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

* issue:43021 add support for onyx version 3.6.6000

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

(cherry picked from commit a07af2a1f7)
2018-09-04 14:37:33 -07:00
Daniel-Sanchez-Fabregas
67e880dd82 Backport/2.6/44500 Module win_domain_computer fix delete computer with child (#44707)
* Module win_domain_computer fix delete computer with child

(cherry picked from commit bbecdbc042c6ab6cd158abd8302dca308cf39153)

* add changelog fragment

(cherry picked from commit b6af40a1cc7a0796cdbe96ebfc78b2ad501c0fdb)
2018-09-04 14:29:40 -07:00
Rafael
f7f6d47c7e Backport/2.6/44568 (#44728)
* fixes parameters via environment variables, issue #44163

(cherry picked from commit 2c84022b200e943af80c89b2214b6192ae3d4991)

* including test case using environment variables as per issue #44163

(cherry picked from commit eaaada25c72de7b03de2c3d63ae882107b277f24)

* including missing environment variable in shared documentation fragement, related to issue #44163

(cherry picked from commit e97d2e7ed151e2633d5cd149d4a7e3b0e3151d41)

* added changelog

* yml fix
2018-09-04 14:28:53 -07:00
Felix Fontein
ae62f4be32 [2.6] docker_container: fix check mode for container creation (#44760)
* docker_container: fix check mode for container creation (#42380)

* Create copy of HostConfig object before adding it to results.

* Create general sanitize function in docker_common. Using it for all return values of docker_container.

* Make Python 2.6 compatible.

* Added changelog.
2018-09-04 14:20:34 -07:00
Dag Wieers
f61d2b1c0c Backport of PR 43464
Fix issue when timeout and state=present (#43464)
2018-09-04 14:13:00 -07:00
Abhijeet Kasurde
534efeb6e6 VMware: restructure docs (#43065)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit d1c0b7a597)
2018-09-04 14:10:09 -07:00
Jordan Borean
c86794ace2 win_psexec: fix arg handling when command contains multiple args (#44797)
(cherry picked from commit 9d91607754)
2018-09-04 14:03:09 -07:00
Felix Fontein
4e5170fb40 Clarify that uninstalling docker-py can break docker (and vice versa). (#43238) 2018-09-04 14:01:23 -07:00
Felix Fontein
0746765628 [2.6] Set Default values correctly for docker variables (#44817)
* Set Default values correctly for docker variables (#42641)

* Set Default values correctly

* Properly documenting environment variables in documentation fragment. (#44812)

* Added changelog.
2018-09-04 14:00:12 -07:00
Matt Martz
309f04b742 [stable-2.6] Don't allow import_tasks to transition to dynamic when file is missing. See #44822 (#44836)
(cherry picked from commit cd2f66f)

Co-authored-by: Matt Martz <matt@sivel.net>
2018-09-04 13:58:29 -07:00
Felix Fontein
893d26e915 [2.6] docker_container: improving idempotency (#44879)
* docker_container: improving idempotency (#44808)

* Only handle cpu_shares, volume_driver, auto_remove as in _host_config().

* Don't compare log_options (resp restart_retries) if log_driver (resp restart_policy) is not specified.

* Warn that log_options (resp restart_retries) is ignored if log_driver (resp restart_policy) is not specified.

* Added changelog.
2018-09-04 13:54:44 -07:00
Felix Fontein
0ee703ca46 Improve description of default network removal. (#44861) 2018-09-04 13:53:32 -07:00
Dag Wieers
35829fd3ed Fix support for JSON output when charset is set 2018-09-04 13:51:25 -07:00
Nilashish Chakraborty
0c367e77f0 Fix ios_user issue CP in 2.6 (#45175)
* Fix ios_user issues (#44904)

* Fix ios_user issues

* Modify regex and fix unittests

(cherry picked from commit 0f268e70a1)

* Added changelog
2018-09-04 13:36:57 -07:00
Sandra McCann
9acfbeed7b backport ipaddr grammar fixes (#44974) 2018-08-31 17:14:14 -05:00
Sandra McCann
7e1e152560 Backport/2.6/39059 (#44979)
* Improve clarity of precedence when command-line parameters are used. (#39059)

* Add command-line values into the precedence list.
* Several sample config snippets were included without any explanation
  of how those snippets would be processed. Added descriptions so that
  the reader can understand what each snippet will (or won't) accomplish.

* Don't focus on inventory as much
Expand on the fact that it's the fact that a variable is set that
matters, not the source of the variable.

(cherry picked from commit 7988266bb7)
2018-08-31 17:13:14 -05:00
Adam
2b859d218d Backport/2.6/44902 (#44921)
* Update lightsail.py

(cherry picked from commit dc8307a063e38cb5fd5cb0431f0824b0906ef59e)

* correct example code for AWS lightsail

* Move changelog to correct location

* Update CHANGELOG-v2.6.rst
2018-08-30 14:40:16 -05:00
Matt Clay
545d0eda17 Remove obsolete test/utils/docker/ directory.
(cherry picked from commit 78bd020429)
2018-08-30 09:12:22 -07:00
Matt Clay
b6beac61a8 List quay.io images during Shippable run.
(cherry picked from commit a96a51b0c6)
2018-08-30 09:12:22 -07:00
Matt Clay
3cd045efd1 Switch distro test containers to quay.io images.
(cherry picked from commit 773c0982b0)
2018-08-30 09:12:22 -07:00
Matt Clay
25556f6c8c Fix change detection on retried Shippable jobs.
(cherry picked from commit c0aaf0fff7)
2018-08-30 09:12:22 -07:00
Matt Clay
f8cbb62358 Ignore CentOS 6.10 for passwordstore test.
(cherry picked from commit 18da873531)
2018-08-30 09:12:22 -07:00
Matt Clay
f8e742acee Restore repos after zypper_repository test runs.
This also allows the test to run on newer containers by not
manipulating any of the pre-configured repositories.

(cherry picked from commit cac51e6da8)
2018-08-30 09:12:22 -07:00
akira6592
7342085586 fix variable names in vars file example (#44671)
(cherry picked from commit 5e71821cd4c5fe2b6959354e660c0e17eee494be)
2018-08-29 09:15:33 -05:00
John R Barker
81de1eb401 Documentation fix, decrypt is True by default (#44435) (#44471)
(cherry picked from commit 88659dcba4)
2018-08-27 18:46:43 -05:00
Matt Clay
e6761e54b9 Use runtime instead of datetime for test output.
(cherry picked from commit 31a5b874a1)
2018-08-23 14:13:36 -07:00
Sandra McCann
657955d30a correct vault example (#44507) (#44532)
* correct vault example

fixes #43897

* corrected text and code blocks

(cherry picked from commit 57293b3c64)
2018-08-23 15:50:08 +02:00
Nilashish Chakraborty
02ef320c24 Fix ios_l2_interface vlan bug CP in 2.6 (#44445)
* FIX ISSUE:#43878 when the vlans string have a final comma. (#43879)

(cherry picked from commit 401c45384e)

* Added changelog
2018-08-21 08:28:08 -07:00
Nilashish Chakraborty
1bcc192580 Fix ios_vlan and ios_l2_interface issues in 2.6 (#44250)
* Fixes ios_l2_interface and ios_vlan not working on certain interface types issue (#43819)

* Fixes #43654 and #43582

* Remove q statement

* Fix shippable errors

* Fix more shippable errors

* Fix unittest

(cherry picked from commit b14f256d41)

* Added Change Logs

* Fixed changelog entry

* Fixed changelog entry - 2
2018-08-21 08:27:33 -07:00
Matt Clay
8407bdaa78 Update Ansible release version to 2.6.3.post0. 2018-08-16 20:39:15 -07:00
Matt Clay
8a6ebd1e8d New release v2.6.3 2018-08-16 17:47:36 -07:00
Nathaniel Case
68bdea317f Prevent data being truncated over persistent connection socket (#43885)
* Change how data is sent to the persistent connection socket.

We can't rely on readline(), so send the size of the data first. We can
then read that many bytes from the stream on the recieving end.

* Set pty to noncanonical mode before sending

* Now that we send data length, we don't need a sentinel anymore

* Copy socket changes to persistent, too

* Use os.write instead of fdopen()ing and using that.

* Follow pickle with sha1sum of pickle

* Swap order of vars and init being passed to ansible-connection

(cherry picked from commit f221105882)
2018-08-14 07:50:25 -07:00
Étienne BERSAC
d5e278e471 Fix typos in 2.6 changelog (#44076)
* Fix markdownism in changelog

* Fix typo in vmware remove vm scenario changelog entry
2018-08-14 07:50:06 -07:00
John R Barker
76392c3ddd inventory plugins: add test about config API usage (#41888) (#43040)
* 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

(cherry picked from commit 06f5e49dfb)

* Update aliases
2018-08-13 17:23:10 -07:00
Toshio Kuratomi
dabd81deba [stable-2.6] Only print warning when ansible.cfg is actually skipped (#43583)
Only print warning when ansible.cfg is actually skipped

* Also add unittests for the find_ini_config_file function
* Add documentation on world writable current working directory
  config files can no longer be loaded from a world writable current
  working directory but the end user is allowed to specify that
  explicitly.  Give appropriate warnings and information on how.

Fixes #42388
(cherry picked from commit 30662bedad)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-08-13 15:26:52 -07:00
Yuwei Zhou
d49240a619 Azure module bugfix backport (#43808)
* Fix nsg cannot add rule with  purge_rules false (#43699)

(cherry picked from commit 88a738b0ba)

* Create azure_securitygroup_fix_adding_rule.yaml

* azure_rm_loadbalancer_facts.py: list() takes at least 2 arguments fix (#29046) (#29050)

(cherry picked from commit d1d08304f9)

* azure_rm_deployment: collect tags from existing Resource Group (#26104)

(cherry picked from commit 6741e98c04)

* add change log
2018-08-13 15:22:00 -07:00
Zim Kalinowski
c2aadff306 fixing aiuth source (#42923)
(cherry picked from commit 750774d768)
2018-08-13 15:19:43 -07:00
Matt Martz
1b2c691980 [2.6] Fix invocation output. Fixes #43447 (#43542) (#43646)
* [2.6] Fix invocation output. Fixes #43447 (#43542)
(cherry picked from commit 4094b01)

Co-authored-by: Matt Martz <matt@sivel.net>

* Add changelog for #43542
2018-08-13 14:21:33 -07:00
Alicia Cozine
9ee6651a42 Updated release and maintenance page (#42613) (#43567)
* Updated release and maintenance page (#42613)

(cherry picked from commit ccb2e9d32f)

* underscore not dash for links
2018-08-13 13:40:21 -07:00
Yanis Guenane
decbe2acd8 CloudStack: Fix typos in the Guide (#43303)
(cherry picked from commit d94cc3568a)
2018-08-13 13:38:57 -07:00
Yanis Guenane
1b2d7571a7 Backport/2.6/40872 (#43396)
* Convert valid_date to bytes for conversion (#40872)

Fixes: #40523

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit b310b278be)

* 40872: Add fragment changelog
2018-08-13 13:35:49 -07:00
Jiri Tyr
7e835bf60a Fix for creation and removal of swap record in fstab (fixes #42706, #31437 and #30090) (#42837) 2018-08-13 13:34:26 -07:00
Nathaniel Case
dc477a3882 [2.6] \r does not round-trip the local socket, escape and restore on the other side (#43507)
(cherry picked from commit 9169daa)

Co-authored-by: Nathaniel Case <this.is@nathanielca.se>
2018-08-13 13:32:07 -07:00
Brian Coca
c687b1b874 nicer error message on multiprocessing fail
fixes #43090

(cherry picked from commit 21fc6a0c38)
2018-08-13 13:31:16 -07:00
Shuang Wang
f33ec9fc0a fix issue [ get_url does not change mode when checksum matches ] (#43342)
* fix  #29614

* add change log for #43342

* Cleanup tests and add tests for this scenario


Co-authored-by: ptux
(cherry picked from commit 68683b4c73)
2018-08-13 13:30:09 -07:00
Kevin Breit
cd876cf9e8 meraki_snmp - Added full response documentation for normal responses (#42488)
* Added full response documentation.

* Changed always to success for responses

(cherry picked from commit 0c59a3bc48)
2018-08-13 13:28:13 -07:00
Aurélien Grimal
41b88cc279 Fix bug #32437 (#38166)
(cherry picked from commit 71952a0aad)
2018-08-13 13:27:39 -07:00
Abhijeet Kasurde
bc3db437e8 VMware: handle pnic in proxyswitch
Fixes: #42943

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

(cherry picked from commit f2640d3394)
2018-08-13 13:26:12 -07:00
akira6592
1631d1a30f Corrects module name in net_get module doc (#43816)
(cherry picked from commit 8662e87b1a)
2018-08-13 13:25:27 -07:00
Andreas Olsson
178afb1497 Fix link description typo in tools documentation (#43828)
(cherry picked from commit 4a0b32083c)
2018-08-13 13:24:39 -07:00
Branko Majic
53327649af Fix introduction version for parameter "local" in module "group" (#43719)
Parameter "local" has been introduced to the "group" module in version 2.6, not 2.5.
2018-08-13 13:23:43 -07:00
Jordan Borean
53a96e36b9 win_domain modules: ensure Netlogon service is still running after promotion (#43703)
(cherry picked from commit 7b1cc11685)
2018-08-13 13:22:00 -07:00
Toshio Kuratomi
a0061e72fa [stable-2.6] Fix the local and ssh plugins for a cornercase retrying a syscall
The bundled selectors library which is used by the local and ssh
connection plugins had a bug which caused a traceback in a cornercase.
If selectors were in use and a syscall was interrupted, selectors would
attempt to restart the syscall after the interrupt was processed.  if
the attempt determined that the timeout for running the syscall had
already expired, the code attempted to raise OSError.  The raise was
using a Python3-ism and needed to be ported to work on Python2.

Fixes #41630
(cherry picked from commit e2e44f8)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-08-13 13:19:53 -07:00
Sam Doran
4cbf048996 Only template values in vars_prompt rather than all vars (#39304)
This allows the use of variables in vars_prompt fields but allows variables entered in the prompt to affect play vars rather than throwing an undefined error.

Add tests for vars_prompt

(cherry picked from commit 6d38167d49)
2018-08-13 13:18:30 -07:00
Sumit Jaiswal
3caa736403 Resolves bug where existing host_record was deleted when existing record name is used with different IP (#44088)
* Resolves bug where existing host_record was deleted when existing record name is used with different IP (#43235)

* resolves bug 42937

* resolves integration test failure

* resolves integration test failure

* resolves integration test failure

(cherry picked from commit fd4e774cec)

* changelogs
2018-08-13 13:17:17 -07:00
Stefan Prietl
c5b49fe4a3 Fix actions and wait in os_server_action module (#43504)
* Fix call to sdk.iterate_timeout in os_server_action

* Correct indentation for several actions in os_server_action

(cherry picked from commit d5662df695)
2018-08-13 13:16:24 -07:00
Matt Clay
0730eae41b Fix path handling in hacking/env-setup.
(cherry picked from commit 0392dbeba1)
2018-08-13 12:15:22 -07:00
Yuwei Zhou
afa818acb2 refine aks document (#43810)
(cherry picked from commit 6dce96e1d0)
2018-08-13 09:26:02 -07:00
Deepak Agrawal
9794e5b610 openvswitch_db : Handle column value conversion and idempotency in no_key case (#43914)
* openvswitch_db : Handle column value conversion and idempotency in no_key case (#43869)

* change column value to string. handle idempotency in no key case

* fix unit test failures in baseline

(cherry picked from commit 8eaebf86b6)

* change column value to string. handle idempotency in no key case
2018-08-10 17:07:01 -07:00
Matt Clay
71eabf134f Fix download URL for yum integration test.
(cherry picked from commit 3b693be80f)
2018-08-09 14:46:32 -07:00
Pilou
39182552ef improve 'service' integration tests (#43655)
* service tests: check that daemon is really running

(spoiler: it isn't)

* service tests: add PIDFile directive in systemd unit

* service tests: check 'changed' too

* service tests: fix indentation & use changed test

* service tests: #16694 has been fixed a long time ago

* service tests: refactor

- always execute cleaning tasks
- move tests tasks in a dedicated file

* service tests: add test for #42786

* service tests: display value of ansible_service_mgr

* service tests: allow to run tests twice in a row

stop & disable ansible test service

* service tests: 'pattern' value must be a substring

'pattern' parameter is poorly named

* service tests: check ansible_test service status

* service tests: test daemon must handle SIGHUP

because 'initctl reload' sends SIGHUP, otherwise test daemon stops when
receiving the signal

* service tests: remove upstart override file too

and check that files were removed using raw module and stat command

(cherry picked from commit c5f37f6bd6)
2018-08-09 10:41:54 -07:00
Pilou
516ed4d7bc [stable-2.6] Fix 2 issues in sysvinit module (backport/2.6/42786) (#43831)
* Fix 2 issues in sysvinit module (#42786)

* Do not compare result to unset parameter in sysvinit module

* Fix misformed command in sysvinit module

* Small None-comparison style fix in sysvinit module

(cherry picked from commit f26272a492)

* Update changelog
2018-08-08 09:53:28 -07:00
Sebastian Wiesinger
6f529a20b3 Fix ini variables for netconf and network_cli connections (#43601)
* Fix netconf ini variable names (#43130)

* Fix ini variables for netconf and network_cli connections
2018-08-08 15:58:54 +02:00
NilashishC
f3c3c99642 Fix add member failure 2018-08-06 09:34:57 -07:00
Felix Fontein
9ad21fbfb5 Forgot to include validations. 2018-08-01 14:14:03 -07:00
Sandra McCann
ca1916a43f Update nclu.py (#40369) (#43364)
* Update nclu.py
Added NCLU BGP Unnumbered Example
+label: ansible/ansible#40323
* Adding AS number example
(cherry picked from commit a9dc79e07b)
2018-07-31 21:40:26 -05:00
Sandra McCann
4f73a24b06 cherry-pick and fixed conflicts -pr43116 (#43513) 2018-07-31 21:38:10 -05:00
Matt Martz
ba801be6a6 Add AnsibleModule signature schema, and fix associated issues (#43512) (#43516)
* Add AnsibleModule signature schema, and fix associated issues (#43512)

(cherry picked from commit 01c0446cb5)

* Address additional module issues
2018-07-31 15:51:53 -07:00
John R Barker
fc21507a30 Update openstack inventory script to keep basic functionality Backport/2.6/43432 (#43465)
* Update openstack inventory script to keep basic functionality (#43432)

re-applies commit 6667ec4474 which
fixed the plugin to the script so that it will work with current
ansible-inventory.

Also redirect stdout before dumping the ouptput, because not doing
so will cause JSON parse errors in some cases.
(cherry picked from commit fa45c44026)

* fixed the plugin to the script so that it will work with current
2018-07-31 08:28:28 -07:00
Alicia Cozine
d067de5206
Update Openstack dynamic inventory reference (#41459) (#43455)
* Update Openstack dynamic inventory link

* Add note for change of script name

* Change name of script to prevent Python module import errors.

Fixes #41562

(cherry picked from commit 8d194fa5f7)
2018-07-31 10:21:17 -05:00
Alicia Cozine
17ecc3f093
New doc guide for GCP (#41753) (#43453)
* New doc guide for GCP (#41753)
(cherry picked from commit 2916adc88a)

* fixes broken link (#43458)
(cherry picked from commit 5fa8747af3)
2018-07-31 10:07:57 -05:00
Alicia Cozine
6edc740614
Update JSON Query filter examples (#42432) (#43456)
* Update JSON Query filter examples

Correct syntax on one example
Add more examples of escaping
Change example to show joining list to string

(cherry picked from commit 7b0dea45e9)
2018-07-31 09:28:32 -05:00
Alicia Cozine
61901c35e1
document rescue vars (#43101) (#43457)
(cherry picked from commit c809500c79)
2018-07-31 09:26:42 -05:00
Alicia Cozine
af7ea01645
Document more tools (#43053) (#43454)
* Document more tools (#43053)
(cherry picked from commit 3ab9030f05)

* Update with Emacs info (#43450)
(cherry picked from commit d79027b77f)
2018-07-31 09:25:47 -05:00
Alicia Cozine
4c0d1798b4
Fix docs typo modules_intro.rst (#40835) (#43452)
Fixed typo in modules_intro.rst.

+label: docsite_pr
(cherry picked from commit f785bf3a9c)
2018-07-31 09:24:44 -05:00
Matt Clay
7a6fc1d5a8 Update Ansible release version to 2.6.2.post0. 2018-07-28 00:32:12 -07:00
Matt Clay
c997811f45 New release v2.6.2 2018-07-27 16:18:51 -07:00
Ganesh Nalawade
aee1d42fe7 Correcting conditionals looping (#43331) (#43346)
* Correcting conditionals looping (#43331)

Empty conditionals would not break out of the loop, causing every command to be run for the same number of times as retries is defined (10 by default)

(cherry picked from commit e215f842ba)

* Update changelog
2018-07-27 08:06:15 -07:00
Brian Coca
460183ce47 Error on empty group/host name (#42584)
* error on false host/group name

(cherry picked from commit 12a8363fae)
2018-07-27 08:03:14 -07:00
Artem Goncharov
0aa5d8ed45 fixes #42042
do not create group with region name if it is not given
Backport https://github.com/ansible/ansible/pull/42939

(cherry picked from commit d3f53b4b9f6167c359dae1069cb71eb10d00afc0)
2018-07-27 08:02:25 -07:00
Toshio Kuratomi
b0a4627975 [stable-2.6] ensure 'text' source assumptions (#42522) (#43341)
* [stable-2.6] ensure 'text' source assumptions (#42522)

* ensure 'text' source assumptions.
(cherry picked from commit 937e710485)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>

* Remove piece of bugfix that depends on newer feature
2018-07-26 21:54:08 -07:00
Matt Clay
bc49055f28 Revert "[stable-2.6] ensure 'text' source assumptions (#42522)"
This reverts commit c0e7f890fb.
2018-07-26 20:15:12 -07:00
Deepak Agrawal
0bb62437f8 handle connection error exception 2018-07-26 17:50:24 -07:00
Trishna Guha
171c6fcf4d nxos_facts module and nxos cliconf fix stable-2.6 (#43180)
* Refactor nxos cliconf get_device_info and add requirements for JSON structured output support in nxos_facts module (#42089)

* nxos_facts requires JSON structured output support

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

* refactor get_device_info for legacy devices

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

* update additional logic

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

* fix regex cliconf nxos (#42288)

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

* get_device_info nxos zero or more whitespace regex (#43178)

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

* warning message improved (#42969)

(cherry picked from commit bea8e0200c)

* Add text output along with structured output in nxos_facts (#42886)

* nxos_facts to use default output instead of structured output

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

* fix shippable error

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

* nxos_facts refactor

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

* Add structured output back

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

* changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-07-26 17:48:16 -07:00
Fabian von Feilitzsch
953cd53f08 Special case project creation so that it is possible (#42132)
(cherry picked from commit 9eccc96586)
2018-07-26 17:45:27 -07:00
Fabian von Feilitzsch
134ed24474 Properly format API key when set in an enviroment variable (#42202)
(cherry picked from commit 0421305254)
2018-07-26 17:45:27 -07:00
Fabian von Feilitzsch
18ef94d56c Use top level values as defaults if metadata is not provided (#42277)
(cherry picked from commit 4f63134d78)
2018-07-26 17:45:27 -07:00
Skyler Bunny
8a964d4052 Fix docker_image archive features to work with Python 3 2018-07-26 17:43:39 -07:00
Ryan Brown
569c045361 [AWS] Fix SSM Parameter Store module when description is missing (#43020)
(cherry picked from commit 07927edfac)
2018-07-26 17:42:34 -07:00
Sam Doran
2267ba2f05 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.

(cherry picked from commit 0ca61e9d87)
2018-07-26 17:41:59 -07:00
Hossein Zolfi
e288c23a18 Fix example of nmap plugin (#42925)
(cherry picked from commit e756ef8265)
2018-07-26 17:41:05 -07:00
Michael Steffens
dea07afdae Python3: compare bytes with bytes and strings with strings. (Fixes #42677) (#42878) 2018-07-26 17:39:37 -07:00
Brian Coca
c622cc6509 better error messasge (#42770)
* better error messasge

(cherry picked from commit 9217fbb7dd)
2018-07-26 17:36:04 -07:00
Brian Coca
26e3f61dbf remove dupe entries
(cherry picked from commit 18aa87803f)
2018-07-26 17:35:13 -07:00
Andrey Laguta
a0138e5461 Fix multiple var files combining (followup to #36357)
(cherry picked from commit 2e62e36590)
2018-07-26 17:34:27 -07:00
Alexander Gubin
49d81006df sysvinit: Fix for false changed messages (#42956)
(cherry picked from commit e129616ba6)
2018-07-26 17:33:02 -07:00
Nathaniel Case
f1a0918ad3 Eos subnet overlap fix (#43023)
* Detect overlapping subnet & provide better errors

(cherry picked from commit dba975470d)
2018-07-26 17:32:03 -07:00
abirami-n
ae45488ba2 Fixes #41549 (#41551)
* Fix_module_correction
(cherry picked from commit 1152f86ba1)
2018-07-26 17:31:16 -07:00
Nathaniel Case
ee62c8ffbc Actually fix eos_facts feature detection 2018-07-26 17:30:03 -07:00
Charles Crossan
fb6ef26e39 fix typo security_protocols 2018-07-26 17:28:52 -07:00
Charles Crossan
35da8e8a04 move the TLS detection block of win_url before creating WebRequest 2018-07-26 17:28:52 -07:00
Jordan Borean
3e9a390809 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

(cherry picked from commit 04431216e7)
2018-07-26 17:27:28 -07:00
Brian Coca
e84931b9c2 don't assume all delegation subkeys exist (#43032)
* don't assume all delegation subkeys exist

fixes #43026

* add tests

(cherry picked from commit cdc762dd9e)
2018-07-26 17:25:46 -07:00
Brian Coca
8a91c36d64 also get checksum on 'any' if it is a file
fixes #42785

(cherry picked from commit 0718a53b07)
2018-07-26 17:25:02 -07:00
Chris Smolen
a0cf6d7930 add example using peer keepalive vrf and delay restore (#41111)
* add example using peer keepalive vrf and delay restore

<!--- Your description here -->
add example using peer keepalive vrf and delay restore
+label: docsite_pr
+label: issue ansible/community#311

* Update nxos_vpc.py

update task name to include "existing"

(cherry picked from commit d6fb00e797)
2018-07-26 17:24:27 -07:00
Thierry Bouvet
e0bb304f85 Fix ssl_version default value. (#42955) 2018-07-26 17:23:50 -07:00
Brian Coca
c0e7f890fb [stable-2.6] ensure 'text' source assumptions (#42522)
* ensure 'text' source assumptions.
(cherry picked from commit 937e710485)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2018-07-26 17:21:35 -07:00
Sandra McCann
7ea879ee18 cherry-picked with manually resolved conflicts from 8759d97071 (#43048) 2018-07-24 14:15:42 -05:00
Sandra McCann
1ae5e5a347 fixed typo (#42900) (#43028)
(cherry picked from commit 1900635409)
2018-07-24 14:12:50 -05:00
Matt Clay
880882bfd4 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.

(cherry picked from commit 4e489d1be8)
2018-07-24 09:55:27 -07:00
Matt Clay
4b7925dfd4 Fix win_reboot test and mark win_uri unstable.
(cherry picked from commit 547f11ad8f)
2018-07-23 18:29:10 -07:00
Felix Fontein
8c829778d1 Docker modules: improve documentation on docker vs. docker-py Python package requirements (#42457)
* Make sure all docker-py/docker requirements are listed, and clarify about docker vs. docker-py.

* Adjusting changes made in #40839.
2018-07-17 17:00:56 -07:00
Yanis Guenane
26be841b23 vultr.py: fix env var handling (#42659) 2018-07-17 16:52:59 -07:00
Nathaniel Case
d9f5eb69d5 [2.6] Update ios tests (#42509) (#42516)
* [2.6] Update ios tests (#42509)

* 192.168.0.1/24 conflicts with management IP

* Images don't have the hostnames we expect
(cherry picked from commit 399d13d)

Co-authored-by: Nathaniel Case <this.is@nathanielca.se>

* 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

(cherry picked from commit 381263ad99)
2018-07-16 18:18:30 -07:00
Kevin Breit
be411bc9ba meraki_admin - Added full return documentation for normal responses (#42487)
* Added full return documentation for normal responses

* Changed returned for responses

- Old responses were saying always returned, should have been success
or something more refined

(cherry picked from commit 5960b215bb)
2018-07-16 18:08:45 -07:00
Alicia Cozine
b0dae4f90e Documentation: show non-string non-iterable defaults for choices (#40… (#42075)
* Documentation: show non-string non-iterable defaults for choices (#40212)

* Also marking non-string defaults.

* Adding list filter from #37517 to plugin_formatter.

* Simplifying list test.

* Redistribute imports

(cherry picked from commit 0752dc12b7)

* for 2.6 compatibility, removes dependency on collections.py, take two

* fix blank line error
2018-07-16 18:07:03 -07:00
Abhijeet Kasurde
498aca834e VMware: Remove VM using vmware_guest (#42100)
This adds scenario guide for removing VM using vmware_guest module.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 6339e37abd)
2018-07-16 18:04:26 -07:00
Sam Doran
31a425d26c 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

(cherry picked from commit 1d1595b990)
2018-07-16 18:03:18 -07:00
Felix Fontein
114fa9dd08 Changing example code block language from yaml to yaml+jinja. (#40365)
(cherry picked from commit 9f84c09bf3)
2018-07-16 17:57:25 -07:00
John R Barker
9bd219eee2 Document module links (#42308)
(cherry picked from commit 6366df700d)
2018-07-16 17:56:36 -07:00
Johannes Brunswicker
7906087b0c Cherry-Picked fix for 40782 2018-07-16 17:55:59 -07:00
Julien Vey
9edd51928f 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
(cherry picked from commit 0f612d1b76)
2018-07-16 17:54:28 -07:00
Jordan Borean
69a36a3fa7 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).

(cherry picked from commit 8bdd04c147)
2018-07-16 17:53:06 -07:00
Felix Fontein
27e57e41d1 Version must be quoted (otherwise it is printed as 2.1) (#42496) 2018-07-16 17:52:04 -07:00
Jakub Libosvar
c3f2e4679c 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

(cherry picked from commit 26b0908270)
2018-07-16 17:49:54 -07:00
Matt Martz
11d2d3da55 Make sure we are comparing bytes extensions in inventory plugins (#42475)
* Ensure we are comparing text paths with extensions. Fixes #42118

* Add changelog

(cherry picked from commit abb05c98f3)
2018-07-16 17:48:57 -07:00
Carlos Mendible
4bfa7f6689 Added missing type for both template and parameters variables. (#42033)
* Added missing type for both template and parameters variables.

* changed object to dict

(cherry picked from commit 133b70ff45)
2018-07-16 17:48:11 -07:00
René Moser
e4e0433d2f [2.6] Fix docker container init check requirements (#42533)
* docker_container: fix init check requirements (#40839)

* docker_container: ensure 'init' is supported

Check docker-py version too.

Move API version check in docker_container module since 'init' module
parameter isn't defined by other docker modules.

docker-py supports 'init' since 2.2.0:
https://github.com/docker/docker-py/blob/2.2.0/docs/change-log.md

* docker_container: fix compat with docker-py<2.2

Exception was:
TypeError: create_host_config() got an unexpected keyword argument 'init'
fatal: [localhost]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):
                        File ansible_module_docker_container.py, line 2089, in <module>
                          main()
                        File ansible_module_docker_container.py, line 2084, in main
                          cm = ContainerManager(client)
                        File ansible_module_docker_container.py, line 1704, in __init__
                            self.present(state)
                        File ansible_module_docker_container.py, line 1724, in present
                            new_container = self.container_create(self.parameters.image, self.parameters.create_parameters)
                        File ansible_module_docker_container.py, line 826, in create_parameters
                            host_config=self._host_config(),
                        File ansible_module_docker_container.py, line 932, in _host_config
                            return self.client.create_host_config(**params)
                        File lib/python3.6/site-packages/docker/api/container.py, line 157, in create_host_config
                            return utils.create_host_config(*args, **kwargs)
                      TypeError: create_host_config() got an unexpected keyword argument 'init'",
    "module_stdout": "",
    "msg": "MODULE FAILURE",
    "rc": 1
}

(cherry picked from commit 3301a0b530)

* add changelog fragment
2018-07-16 17:47:21 -07:00
Kevin Breit
44edfd96f1 meraki_network - Added proper response documentation (#42393)
* Added proper response documentation to meraki_network

* Missing colon

(cherry picked from commit c644e3da79)
2018-07-16 17:46:08 -07:00
Ondra Machacek
1d1812b1a5 ovirt_affinity_lables_facts: Raise error when host/vm not found 2018-07-16 17:45:24 -07:00
Jordan Borean
f3570c2b0c 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

(cherry picked from commit 940d4a0e89)
2018-07-16 17:42:55 -07:00
Matt Davis
f126eddff1 return wu result from inner job (#42647)
fixes #42423

(cherry picked from commit a5fc9a17f0)
2018-07-16 17:42:07 -07:00
Nilashish Chakraborty
25d5d10f51 Fixed regex to pick correct items (#42557)
(cherry picked from commit fa624eba29)
2018-07-16 17:41:35 -07:00
Martin Krizek
bf1a5293d4 [aws] Add missing methods to AnsibleAWSModule (#42679)
(cherry picked from commit 00c88f6497)
2018-07-16 17:40:56 -07:00
Jordan Borean
b9bff5e39a win_chocolatey: add TLSv1.2 support for install phase (#41992)
(cherry picked from commit e3521776f5)
2018-07-16 17:40:18 -07:00
Trishna Guha
26f8b67fbd nxos bugfix cherry-pick 2.6 (#42724)
* Add get_capabilities in nxapi module_utils (#42688)

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

* add changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-07-16 17:39:27 -07:00
Dag Wieers
2b87a84301 aci_bd_subnet: Support parameter scope not set
If parameter scope is not set (None) the usual handling of lists does
not apply, and should be avoided or we get an exception.
2018-07-16 17:38:37 -07:00
jamessemai
9e706a3ed4 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

(cherry picked from commit dc32842573)
2018-07-16 17:37:59 -07:00
Jordan Borean
e3a0431c77 Cmdlets output handling 2.6 (#42721)
* fix win_unzip and win_share Powershell cmdlets output invalid JSONs (#42713)


(cherry picked from commit b2527c55c3)

* Added changelog fragment
2018-07-16 17:37:01 -07:00
Ondra Machacek
56caa66290 ovirt_auth: In case of token is passed u/p is not requierd 2018-07-16 17:27:23 -07:00
Sloane Hertel
c40b85d01f Backport pagination fix for cloudfront_facts (#42746)
* Fix #38038 cloudfront_facts module returns only first page of response (#38045)

(cherry picked from commit 12057de1c6)

* changelog
2018-07-16 17:26:48 -07:00
Dennis Conrad
f5053506d9 Fixes #42734 - typo in update-rc.d detection
(cherry picked from commit f0463befc7)
2018-07-16 17:25:50 -07:00
Agris
cbebcc3ac8 Fix for starttls connections for notification mail module
* starttls connection usage is now adding smtp.ehlo before smtp.has_extn function.
* Fixes #42338

(cherry picked from commit 5df01abd58)
2018-07-16 17:24:27 -07:00
Brian Coca
944161c9ea Fix fact cleaning (#42595)
* fix fact cleanup

fixes #41684

(cherry picked from commit 006f08da99)
2018-07-16 17:23:26 -07:00
Brian Coca
e8ff717ba8 preserve delegation info on no_log (#42577)
* preserve delegation info on no_log

fixes #42344


(cherry picked from commit e115e6496f)
2018-07-16 17:21:49 -07:00
dgeo
64737fea2d fix a (forgotten?) change in moving createhome -> create_home (#42711)
* fix a (forgotten?) change in moving createhome -> create_home

Fix for following bug on FreeBSD host whith user module:
```
fatal: [webssp]: FAILED! => {"changed": false, "module_stderr": "X11 forwarding request failed
Traceback (most recent call last):
  File \"/tmp/ansible_2rmlBl/ansible_module_user.py\", line 2487, in <module>
    main()\n  File \"/tmp/ansible_2rmlBl/ansible_module_user.py\", line 2426, in main
    (rc, out, err) = user.modify_user()
  File \"/tmp/ansible_2rmlBl/ansible_module_user.py\", line 1011, in modify_user
    if (info[5] != self.home and self.move_home) or (not os.path.exists(self.home) and self.createhome):
AttributeError: 'FreeBsdUser' object has no attribute 'createhome'
", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1}
```
It happenned with 'createhome' AND with 'create_home' form, with python 2.7 AND python 3.6

* Add changelog


Co-authored-by: dgeo <dgeo@users.noreply.github.com>
(cherry picked from commit ae96ba0d4f)
2018-07-16 17:21:04 -07:00
Nilashish Chakraborty
8b26e3899f Fix ios_vlan issue CP into 2.6 (#42665)
* 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

(cherry picked from commit 70e33ef92c)

* Added changelog for ios_vlan fix

* Fixed changelog Shippable errors

* Fix 2 for Shippable changelog errors
2018-07-16 17:13:14 -07:00
Sloane Hertel
880f1d1817 [s3_bucket] import urlparse (#42474)
Fixes #42459

(cherry picked from commit 7086863c52)
2018-07-16 17:11:31 -07:00
Jerry Chong
8274fd00fc Fix NameError in pause module (#42038)
* Fix NameError in pause module

* Add comment and changelog

Co-authored-by: Jerry Chong <jchong@netbase.com>
(cherry picked from commit 42f44b24c6)
2018-07-16 17:10:48 -07:00
Matt Clay
4b17adaf66 Temporarily switch RHEL and Windows tests to AWS.
(cherry picked from commit 11d0eb04ce)
2018-07-10 15:17:04 -07:00
Matt Clay
7968a84e4b Fix openshift integration test requirements.
(cherry picked from commit 2fbc2abf86)
2018-07-10 10:10:50 -07:00
Matt Clay
0c504ce2c4 Remove unwanted containers at CI job start.
(cherry picked from commit 528de5b82f)
2018-07-09 21:50:04 -07:00
Trishna Guha
edf933918d nxos and eos bugfix pick2.6 (#42291)
* fix nxos_vxlan_vtep_vni issue (#42183)

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

* 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>
(cherry picked from commit 805d13f287)

* Update eos_l2_interface.py (#42270)

(cherry picked from commit 51092c6ea5)

* add changelog

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

* 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

(cherry picked from commit db7300904d)

* update changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-07-09 11:31:57 -07:00
Ganesh Nalawade
9ed5e706be Fix fetching old style facts in junos_facts module (#42336) (#42351)
* Fix fetching old style facts in junos_facts module (#42336)

* Fix fetching old style facts in junos_facts module

Fixes #42298
* To fetch old style facts from junos device it requires
  login credentials in provider, hence while using
  connection=nectonf do not delete provider values
  as it might not be ignored

* Add `ofacts` as one of the options in `gather_subset`

* Minor update in documentation

* Fix CI failure

(cherry picked from commit 31dd41e4c5)

* Update changelog
2018-07-09 11:27:10 -07:00
Sam Doran
3bec68a3b3 Backport #42013 for 2.6 - linenfile empty regexp warning (#42204)
* 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

# Conflicts:
#	docs/docsite/rst/porting_guides/porting_guide_2.7.rst
#	lib/ansible/modules/files/lineinfile.py
#	test/integration/targets/lineinfile/tasks/main.yml

* Add porting guide info
2018-07-09 11:26:45 -07:00
Kevin Breit
1d759ffa2f Meraki module utility request() has improved error reporting (#39838)
* request() has improved error reporting
- 5xx errors show same as before
- 3xx and 4xx errors show error body

* Print body for errors greater than 300, but less than 500

* Remove trailing whitespace

(cherry picked from commit dd31dcab70)
(cherry picked from commit d75f821f0c2a6cf2a1303802ac8f8e18364e1fe5)
2018-07-09 11:26:14 -07:00
Sumit Jaiswal
6e479d5989 To fix the NoneType error raised in ios_l2_interface when Access Mode VLAN is unassigned (#42343)
* To fix the NoneType error raised in ios_l2_interface when Access Mode VLAN is unassigned (#42312)

* to fix the bug41657

* to fix review comment

(cherry picked from commit 828dd1a663)

* adding changelog

* renaming the changelog file name

* deleting the wrong changelog file name
2018-07-09 11:25:37 -07:00
Matt Clay
d48fae9990 Update Ansible release version to 2.6.1.post0. 2018-07-09 11:23:50 -07:00
Matt Davis
0f3a22cb13 add .post support to rpm/deb version munger (#42444)
(cherry picked from commit a2bc0129f0)
2018-07-09 11:23:50 -07:00
Matt Davis
bcd724d05c allow dev and prerelease at the same time (#41464)
(cherry picked from commit 0c92b11335)
2018-07-09 11:23:50 -07:00
Matt Clay
1a6fe6cc05 New release v2.6.1 2018-07-05 11:48:35 -07:00
Rémi REY
e433f82fc2 callback/grafana_annotations: define validate_grafana_certs type as bool (#42318)
Fixes #42317
2018-07-05 08:39:53 -07:00
John R Barker
56cca2a312 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

(cherry picked from commit d962611528)
2018-07-05 08:36:17 -07:00
Alexandre Vicenzi
ffd660f2d7 Fix broken links. (#42323)
(cherry picked from commit df2e0c7c00)
2018-07-05 08:33:25 -07:00
Alexandre Vicenzi
1e427b1b34 Fix Ansible Galaxy documentation link. (#42316)
More info: https://github.com/ansible/galaxy/issues/830
(cherry picked from commit 1dafd92c8e)
2018-07-05 07:40:40 -07:00
Jordan Borean
e65f7d218d win_domain: fix typo in cmdlet call (#41993)
(cherry picked from commit 77526a5036)
2018-07-03 15:22:08 -07:00
Jordan Borean
1024f53ffd Win group membership sid refactor 2.6 (#41990)
* 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

(cherry picked from commit bcb49f2575)

* Added changelog fragment
2018-07-03 15:21:21 -07:00
Brian Coca
4cecbe81ad [stable-2.6] ignore ansible.cfg in world writable cwd (#42070)
* ignore ansible.cfg in world writable cwd
 * also added 'warnings' to config
 * updated man page template
(cherry picked from commit b6f2aad)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2018-07-03 15:19:59 -07:00
Sloane Hertel
25ee10cd9a [stable-2.6] Fix file module with check_mode - Fixes #42111 (#42115)
* Fix file module check_mode
(cherry picked from commit 22a6927)

Co-authored-by: Sloane Hertel <shertel@redhat.com>
2018-07-03 15:18:46 -07:00
James Cassell
e6aac0e1ff pamd module regression fix (#42025)
* pamd: typo fix sufficicent->sufficient

* pamd: is_valid is a property, not a method; return a tuple

* pamd: define is_valid for all PamdLine classes

* pamd: use validate() for verbose errors, define generically

* pamd: PamdRule: rule_control is always str, use _control

Fixes https://github.com/ansible/ansible/issues/41179
2018-07-03 15:09:59 -07:00
Ganesh B. Nalawade
d1a92f85d2 Update changelog 2018-07-03 15:09:16 -07:00
Ganesh Nalawade
1bf1af8dde Fix junos_config confirm commit issue (#41527)
* Fix junos_config confirm commit issue

Fixes #40626

* Due to issue in ncclient commit() method for Juniper
  device (ncclient/ncclient#238)
  add a workaround in junos netconf plugin to generate proper
  commit-configuration xml and execute it using ncclient
  generic `rpc()` method.

* Update junos_config doc

(cherry picked from commit 88b966e23b)
2018-07-03 15:09:16 -07:00
John Barker
149acedf6d Corrects typos in net_get/put module docs 2018-07-03 15:08:16 -07:00
Sloane Hertel
851725d72a Fix setting required options for inventory plugins - backport/2.6/42049 (#42120)
* Fix setting required options for inventory plugins (#42049)

* Fix setting required options for inventory plugins

* call set_options for yaml and script plugin

(cherry picked from commit 44e5886385)

* changelog
2018-07-03 15:07:35 -07:00
LeenSun
3cbf319ee7 Update supervisorctl.py (#42031)
<!--- Your description here -->

+label: docsite_pr

(cherry picked from commit 5ea414422b)
2018-07-03 15:06:15 -07:00
Brian Coca
1f80949f96 [stable-2.6] avoid loading vars on unspecified basedir (cwd) (#42067)
* avoid loading vars on unspecified basedir (cwd)
(cherry picked from commit de0e11c)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2018-07-03 15:03:52 -07:00
Abhijeet Kasurde
ed26ee73ff Restore BOOLEANS import in basic.py (#42008)
This import was removed by mistake. This is required for backward
compatibility.

Fixes: #41988

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-03 14:58:03 -07:00
Kevin Breit
e436806e91 Change idempotency check to be single pass (#42087)
- Previously all data between both data structures was compared
- Results in situations where updates are done when not needed
- Changes to single pass so only data in payload is compared

(cherry picked from commit 3ee3fc893d)
2018-07-03 14:57:14 -07:00
Kevin Breit
d2b447e8a1 Fixes idempotency check for partial configurations (#41941)
- Previous PR would overwrite new and existing values improperly

(cherry picked from commit 7ab3f755ce)
2018-07-03 14:55:43 -07:00
John Barker
4226fb6e1a nsupdate_fix_hmac-sha384 2018-07-03 10:19:34 -07:00
David Galloway
975d93b4e8 nsupdate.py: Fix typo (#42209)
Signed-off-by: David Galloway <dgallowa@redhat.com>
(cherry picked from commit 9539284010)
2018-07-03 10:19:34 -07:00
Sviatoslav Sydorenko
587a920d50 [2.6] Add CoC and mailing lists links to PYPI
PR #42101
(cherry picked from commit fc25d28)

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2018-07-02 13:48:50 -07:00
John R Barker
f2af5e0053 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)

(cherry picked from commit e9dbebfa57)
2018-06-29 15:30:49 -07:00
wazzaz
8ba4f23290 Format fix on VMware Guide (#41272)
* Updating format of VMware Guide: small formatting error - hyperlink to module
(cherry picked from commit 91803c6ad3)
2018-06-29 11:29:34 -07:00
Abhijeet Kasurde
84f28cbf3b VMware: Add scenario guide (#40075)
This adds a scenario guide for vmware

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

(cherry picked from commit 19ece7b740)
2018-06-29 11:29:09 -07:00
Felix Fontein
3012c3c0b8 Documentation: add parameter types, and version_added for return values and facts (#41999)
* Add types for parameters.

* Add version_added for return facts and return values.

(cherry picked from commit fb0b804988)
2018-06-29 11:28:24 -07:00
Alicia Cozine
7b816a072f updates docs links to changelogs (#41289)
* updates docs links to changelogs for all versions

* updates latest 2.5 release

(cherry picked from commit e0a9a71b04)
2018-06-29 11:26:05 -07:00
Matt Clay
fdf78dc34f Update Ansible release version to 2.6.0.dev0. 2018-06-28 19:09:28 -07:00
Matt Clay
8ce3bd6dea New release v2.6.0 2018-06-28 14:38:38 -07:00
Matt Clay
f91fb2ea5e Update Ansible release version to 2.6.0rc5.dev0. 2018-06-26 21:40:49 -07:00
Matt Clay
478ab3f8b1 New release v2.6.0rc5 2018-06-26 18:33:36 -07:00
Sam Doran
bd1ecd016b Backport #41767 for 2.6 - Skip if insertbefore is using BOF until later in the module (#41929)
* 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.

(cherry picked from commit eaae1318f8)

* Add changelog fragment
2018-06-26 14:02:38 -07:00
Matt Martz
08e016780b Backport #41860 for 2.6 - support group_by with implicit localhost (#41927)
* Use inventory.get_host instead of direct access to inventory.hosts (#41860)

* Use inventory.get_host instead of direct access to inventory.hosts. Fixes #32152

* Prevent potential side effect, by using self._inventory.localhost directly instead of get_host

(cherry picked from commit 1a2ef0922f)

* Add changelog for #41860
2018-06-26 13:49:26 -07:00
Matt Martz
c15f99f95a Backport #41907 for 2.6 - fix password lookup loading (#41928)
* Don't import password lookup from network filters. Fixes #41874 (#41907)

(cherry picked from commit 93537425a0)

* Add changelog for #41907
2018-06-26 13:48:09 -07:00
Jordan Borean
cfb4a8236f win_iis_webapppool: do not output some cmdlet outputs (#41884)
(cherry picked from commit abfcc35e6f)
2018-06-26 13:44:38 -07:00
Toshio Kuratomi
12d15b7dd6 [stable-2.6] Changes to support building docs with old jinja2
This commit: fa5c0282a4 relied upon
features present in Jinja-2.10 and above.  The changes here allow us to
build the *rst* with older versions of jinja2.
(cherry picked from commit ad2e8dd)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-06-26 13:43:06 -07:00
Martin Krizek
f9c17f6337 Fix rabbitmq_* integration tests (#41836)
(cherry picked from commit a8d4bf8642)
2018-06-26 13:42:19 -07:00
Matt Martz
b42a191095 Fix docs for all test. Fixes #41956 (#41965)
(cherry picked from commit 11ce954226)
2018-06-26 13:40:13 -07:00
Zim Kalinowski
701d61531c Fix broken Azure dependencies in 2.6 (#41946)
* fixed requirements
* module fix
* updated test accordingly
* mysql & postgresl fixes
* upgraded databases
* removed test from ignore.txt
* updated mysql & postgresql tests
2018-06-26 13:37:23 -07:00
Brian Coca
0f477d1318 options should be settable multiple times
(cherry picked from commit 27e3cd6e05)
2018-06-26 13:33:36 -07:00
Matt Clay
a96f456ac2 Update Ansible release version to 2.6.0rc4.dev0. 2018-06-25 19:41:52 -07:00
Matt Clay
9917d648e5 New release v2.6.0rc4 2018-06-25 16:22:04 -07:00
Jordan Borean
25ad5fa225 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

(cherry picked from commit 9b7b564d75)
2018-06-25 13:51:09 -07:00
Brian Coca
8fafecc979 fix vars hostname fallback
also made it optimistic, rely on exceptions instead of copmlex if chains

(cherry picked from commit 11dbed1350)
2018-06-25 11:23:52 -07:00
Jordan Borean
1fe98e3066 windows dsc docs: fix missing colon in example (#41886)
(cherry picked from commit 0b2ec9b11c)
2018-06-25 10:31:18 -07:00
Nilashish Chakraborty
7cb2486fad Fix vyos_vlan aggregate issue & added tests (#41638)
* Fix vyos_vlan aggregate issue & Added tests

* Fix #2 for vyos_vlan aggregate issue

(cherry picked from commit 837c216587)
2018-06-21 18:36:51 -07:00
Brian Coca
82b0ee21f7 exclude lookup_terms from config errors (#41740)
* exclude lookup_terms from config errors
* moved direct

(cherry picked from commit 0102e42272)
2018-06-21 18:26:39 -07:00
Tim Rupp
a3e16b1090 Marks select modules as stableinterface (#41741)
this is being required by customers so that they may adopt ansible
and F5's work in ansible.

(cherry picked from commit 58d857f235)
2018-06-21 18:23:52 -07:00
Andrew Gaffney
e3a1aef586 Fix wrong python keyword (followup to #36357) (#41067)
Also add tests around that code path
2018-06-21 18:19:41 -07:00
Brian Coca
88d0e2a04a fix minor issues with debug and item labels (#41331)
* fix minor issues with debug and item labels

 - no more `item=None`, we always have a label now
 - debug should only show expected information, either msg= or the var in var=
 - also fixed method name, deprecated misleading _get_item

(cherry picked from commit 27c43daab8)
2018-06-21 16:58:57 -07:00
Sumit Jaiswal
273fb57ea8 To fix eos_vrf failure when transport method is eapi (#41470) (#41771)
* To fix eos_vrf failure when transport method is eapi (#41470)

* resolve bug 40930

* resolve bug 40930

* to fix review comments

* to fix review comments

* reverting the changes based on review

(cherry picked from commit c989b62eef)

* adding changelog for backport
2018-06-21 16:20:46 -07:00
Abhijeet Kasurde
5e10424f31 Raise Exception in virtualbox inventory plugin
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit 37293dec3d)
2018-06-21 16:16:54 -07:00
Brian Coca
96896654bd added missing raise
(cherry picked from commit 89f169127b)
2018-06-21 16:16:01 -07:00
Martin Krizek
8ddb4c3b0d Backport 2.6: apt: fix apt-mark on debian6 (#41725)
* apt: fix apt-mark on debian6 (#41530)

(cherry picked from commit 2e68811c34)

* Add changelog/fragment
2018-06-21 16:15:10 -07:00
Jordan Borean
9ce55f7e94 win_updates fix when win_updates is run with async (#41756)
(cherry picked from commit 11bd3fd318)
2018-06-21 16:13:47 -07:00
Brian Coca
4930710af2 handle groups correctly when they are 'null' (#41698)
* handle groups correctly when they are 'null'

 - even if defined as mapping but having no keys, objects shoudl still be processed correctly
 - also add ansilbe_verbosity to vars not to display in ansible-inventory

fixes #41692

(cherry picked from commit 05a49d6eb6)
2018-06-21 15:24:53 -07:00
Pilou
d95cf17dd4 Scaleway inventory plugin: small improvements (#41642)
* scaleway inventory: token is mandatory

* scaleway inventory: mention exception in error

* scaleway inventory: remove print statement

* scaleway inventory: options don't need to be attr

* scaleway inventory: remove unused attr

(cherry picked from commit 3e6c76fc2e)
2018-06-21 15:16:55 -07:00
Kevin Breit
8ad8db42e3 Add proper response documentation
- Added response documentation for organizations
- Additional information is likely to be added later

(cherry picked from commit 57b589d152105376136e3f6a8bf5f02134569464)
2018-06-21 15:13:37 -07:00
Kevin Breit
544c9e1f32 Remove notes since it's already specified in the doc fragment
(cherry picked from commit 12a4dd44b59e35718524aafb52bae9e7705c168e)
2018-06-21 15:12:18 -07:00
Kevin Breit
933ca5a41b Improved support for parameter testing and checks for org_id (#41517)
(cherry picked from commit cccaf951fa)
2018-06-21 15:11:20 -07:00
Toshio Kuratomi
d11a190349 [stable-2.6] Fix file state=touch not returning diff information
Fixes #41755
(cherry picked from commit 8bd245a)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-06-21 14:36:33 -07:00
Matt Clay
3030625d1f Disable remaining failing rabbitmq_* tests.
(cherry picked from commit 5880404151)
2018-06-21 13:51:29 -07:00
Matt Clay
79a415d4a0 Disable failing rabbitmq_plugin test.
(cherry picked from commit 00ab12dca2)
2018-06-21 12:53:53 -07:00
Matt Clay
ed5e619083 Temporarily disable gem test on osx.
Disabled due to lack of newer TLS version support on the test system.

(cherry picked from commit dce708e63e)
2018-06-19 17:01:43 -07:00
Matt Clay
1eeb1bbf7d Update Ansible release version to 2.6.0rc3.dev0. 2018-06-19 02:13:49 -07:00
Matt Clay
f5a9e007ce New release v2.6.0rc3 2018-06-18 22:43:49 -07:00
Monty Taylor
6da22edb9e Fix openstack inventory script for multi-cloud case
The shift to openstacksdk left us with a bug in that when running bare
with --list, the cloud argument to get_one is None. We just need _one_
of the clouds to pull the cache settings, since they are global (yet,
we'll go back and fix this in sdk)

If it's None, just use get_all and grab the first one.
2018-06-18 15:22:15 -07:00
Markos Chandras
f58780fb28 facts: suse: Fix major version detection for SUSE (#41416)
When parsing the distribution files such as /etc/os-release, we extract
the full distribution version but not the major version. As such, the
ansible_distribution_major_version ends up being 'NA' whereas the
ansible_distribution_version contains the full version.

Before this patch we get this on openSUSE Leap 15

ansible -o localhost -m setup -a filter=ansible_distribution_major_version
localhost | SUCCESS => {"ansible_facts": {"ansible_distribution_major_version": "NA"}, "changed": false}

After this patch we get this

ansible -o localhost -m setup -a filter=ansible_distribution_major_version
localhost | SUCCESS => {"ansible_facts": {"ansible_distribution_major_version": "15"}, "changed": false}

This also fixes the Tumbleweed distribution test to report a proper
major version and also adds a test for openSUSE Leap 15.0 to avoid
potential future regressions.

Fixes: #41410
(cherry picked from commit 1737b7be3e)
2018-06-18 15:03:29 -07:00
Toshio Kuratomi
d66dc0dcf3 [stable-2.6] Add changelog for gce_net sort fix
https://github.com/ansible/ansible/pull/41567
(cherry picked from commit ad8142fc6d)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-06-18 15:02:10 -07:00
James Cassell
5dd90fb752 update play_context for reset_connection (#40866)
steps taken from lib/ansible/executor/task_executor.py

fixes: https://github.com/ansible/ansible/issues/27520
(cherry picked from commit 23fbe0ce8e)
2018-06-18 15:00:51 -07:00
Sloane Hertel
ec87203d4b read scaleway option after the options have been set (#41259)
(cherry picked from commit 8047d97ffc)
2018-06-18 11:20:51 -07:00
Deepak Agrawal
ccf2d9c8cc conflict res after patching 2018-06-18 11:18:27 -07:00
saichint
3278ef4a6b fix nxos_linkagg issue (#41550)
* fix nxos_linkagg issue

* fix shippable

(cherry picked from commit 119e6d680b)
2018-06-18 11:16:48 -07:00
Toshio Kuratomi
1a5ba963b6 [stable-2.6] Temporarily revert c119d54
There were bugs in this that needed to be resolved.  No time to get the
fix reviewed sufficiently for 2.6.0.

We'll get this into 2.7.0 and try to get this into 2.6.1 as well.

Will need the work done in https://github.com/ansible/ansible/pull/36218
when it does get merged.
(cherry picked from commit 5c614a59a6)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-06-15 14:27:20 -07:00
Adam Miller
bf1cc2f1f4 service_facts correct meaning of state for systemd service units (#40914)
* service_facts correct meaning of state for systemd service units

Fixes #40809

Previously this module used the commend `systemctl list-unit-files
--type=service` to query state of services but list-unit-files only
shows enabled vs disabled which is not what we want for "state"

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

* make sure to define service_name before referencing it

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-06-15 12:22:26 -07:00
Matt Davis
f9f368f123 skip winrm unit tests if winrm is not installed (#41596)
(cherry picked from commit b01779ad18)
2018-06-15 12:21:16 -07:00
Sam Doran
8a0f575981 [2.6] Update user module docs (#41572)
* Clarify append and groups behavior
* Document return values
(cherry picked from commit 6fa2d9a)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2018-06-15 12:20:43 -07:00
schp
aa6954e4ee [stable-2.6] sort the port list properly (.sort() returns None)
(cherry picked from commit 63f2ad8776)

Co-authored-by: schp <schonhofen@gmail.com>
2018-06-15 12:19:58 -07:00
Trishna Guha
dcfea7d822 fix nxos edit_config for httpapi and have uniform load_config (#41358)
* fix nxos load_config for httpapi and migrate to cliconf

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

* add comment

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

* address review comment

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

* address review comment

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit f170298332)
2018-06-14 13:26:05 -07:00
Trishna Guha
09aae2e33d don't retrieve config in running_config when config is provided for diff (#41400)
* don't retrieve config in running_config when config is provided for diff

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

* fix for eos, nxos

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

* add integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 8ab0d654f3)
2018-06-14 13:26:05 -07:00
Jeff Geerling
b6ec3242fd Fix typos in blocks documentation examples. (#41508)
(cherry picked from commit a4f49ed648)
2018-06-14 07:51:17 -07:00
Roman Dodin
0f50c2f1d7 fix handling of ># ending prompts for sros (#41382) 2018-06-13 14:45:41 -07:00
Toshio Kuratomi
70f4f89178 Bkprt no log fix (#41452)
* no_log even when task_result doesn't provide key

 - now also checks task property
 - added reproducer to tests for unreachable status on item loop

(cherry picked from commit 336b3762b2)

* Add changelog entry for the no_log fix

(cherry picked from commit 5fdd101a3e)

* Tasks that are expected to fail need to begin with a special string

(cherry picked from commit a5fd86cf6d)
2018-06-13 14:45:06 -07:00
Deepak Agrawal
6cdc3ac057 iosxr_config crash if config has route-policy with multiple levels of… (#41490)
* iosxr_config crash if config has route-policy with multiple levels of 'ifelseif' and other caveats (#41091)

* diff in as-path-set or prefix-set

* fix caveat diff can not have last line with comma in prefix-set/as-path/community-set

* Simplify fix to include indentation before parse

* remove debugger

* route-policy diffs

* fix iosxr_config crash issue

* new changes in iosxr_config after git add

* end-policy-map and end-class-map are properly indented so match misplaced children only when end-* is at the beigining also fix pep8

* Remaining config blocks of route-policy which needs exclusion from diff. added new tests

* pylint/pep8 warnings

* Review comments , sanity test fix

* shbang warning

* remove unused import

(cherry picked from commit 2db6a8c26a)

* changelog entry

* sanity fix
2018-06-13 14:43:18 -07:00
Matt Clay
2ef929029d Disable failing acme_account integration test.
(cherry picked from commit d6ba139713)
2018-06-12 18:12:41 -07:00
ABond
cda4b6dad1 Digital Ocean Block Storage Bug (#41431)
Fix added for Digital Ocean Volumes API change causing Ansible to recieve an unexpected value in the response.

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

(cherry picked from commit 4efe53edd5)
2018-06-12 08:27:44 -07:00
saichint
d3a9f77361 fix get existing vpc issue (#41429)
(cherry picked from commit 00ce205535)
2018-06-12 08:26:41 -07:00
Michael Doyle
36c626977c Update CHANGELOG-v2.6.rst 2018-06-12 08:26:03 -07:00
whatupmiked
f70978c0b9 2.6 backport #41284 to fix json spelling for vyos command 2018-06-12 08:26:03 -07:00
Michael Doyle
c4f4d8c1a5 Change falied_conditions to proper spelling (#41284)
(cherry picked from commit e892646bc7)
2018-06-12 08:26:03 -07:00
Sam Doran
28e16eaad8 Update docs on import/include tasks (#33032)
(cherry picked from commit 30da71d880)
2018-06-11 11:51:10 -07:00
Trishna Guha
9ae2050e2f Fix nxos_snapshot compare (#41386)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 1998707eda)
2018-06-11 08:34:12 -07:00
Matt Clay
3bc9a04f86 Update Ansible release version to 2.6.0.dev0. 2018-06-08 23:33:22 -07:00
Matt Clay
e458807129 New release v2.6.0rc2 2018-06-08 22:03:08 -07:00
Toshio Kuratomi
4c6642debd Make admin_users only contain root and toor because admin is used for non-privileged accounts
This fixes one specific instance of failure to chown from a privileged
account:
https://github.com/ansible/ansible/issues/16052#issuecomment-384976615

Fixes #41160

(cherry picked from commit 461a2733e6)
2018-06-08 21:18:50 -07:00
Alex Stephen
b93f579ead GCP Inventory Plugin scopes fix 2018-06-08 13:05:02 -07:00
s-hertel
aad1940e61 changelog 2018-06-08 09:50:17 -07:00
Will Thames
6c505e9ef1 cherry-picked from 46886f8249 and fixed merge conflicts
Test case for missing permissions

Update aws_s3 module to latest standards

Use AnsibleAWSModule

Handle BotoCoreErrors properly

Check for XNotImplemented and NotImplemented exceptions for S3 drop-ins

Don't prematurely fail if user does not have s3:ListBucket permission

Allow S3 drop-ins to ignore put_object_acl and put_bucket_acl
2018-06-08 09:50:17 -07:00
Alex Stephen
eb672bfba3 GCP: Instance Metadata fix 2018-06-08 09:47:58 -07:00
jainnikhil30
1a673cb772 Update winrm.py (#41303)
fix the typos for winrm port

(cherry picked from commit 7fb92b6f45)
2018-06-08 09:46:30 -07:00
Sam Doran
33f3ba18f0 Fix typeo in param name (#41287)
(cherry picked from commit effa235eb6)
2018-06-08 09:45:56 -07:00
Martin Krizek
269c60cc7a first_found: fix examples to match the code (#40821)
(cherry picked from commit 23a337918c)
2018-06-08 09:45:13 -07:00
Yunge Zhu
c03373921d fix issue #41081 in azure_rm_securitygroup (#41123)
* fix issue #41081

* resolve comments

* fix lint

(cherry picked from commit 46eceba395)
2018-06-07 16:28:49 -07:00
Yuwei Zhou
96929acd5e normalize the resource location (#40802)
(cherry picked from commit e6e08a0174)
2018-06-07 16:28:49 -07:00
Yunge Zhu
adef72393e add adfs_authority_url arg in azure_rm.py (#41071)
(cherry picked from commit bd34194ace)
2018-06-07 16:28:49 -07:00
Yuwei Zhou
ca992f5aba Fixes #39648 azure_rm_virtualnetwork not handling DNS settings properly on existing virtual networks (#40646)
* check nullable

* add test

* fix

* fix

(cherry picked from commit 7b9864776a)
2018-06-07 16:28:49 -07:00
Trishna Guha
3ed8300dff increase timeout for connection reset by peer issue with httpapi (#41224)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 34e4071eca)
2018-06-07 16:19:51 -07:00
Sumit Jaiswal
b13dd0cac1 Metadata change to 'core' for 2.5 supported NIOS modules (#41244)
* changing metadata to core support

* changing metadata to core support

* changing metadata to core support

* changing metadata to core support

* changing metadata to core support

(cherry picked from commit 2c2af87b2e)
2018-06-07 16:19:12 -07:00
Toshio Kuratomi
3fffc208f7 Better error message if the template is not utf-8 encoded (#41030)
* Better error message if the template is not utf-8 encoded

Also document this in the porting guide
(cherry picked from commit cef4d862bc)
2018-06-07 16:17:29 -07:00
Sloane Hertel
97c6805d47 aws_s3: don't decrypt file before uploading - fixes #39287 (#39634)
* aws_s3: do not decrypt file before uploading to bucket

* changelog

(cherry picked from commit 387c37e255)
2018-06-07 16:16:30 -07:00
Kevin Breit
c87e26449a Backport/2.6/40856 (#41278)
* Changed request() to run json.loads() instead of module doing it
- Removed json.loads() from modules
- Removed some unreliable integration tests
- Removed self.function setting in construct_path()
-

(cherry picked from commit 0ba1e52bdd7d0d622ac7506172f743e01bc3f461)

* PEP8 changes

(cherry picked from commit 182979ffc493e7c3574f2cf67b4378a4d8603160)

* Remove debug line for push

(cherry picked from commit 5350dcf52cae7699601307d39e13d121d9bae317)
2018-06-07 16:15:10 -07:00
Matt Davis
c77bcdf3a7 fix truncated list functions in ansible-doc (#41281)
* fixed incomplete refactor of instance-level plugin list var

(cherry picked from commit 25ab2a8153)
2018-06-07 15:56:31 -07:00
Brian Coca
2e7c09e967 only add group if properly defined
also corrected skip message as this has to do with type, not name

fixes #40850

(cherry picked from commit 8e4c56d773)
2018-06-07 15:55:48 -07:00
Christian Groschupp
34f08b4eb5 cherry-pick e59742eccd and resolve conflicts
[aws] Remove walrus conditional in aws_s3 module when using custom s3_url

fix aws_s3 module to use custum s3_url
2018-06-07 15:55:02 -07:00
Sloane Hertel
c168cd482c cherry-picked from 89cea78e30 and fixed merge conflicts from restructuring the integration tests in devel
Fix async for aws_s3

Add a test that async is able to be used on aws_s3 tasks
2018-06-07 15:54:18 -07:00
Matt Martz
f74312e2bd Remove changelog entry for reverted #39365 2018-06-07 15:53:25 -07:00
Matt Martz
094c9e7a3d Revert #39365, improve error messaging (#41208)
* Revert " Update TaskInclude _raw_params with the expanded/templated path to file (#39365)"

This reverts commit 4b01b92cfe.

* Improve error messaging, catch error templating parent path

(cherry picked from commit c403f01971)
2018-06-07 15:53:25 -07:00
Richard Schwab
4a1eb1c191 Add some dots at the end of sentences (#41176)
See e.g. https://docs.ansible.com/ansible/devel/reference_appendices/config.html#default-scp-if-ssh
In the docs the list of strings is just concatenated without additional interpunctuation.

+label: docsite_pr

(cherry picked from commit edb1735ca0)
2018-06-07 15:39:19 -07:00
Jacob Floyd
f52b37e94a Docs fix: ansible_group_priority defaults to 1
The docs committed in #28777 were inconsistent.
This clarifies that the default `ansible_group_priority` is `1`.[1][2]

[1] https://github.com/ansible/ansible/blob/153c9bd/lib/ansible/inventory/group.py#L40
[2] https://github.com/ansible/ansible/blob/153c9bd/lib/ansible/cli/inventory.py#L236

(cherry picked from commit 4fa2fb9c89)
2018-06-07 15:35:59 -07:00
Matt Davis
c5484e845a fix ansible-doc regression from missing plugins (#41167)
(cherry picked from commit 087efe4232)
2018-06-07 15:33:38 -07:00
Jordan Borean
5417a373bc winrm: fix up unit tests (#41112)
(cherry picked from commit ad8e13e9f8)
2018-06-07 15:32:46 -07:00
Nathaniel Case
594b81f73e Expand ios password prompt regex (#41131)
(cherry picked from commit 49fddb6f28)
2018-06-07 15:30:50 -07:00
epicanthal
f54b9e4dd8 Update ios_facts.py (#40928)
Account for upper/lower case match occurrences of "[Nn]umber" and "[Ss]erial"

Model Number                       : WS-C3850-12X48U
System Serial Number          :  <removed>

(cherry picked from commit 12d221152b)
2018-06-07 15:30:50 -07:00
Will Thames
5503285c20 Fix ec2_ami block_device_mapping volume_size to be int in 2.6 (#40938) (#41216)
* Fix ec2_ami block_device_mapping volume_size to be int in 2.5 (#40938)

* fix ec2_ami block_device_mapping size to be int

* fixed cr issues

renamed `type` to `attribute_type`
reused `new_item` instead of creating new variable `value`

(cherry picked from commit ab96a84154)

* changelog
2018-06-07 15:27:18 -07:00
Matt Clay
db3a3ddfa9 Update Ansible release version to 2.6.0.dev0. 2018-06-05 20:40:35 -07:00
Matt Clay
0a6c643e8e New release v2.6.0rc1 2018-06-05 19:55:46 -07:00
Matt Clay
ddb60ce345 Implement new changelog generator.
(cherry picked from commit 70c475da6c)
2018-06-05 19:38:32 -07:00
Matt Davis
14acce0b44 pin azure deps to exact versions
* added warnings for newer-than-expected versions
* prevent passing both api_version and profile for newer clients
2018-06-05 18:20:45 -07:00
saichint
9823432ec3 fix nxos_snapshot issues (#41034)
* fix nxos_snapshot issues

* review comments

* doc change

(cherry picked from commit 6733bffd5d)
2018-06-05 09:19:29 -07:00
Matt Davis
25d52697af adds ansible-doc JSON plugin data dump
* used for changelog generation of new plugins

(cherry picked from commit 096d243526)
2018-06-04 18:05:48 -07:00
Matt Clay
121139b755 Changelog fragment cleanup. 2018-06-04 17:10:44 -07:00
Trishna Guha
73b5c997f4 fix nxos_udld failing with httpapi (#41074)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 72d630b831)
2018-06-04 13:42:03 -07:00
saichint
74a56f0ca1 fix nxos_banner issue (#41026)
(cherry picked from commit b6afb77a8a)
2018-06-04 13:42:03 -07:00
Nathaniel Case
e24743ff19 Fixes to ios_logging (#41029)
* Logging size may not show up in config

* This is much simpler

* Avoid repetition in tests

* Both options of buffered are optional

(cherry picked from commit 92a95368fe)
2018-06-04 13:40:34 -07:00
Ondra Machacek
773fdeb6f0 ovirt: Backport of bug fixes for 2.6 (#41092)
* ovirt_vms: Fix change cd (#40939)

* ovirt_vms: Fix attaching of CD

* ovirt_vms: Fix idemptency

* ovirt_templates: Add searching by cluster (#40934)

* ovirt_templates: Add searching by cluster

* ovirt_disks: Add searching by sd and vm_name

* Fix python syntax
2018-06-04 13:39:52 -07:00
Zhikang Zhang
e8d8fa4e1a Fix test-module failing to validate args (#41004)
* Fix test-module failing to validate args

The test-module pass a wrong argument _ansible_tmp cause the validation failed.
Change the argument _ansible_tmp to _ansible_tmpdir to fix this.

* Add a integration test for test-module.

Prior to this change, we don't have a test for test-module.

This change ensure the correctness of test-module script.
2018-06-04 13:38:19 -07:00
Tim Rupp
1ab973c3d3 Fixes not using the parent parameter (#41102)
The parent parameter was not being used in the module. This meant
that all child profiles would use the system-defined parent instead
of the parent specified in the module

(cherry picked from commit 457c813d46)
2018-06-04 13:35:31 -07:00
Tim Rupp
fb3f0a53d9 More correct fix for status problem (#41045)
Status is not being determined right when monitors are enabled but
the state is up or down. This patch fixes it.

(cherry picked from commit 033adf8cd5)
2018-06-04 08:42:46 -07:00
Nathaniel Case
205b66ee7c Don't try to reuse ansible_port, it doesn't work that way (yet?) (#41022)
(cherry picked from commit 70e3a7c9e1)
2018-06-01 12:42:20 -07:00
s-hertel
eedf5d6c6d Fix cache timeout behavior
(cherry picked from commit c1400ce909)
2018-06-01 12:40:30 -07:00
Sam Doran
8d345c7cd6 Do not try to import simplejson in jsonfile.py (#40983)
With the addition on ajson.py in cbb6a7f4e8, two
new classes were created: AnsibleJSONDecoder and AnsibleJSONEncoder. These
classes are used when calling json.looads() and json.dumps().

This works fine with everything except the jsonfile.py cache plugin, which would
first try to import simplejson as json, then fall back to json. When simplejson
is installed, the load() or dump methods from simplejson are called, which then
try to use the AnsibleJSONEncoder/AnsibleJSONDecoder subclass from ajson.py.
But asjon.py imports json, not simplejson, and things blow up.

(cherry picked from commit 479b26fe31)
2018-06-01 12:39:03 -07:00
Brian Coca
08aeeefa90 Fix error reporting on bad type for config setting
(cherry picked from commit c86fd6e2df)
2018-06-01 10:38:19 -07:00
Brian Campbell
7d3ce99a6f Use colspan on td instead of divs for hierarchical tables (#39948)
Address Firefox table-rendering issues in docs. Refactor to use colspan to provide table cells which can vary in width and indentation; the outermost has the greatest colspan, and each nested key has a colspan of one less than the parent, with padding cells for indentation.
Apply styling to table cells to get the table height to work without hacks or browser-specific
styling.  Simplify the markup and CSS by removing extra divs. Use two passes over the options, return values, and return facts in the Jinja2 module-docs template: one to determine the maximum nesting depth to compute the maximum colspan needed, plus one to lay out the rows.
(cherry picked from commit fa5c0282a4)
2018-06-01 10:37:39 -07:00
Tim Rupp
4536fcc722 Re-allow SSH due to broken delegation (#40978)
Removes the SSH enforcement because it breaks situations where, for example,
an admin maintains Ansible Tower and another team needs to use Ansible
with the BIG-IP modules, but the Tower admin does not want to install
the F5-SDK on the Ansible Tower instance.

In this situation, the user needs to delegate the execution of the BIG-IP
module to another linux host that does have the dependencies installed.

Usually this is done with delegation, often over SSH. Limiting the SSH
connection here prevents this from working.

(cherry picked from commit 8bccd0830b)
2018-06-01 10:34:21 -07:00
Matt Martz
cfc67ce177 Add docs detailing how to convert many with_X style loops to use loop and filters (#40964)
* Add docs detailing how to convert many with_X style loops to use loop and filters. Fixes #40727

* Switch lookup used in query vs lookup comparison, to not recommend use of nested lookup

* Improve docs based on feedback

(cherry picked from commit 1cec3c8daf)
2018-06-01 10:31:20 -07:00
Brian Coca
6e7bdb04ee enforce required config
(cherry picked from commit cbedbd3c9c)
(cherry picked from commit bcabbe33c8)
2018-05-31 18:27:02 -07:00
Matt Clay
8f2c34fc69 Add changelog entries from deleted CHANGELOG.md. 2018-05-31 16:06:49 -07:00
Monty Taylor
741e09f984 Pass cloud parameter to get_one call
When we switch this to pull from the CloudRegion object, we missed
passing the parameter along.
2018-05-31 13:54:19 -07:00
Fabian von Feilitzsch
65d96bf354 K8s dynamic collected changes (#40745)
* Move k8s modules to dynamic backend

* update required openshift version

* update -> patch

* use new dynamic client exceptions

* style

* guard urllib3 import

* guard ansibleerror import

* give more information about error cause

* format in variable

* style

* rename tests

* Search for provided kind in a few more places to match old behavior, properly handle failure

* make common code use fail instead of fail_json, to work for lookup plugins as well

* update docs

* move openshift_raw tests into k8s tests

* fix typo

* Use diff of response and resource to determine change, don't do any checking client-side before making requests

* remove duplicate yaml blocks

* Update porting guide for k8s module

* remove invalid doc refs

* If fuzzy searching finds a resource, update resource_definition to match proper kind and version

* remote unsupported openshift_raw variables

* properly check environment variables when determining auth method:
2018-05-31 13:32:42 -07:00
Nathaniel Case
cad351328d Search for macaddresses more stringently (#40901)
* Search for macaddresses more stringently

Fixes #40829

(cherry picked from commit e7afd3d378)
2018-05-31 13:18:15 -07:00
Ricardo Carrillo Cruz
ca3c0dfaea Do not gather mem facts if command invalid (#40820)
* Do not gather mem facts if command invalid

In some firmwares, 'show memory statistics' fail, thus
do not populate mem if we got a failure after running that command.

* Fix pep8

* Warn if got error when running 'sh memory statistics'

* Fix pep8

(cherry picked from commit 669949e6a3)
2018-05-31 13:17:15 -07:00
Sumit Jaiswal
42661ba459 Fix for updating the name in case of host record and network view and also display meaningful error in case of connection timeout (#40597)
* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* to resolve the bug 40709

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* to fix shippable nios automation error

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* shippable error fix

* shippable error fix

* shippable error fix

* shippable error fix

* shippable error fix

* review comment fix

* shippable error fix

* shippable error fix

(cherry picked from commit 81510970ae)
2018-05-31 13:10:55 -07:00
Ricardo Carrillo Cruz
7f50d11806 Command authorization failed ios regex (#40819)
* Add 'Command authorization failed' to stderr regex list

* Add missing comma

* Remove superfluous comma

(cherry picked from commit 026de6bcb0)
2018-05-31 13:00:58 -07:00
Nilashish Chakraborty
1ea5790f56 Fixes eos_logging idempotence issue #31862 (#40604)
* eos_logging idempotence fix

* fixed eos_logging idempotence issue

* Fixed pylint and pep8 errors

* Added tests for eos_logging & minor fix

* Removed q statements

(cherry picked from commit b9ea646839)
2018-05-31 10:01:03 -07:00
Nilashish Chakraborty
a3178a1153 Fixes ios_logging idempotency issues (#40701)
* Fixes ios_logging idempotency issues

* Added intergration tests & minor fixes

* Minor fixes in tests

* Minor fixes in tests #2

* eos_logging fixes after PR review

(cherry picked from commit a013cdc747)
2018-05-31 10:00:42 -07:00
Trishna Guha
079a1c3d06 fix nxos output truncated issue (#40961)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-31 12:35:41 -04:00
Matt Clay
9bb260b543 Update Ansible release version to 2.6.0.dev0. 2018-05-30 19:18:27 -07:00
Matt Clay
707f069fe8 New release v2.6.0a2 2018-05-30 17:47:09 -07:00
Matt Martz
87a163064f
Backport #40833 for 2.6 - synchronize _remote_is_local (#40918)
* Use _remote_is_local=True for local connection in synchronize (#40833)

* All instances of local connection should use _remote_is_local=True. Fixes #40551

* Switch to instance attribute for synchronize

* Add test that shows that synchronize _remote_is_local addresses tmpdir building

(cherry picked from commit ad7ba91f75)

* Add changelog entry for #40833
2018-05-30 16:53:50 -05:00
Alicia Cozine
a2ca2e2a25
reinstates connection:local as an option for nxapi (#40834) (#40916)
(cherry picked from commit 0e0a5243c8)
2018-05-30 16:06:32 -05:00
Alicia Cozine
0c907779a4
updates network examples to 2.6 (#40831) (#40899)
(cherry picked from commit e2146a7696)
2018-05-30 15:29:06 -05:00
Matt Clay
b184e73b89 Fix FreeBSD package install in test setup.sh.
(cherry picked from commit c3d3b6cedc)
2018-05-30 09:00:43 -07:00
Nathaniel Case
848327a6b5
Fix eapi tests to use become (#40838) (#40848)
* Fix eapi tests to use become (#40838)

* Return the expected prompt character based on become status

* Update eos_banner tests for eapi

* Update eos_config tests for eapi

* Update eos_facts tests for eapi

* Update eos_interface tests for eapi

* Update eos_l3_interface tests for eapi

* Update eos_lldp tests for eapi

* Update eos_logging tests for eapi

* Update eos_smoke tests for eapi

* Update eos_system tests for eapi

(cherry picked from commit 20f93816d6)

* Remove local from most eos tests now that provider is out
2018-05-30 09:56:31 -04:00
Trishna Guha
592c6877b5
fix nxos dci failures (#40871) (#40873)
* fix structured output for nxos_linkagg

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

* fix TypeError for nxos_interface

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 786ec14e54)
2018-05-30 15:35:46 +05:30
Trishna Guha
58f018e367
nxos and httpapi cherry-pick (#40859)
* httpapi fix nxos (#40806)

* httpapi fix nxos

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

* nxos_hsrp fix

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

* fix nxos_vrf and migrate get_interface_type to module_utils (#40825)

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

* nxos_vlan fix (#40822)

* nxos_vlan fix

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

* uncomment mode test as nxapi now has get_capabilities

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

* Update nxos_install_os module (#40102)

* Add nxos_install_os integration tests

* Update call to check timers

* Update check_ansible_timer method

* Modify network_cli integration tests

* Add timer check for nxos_install_os

* Add comments for clear_persistent_sockets

* Update connection info for tests

* More updates

* Restructure files for provider and non-provider testing

* Update env var name and add check for ISSU switchover

(cherry picked from commit 9f026309a6)
2018-05-30 10:40:25 +05:30
Monty Taylor
828d878bf9 Bump python support version for openstack modules (#40751)
The openstack modules do not support python 2.6 as the underlying
library dependency (openstacksdk) does not support python 2.6. Update
the docs to make this clear.
2018-05-29 08:52:51 -04:00
Tim Rupp
b97a47ac2c
Fix connection error reporting (#40758) (#40759)
The variables used for reporting errors were incorrect. Additionally,
the fetching of connection related params was using an old format.

(cherry picked from commit dc08bca1fd)
2018-05-26 17:38:26 -07:00
Tim Rupp
a018a1e6d4
Fixes parameters to fail_json (#40756) (#40757)
The number of parameters was incorrect. This patch fixes it.

(cherry picked from commit 547a1ed67d)
2018-05-26 16:06:00 -07:00
Adam Miller
882f249f1d
Revert "Move k8s modules to dynamic backend (#39632)" (#40743) (#40744)
This reverts commit 4373b155a5.
2018-05-26 00:32:40 -05:00
Matt Clay
3f83e7e473 Initial stable-2.6 branch commit. 2018-05-25 21:15:12 -07:00
1889 changed files with 24866 additions and 10125 deletions

5
.cherry_picker.toml Normal file
View file

@ -0,0 +1,5 @@
team = "ansible"
repo = "ansible"
check_sha = "f31421576b00f0b167cdbe61217c31c21a41ac02" # the very first commit in repo
fix_commit_msg = false # Don't replace "#" with "GH-"
default_branch = "devel"

2
.github/BOTMETA.yml vendored
View file

@ -1145,8 +1145,6 @@ files:
notify: mattclay
test/sanity/:
notify: mattclay
test/utils/docker/:
notify: mattclay
test/utils/shippable/:
notify: mattclay
test/integration/group_vars/:

1
.gitignore vendored
View file

@ -103,3 +103,4 @@ htmlcov/
# ansible-test coverage results
test/units/.coverage.*
/test/integration/cloud-config-azure.yml
changelogs/.plugin-cache.yaml

View file

@ -20,7 +20,7 @@ PEP 8 and basic style checks
* [PEP 8](https://www.python.org/dev/peps/pep-0008/) is a great Python style guide, which you should read.
* PEP 8 must not be strictly followed in all aspects, but most of it is good advice.
* The line is limited to 160 characters.
* To run checks for things we care about, use [ansible-test](https://docs.ansible.com/ansible/dev_guide/testing_pep8.html#running-locally).
* To run checks for things we care about, use [ansible-test](https://docs.ansible.com/ansible/devel/dev_guide/testing_sanity.html).
* Similarly, additional checks can be made with "make pyflakes".
* There is no need to submit code changes for PEP 8 and pyflakes fixes, as these break attribution history. Project leadership will make these periodically.
* Do not submit pull requests that simply adjust whitespace in the code.
@ -28,7 +28,7 @@ PEP 8 and basic style checks
Testing
=======
* Much of ansible's testing needs are in integration, not unit tests. Add module tests there.
* Much of Ansible's testing needs are in integration, not unit tests. Add module tests there.
* That being said, there are unit tests too!
* Code written must absolutely pass tests (i.e. "make tests")
* You should anticipate any error paths in your code and test down those error paths.

View file

@ -1,11 +1,16 @@
prune hacking
include README.rst
include COPYING
include SYMLINK_CACHE.json
include requirements.txt
include .coveragerc
include shippable.yml
include tox.ini
include bin/ansible-test
include examples/hosts
include examples/ansible.cfg
include examples/scripts/ConfigureRemotingForAnsible.ps1
include examples/scripts/upgrade_to_ps3.ps1
recursive-include lib/ansible/executor/powershell *
recursive-include lib/ansible/module_utils/powershell *
recursive-include lib/ansible/modules *
recursive-include lib/ansible/galaxy/data *

View file

@ -9,7 +9,7 @@
# make deb-src -------------- produce a DEB source
# make deb ------------------ produce a DEB
# make docs ----------------- rebuild the manpages (results are checked in)
# make tests ---------------- run the tests (see https://docs.ansible.com/ansible/dev_guide/testing_units.html for requirements)
# make tests ---------------- run the tests (see https://docs.ansible.com/ansible/devel/dev_guide/testing_units.html for requirements)
# make pyflakes, make pep8 -- source code checks
########################################################
@ -48,7 +48,7 @@ RELEASE ?= 1
# Get the branch information from git
ifneq ($(shell which git),)
GIT_DATE := $(shell git log -n 1 --format="%ai")
GIT_DATE := $(shell git log -n 1 --format="%ci")
GIT_HASH := $(shell git log -n 1 --format="%h")
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD | sed 's/[-_.\/]//g')
GITINFO = .$(GIT_HASH).$(GIT_BRANCH)
@ -57,7 +57,7 @@ GITINFO = ""
endif
ifeq ($(shell echo $(OS) | egrep -c 'Darwin|FreeBSD|OpenBSD|DragonFly'),1)
DATE := $(shell date -j -r $(shell git log -n 1 --format="%at") +%Y%m%d%H%M)
DATE := $(shell date -j -r $(shell git log -n 1 --format="%ct") +%Y%m%d%H%M)
CPUS ?= $(shell sysctl hw.ncpu|awk '{print $$2}')
else
DATE := $(shell date --utc --date="$(GIT_DATE)" +%Y%m%d%H%M)
@ -122,7 +122,7 @@ ifneq ($(REPOTAG),)
endif
# ansible-test parameters
ANSIBLE_TEST ?= test/runner/ansible-test
ANSIBLE_TEST ?= bin/ansible-test
TEST_FLAGS ?=
# ansible-test units parameters (make test / make test-py3)
@ -239,9 +239,9 @@ sdist: clean docs
sdist_upload: clean docs
$(PYTHON) setup.py sdist upload 2>&1 |tee upload.log
.PHONY: changelog_reno
changelog_reno:
reno -d changelogs/ report --title 'Ansible $(MAJOR_VERSION) "$(CODENAME)" Release Notes' --collapse-pre-release --no-show-source --earliest-version v$(MAJOR_VERSION).0a1 --output changelogs/CHANGELOG-v$(MAJOR_VERSION).rst
.PHONY: changelog
changelog:
packaging/release/changelogs/changelog.py release -vv && packaging/release/changelogs/changelog.py generate -vv
.PHONY: rpmcommon
rpmcommon: sdist

View file

@ -12,6 +12,7 @@ except Exception:
pass
import fcntl
import hashlib
import os
import signal
import socket
@ -35,6 +36,23 @@ from ansible.utils.display import Display
from ansible.utils.jsonrpc import JsonRpcServer
def read_stream(byte_stream):
size = int(byte_stream.readline().strip())
data = byte_stream.read(size)
if len(data) < size:
raise Exception("EOF found before data was complete")
data_hash = to_text(byte_stream.readline().strip())
if data_hash != hashlib.sha1(data).hexdigest():
raise Exception("Read {0} bytes, but data did not match checksum".format(size))
# restore escaped loose \r characters
data = data.replace(br'\r', b'\r')
return data
@contextmanager
def file_lock(lock_path):
"""
@ -192,23 +210,8 @@ def main():
try:
# read the play context data via stdin, which means depickling it
cur_line = stdin.readline()
init_data = b''
while cur_line.strip() != b'#END_INIT#':
if cur_line == b'':
raise Exception("EOF found before init data was complete")
init_data += cur_line
cur_line = stdin.readline()
cur_line = stdin.readline()
vars_data = b''
while cur_line.strip() != b'#END_VARS#':
if cur_line == b'':
raise Exception("EOF found before vars data was complete")
vars_data += cur_line
cur_line = stdin.readline()
vars_data = read_stream(stdin)
init_data = read_stream(stdin)
if PY3:
pc_data = cPickle.loads(init_data, encoding='bytes')
@ -260,6 +263,8 @@ def main():
if rc == 0:
process.run()
else:
process.shutdown()
sys.exit(rc)

15
bin/ansible-test Executable file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env python
# PYTHON_ARGCOMPLETE_OK
"""Primary entry point for ansible-test."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import sys
if __name__ == '__main__':
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'test', 'runner')))
import lib.cli
lib.cli.main()

674
changelogs/.changes.yaml Normal file
View file

@ -0,0 +1,674 @@
releases:
2.6.0:
codename: Heartbreaker
fragments:
- v2.6.0_summary.yaml
release_date: '2018-06-28'
2.6.0a1:
codename: Heartbreaker
fragments:
- ansible-managed-encoding.yaml
- azure-lb-sku.yaml
- base64_filter_encoding.yaml
- command-support-argv.yaml
- copy-files-default-follow.yaml
- copy-no-chmod.yaml
- copy-recursive-copy.yml
- encoding-docs-plugin-parsing.yaml
- file-disallow-src.yaml
- file-nonexistent-link.yaml
- file-nonexitent-link-recurse.yaml
- file-succeed-if-already-absent.yaml
- gem-custom-home.yaml
- grafana-deprecation-warnings.yaml
- includes.yaml
- mode-preserve.yaml
- pause-ctrl-c.yaml
- postgresql_user-encrypted-fixes.yml
- py36-spwd.yaml
- template-filename-encoding.yaml
- user-expires.yaml
- v2.6.0a1_catchup.yaml
- v2.6.0a1_summary.yaml
- win_environment-do-not-delete-on-null.yaml
- win_file-special-char-fix.yaml
- win_get_url-ftp-support.yaml
- win_module_utils_sid-conversion.yaml
- win_template-dest-dir-fix.yaml
- win_updates_typo_whitelist_fix.yaml
- window_become-better-errors.yaml
- windows-deprecation-removal.yaml
- winrm-encoding-fix
- winrm-get_correct_user.yaml
- yaml-callback-unicode.yaml
modules:
- aci_l3out
- avi_autoscalelaunchconfig
- avi_l4policyset
- avi_useraccount
- aws_caller_facts
- aws_inspector_target
- aws_ses_identity_policy
- aws_sgw_facts
- azure_rm_aks
- azure_rm_aks_facts
- bigip_data_group
- bigip_device_license
- bigip_gtm_global
- bigip_gtm_monitor_bigip
- bigip_gtm_monitor_firepass
- bigip_gtm_monitor_http
- bigip_gtm_monitor_https
- bigip_gtm_monitor_tcp
- bigip_gtm_monitor_tcp_half_open
- bigip_gtm_pool_member
- bigip_gtm_virtual_server
- bigip_log_destination
- bigip_log_publisher
- bigip_management_route
- bigip_profile_dns
- bigip_profile_tcp
- bigip_profile_udp
- bigip_service_policy
- bigip_smtp
- bigip_snmp_community
- bigip_timer_policy
- bigip_trunk
- bigiq_application_fasthttp
- bigiq_application_fastl4_tcp
- bigiq_application_fastl4_udp
- bigiq_application_http
- bigiq_application_https_offload
- bigiq_application_https_waf
- bigiq_regkey_license_assignment
- cnos_command
- cnos_config
- cs_role_permission
- digital_ocean_account_facts
- digital_ocean_certificate_facts
- digital_ocean_domain_facts
- digital_ocean_image_facts
- digital_ocean_load_balancer_facts
- digital_ocean_region_facts
- digital_ocean_size_facts
- digital_ocean_snapshot_facts
- digital_ocean_tag_facts
- digital_ocean_volume_facts
- ec2_eip_facts
- ec2_vpc_vpn_facts
- exos_command
- fortios_webfilter
- gcp_compute_address
- gcp_compute_backend_bucket
- gcp_compute_backend_service
- gcp_compute_health_check
- gcp_compute_http_health_check
- gcp_compute_https_health_check
- gcp_compute_instance
- gcp_compute_instance_template
- gcp_compute_network
- gcp_compute_route
- gcp_compute_subnetwork
- gcp_compute_target_http_proxy
- gcp_compute_target_https_proxy
- gcp_compute_target_tcp_proxy
- gcp_container_cluster
- gcp_container_node_pool
- gcp_dns_resource_record_set
- gcp_pubsub_subscription
- gcp_pubsub_topic
- gcp_storage_bucket
- gcp_storage_bucket_access_control
- gitlab_deploy_key
- gitlab_hooks
- k8s
- ldap_passwd
- memset_zone
- meraki_network
- meraki_organization
- na_ontap_broadcast_domain
- net_get
- net_put
- netconf_get
- one_host
- one_image
- one_image_facts
- one_vm
- os_server_metadata
- os_volume_snapshot
- psexec
- purefa_ds
- purefa_facts
- purefa_pgsnap
- purefb_fs
- purefb_snap
- rds_instance_facts
- rds_snapshot_facts
- scaleway_compute
- scaleway_sshkey
- slxos_command
- slxos_config
- slxos_facts
- slxos_interface
- slxos_l2_interface
- slxos_linkagg
- spectrum_device
- sysvinit
- vmware_cluster_facts
- vmware_datastore_cluster
- vmware_datastore_maintenancemode
- vmware_guest_disk_facts
- vmware_guest_snapshot_facts
- vmware_host_capability_facts
- vmware_host_powerstate
- vmware_local_user_facts
- vmware_portgroup_facts
- vmware_resource_pool_facts
- vmware_tag
- vmware_tag_facts
- vmware_vswitch_facts
- win_domain_computer
- win_hostname
- win_pester
- yarn
- zabbix_group_facts
plugins:
callback:
- cgroup_memory_recap
- grafana_annotations
- sumologic
connection:
- httpapi
inventory:
- foreman
- generator
- nmap
lookup:
- onepassword
- onepassword_raw
release_date: '2018-05-21'
2.6.0a2:
codename: Heartbreaker
fragments:
- always_run_removal.yaml
- aws_ses_identity_check_mode.yaml
- powershell_use_set_tmpdir.yaml
- selinux-check-mode.yaml
- synchronize_remote_is_local.yaml
- v2.6.0a2_catchup.yaml
- v2.6.0a2_summary.yaml
- win_updates-add-scheduled-tasks-back.yaml
- winrm_kinit_error-fix.yaml
- xenserver-facts-fix.yaml
modules:
- acme_account
- aws_config_aggregation_authorization
- aws_config_aggregator
- aws_config_delivery_channel
- aws_config_recorder
- aws_config_rule
- aws_glue_connection
- aws_glue_job
- azure_rm_resource
- azure_rm_resource_facts
- bigip_gtm_monitor_external
- bigip_monitor_external
- bigiq_utility_license
- cloud_init_data_facts
- elb_network_lb
- flatpak
- flatpak_remote
- gcp_compute_disk
- gcp_compute_firewall
- gcp_compute_forwarding_rule
- gcp_compute_global_address
- gcp_compute_global_forwarding_rule
- gcp_compute_image
- gcp_compute_instance_group
- gcp_compute_instance_group_manager
- gcp_compute_ssl_certificate
- gcp_compute_target_pool
- gcp_compute_target_ssl_proxy
- gcp_compute_url_map
- gluster_peer
- heroku_collaborator
- memset_dns_reload
- memset_zone_domain
- memset_zone_record
- meraki_admin
- meraki_snmp
- na_ontap_aggregate
- na_ontap_broadcast_domain_ports
- na_ontap_cifs
- na_ontap_cifs_acl
- na_ontap_cifs_server
- na_ontap_cluster
- na_ontap_cluster_ha
- na_ontap_export_policy
- na_ontap_export_policy_rule
- na_ontap_igroup
- na_ontap_interface
- na_ontap_iscsi
- na_ontap_job_schedule
- na_ontap_license
- na_ontap_lun
- na_ontap_lun_map
- na_ontap_net_ifgrp
- na_ontap_net_port
- na_ontap_net_routes
- na_ontap_net_vlan
- na_ontap_nfs
- na_ontap_ntp
- na_ontap_qtree
- na_ontap_service_processor_network
- na_ontap_snapshot
- na_ontap_snmp
- na_ontap_svm
- na_ontap_ucadapter
- na_ontap_user
- na_ontap_user_role
- na_ontap_volume
- na_ontap_volume_clone
- netconf_rpc
- one_service
- slxos_l3_interface
- slxos_vlan
plugins:
inventory:
- gcp_compute
release_date: '2018-05-30'
2.6.0rc1:
codename: Heartbreaker
fragments:
- v2.6.0rc1_catchup.yaml
- v2.6.0rc1_summary.yaml
release_date: '2018-06-05'
2.6.0rc2:
codename: Heartbreaker
fragments:
- 41167_ansible_doc_regression.yaml
- admin-users-default-change.yaml
- aws_s3_async_fix.yaml
- aws_s3_decryption_fix.yaml
- aws_s3_fix_custom_endpoints.yaml
- aws_s3_fix_exception_handling.yaml
- ec2_ami_fix_block_device_mapping_volume_size_type.yaml
- v2.6.0rc2_summary.yaml
release_date: '2018-06-08'
2.6.0rc3:
codename: Heartbreaker
fragments:
- digital_ocean_block_storage_fix.yaml
- gce-sort-fix.yaml
- iosxr_config_route_policy_objects_fix.yaml
- no_log_fix_for_connection_exceptions.yaml
- reset_con_fix.yml
- v2.6.0rc3_summary.yaml
release_date: '2018-06-18'
2.6.0rc4:
codename: Heartbreaker
fragments:
- 41530-apt-mark-deb6.yaml
- debug_fixes.yml
- eos_vrf_failure-fix.yml
- file_touch_diff.yaml
- fix_config_required.yml
- fix_yaml_inv_nulls.yml
- missing_raise.yml
- v2.6.0rc4_summary.yaml
- vars_lk.yml
- virtualbox_inventory.yaml
- win_updates-async-fix.yml
- winrm_kinit-remove-pass-log.yml
release_date: '2018-06-25'
2.6.0rc5:
codename: Heartbreaker
fragments:
- fix_options.yml
- fix_password_lookup_loading.yaml
- group_by_localhost.yaml
- lineinfile-insertbefore-bof-bugfix.yaml
- v2.6.0rc5_summary.yaml
- win_iis_webapppool-output-fix.yml
release_date: '2018-06-26'
2.6.1:
codename: Heartbreaker
fragments:
- avoid_cwd_vars.yml
- basic_booleans_backward_compat.yaml
- file_touch_check_mode.yaml
- inventory_manager_fix_required_options_override.yaml
- junos_config_confirm_commit.yaml
- nsupdate_fix_hmac-sha384.yaml
- v2.6.1_summary.yaml
- win_domain-dns-typo-fix.yml
- win_group_membership-sid-bugfix.yml
- wrcwd_ansible.cfg.yml
release_date: '2018-07-05'
2.6.10:
codename: Heartbreaker
fragments:
- powershell-bootstrap.yaml
- v2.6.10_summary.yaml
release_date: '2018-11-30'
2.6.11:
codename: Heartbreaker
fragments:
- 45155-vmware-handle_exception.yaml
- 45155-vmware_host_service_facts-update_docs.yaml
- 47313-vmware-fix_module_error.yaml
- 49096-ansible-galaxy-fix_info_typo.yaml
- 49113-iam-role-arn-parsing-updated.yml
- avoid_ssh_retry_discolsures.yml
- nxos_facts_multiple_bugfixes.yaml
- nxos_install_os_nxapi_fix.yaml
- nxos_interface_linkagg_idempotence.yaml
- v2.6.11_summary.yaml
release_date: '2018-12-13'
2.6.12:
codename: Heartbreaker
fragments:
- 49409-lineinfile_must_not_insert_lines_multiples_times_with_insertbefore_insertafter.yml
- 50143-win_firewall_rule-invalid-bypass.yml
- 50185-win_updates-report-changes-correctly.yml
- acl_doc_fix.yml
- docker_volume-force-change-detection-revert.yaml
- openstack_inventory_fix.yml
- v2.6.12_summary.yaml
- win_copy-empty-dir.yaml
- win_lineinfile-output.yaml
release_date: '2019-01-17'
2.6.13:
codename: Heartbreaker
fragments:
- fix_pull_extra.yml
- junos_commit_error_fix.yaml
- ssh_connection_invalid_password.yaml
- systemd-warn-on-chroot.yaml
- v2.6.13_summary.yaml
- vmware_guest-documentation_fix.yaml
- win_power_plan-windows10.yaml
release_date: '2019-02-07'
2.6.14:
codename: Heartbreaker
fragments:
- 45378-fix-sql-tags.yml
- 51781-fixing-managed-disk-facts.yaml
- 52130-win_psmodule-update_nuget.yaml
- 52388-postgresqldatabase-fix-force-update.yml
- 52389-mysqldatabase-fix-force-update.yaml
- disallow-relative-homedir.yaml
- v2.6.14_summary.yaml
- win-become-elevation.yaml
- winrm-ansible-conn-error.yaml
release_date: '2019-02-21'
2.6.15:
codename: Heartbreaker
fragments:
- 40092-mysql_user-match-backticks.yml
- aws_ec2_inventory_integration_tests.yaml
- to_yaml-default_flow_style.yaml
- v2.6.15_summary.yaml
- win_domain-cred.yaml
- win_file-hidden.yaml
- winrm-send-input-check.yaml
- zypper-python3.yaml
release_date: '2019-03-14'
2.6.16:
codename: Heartbreaker
fragments:
- 54192-openssl_publickey-openssh-passphrase.yml
- v2.6.16_summary.yaml
- win_acl-paths.yaml
- win_acl_inheritance-paths.yaml
- win_certificate_store-paths.yaml
- win_chocolatey-update.yaml
- win_copy-paths.yaml
- win_file-paths.yaml
- win_find-paths.yaml
- win_mod_utils-paths.yaml
- win_owner-paths.yaml
- win_slurp-paths.yaml
- win_tempfile-path.yaml
- win_user_right-output.yaml
- winrm-all-timeout-exceptions.yaml
release_date: '2019-04-03'
2.6.17:
codename: Heartbreaker
fragments:
- 44412-copy-fix-unwanted-acls.yaml
- 55150-native-strings-for-signature-auth.yaml
- pamd-make-idempotence-fix.yaml
- v2.6.17_summary.yaml
- win_acl-network.yaml
- win_domain-setup.yaml
release_date: '2019-05-23'
2.6.18:
codename: Heartbreaker
fragments:
- fix_safe_eval.yml
- v2.6.18_summary.yaml
release_date: '2019-07-03'
2.6.19:
codename: Heartbreaker
fragments:
- dont_template_passwords_from_prompt.yml
- v2.6.19_summary.yaml
release_date: '2019-08-15'
2.6.2:
codename: Heartbreaker
fragments:
- 40839-docker_container_init.yml
- 42042-inventory_with_no_region.yaml
- 42647-win_updates.yaml
- clarify_error_message.yml
- doc_fix.yml
- docfix.yml
- docker-default-ssl.yml
- empty_gh_error.yaml
- ensure_text_source.yaml
- eos_l2_interface_fix.yaml
- fix_fact_clean.yaml
- fix_ios_vlan.yaml
- fix_pagination_cloudfront_facts.yml
- fix_sysvinit_typo.yml
- fix_tls_mail.yaml
- inventory_dir_ext_compare_fix.yaml
- ios_l2_interface-fix.yml
- junos_facts_fix.yaml
- lineinfile-empty-regexp.yml
- nxos_CI_failures_fix.yaml
- nxos_cliconf.yaml
- nxos_facts.yaml
- nxos_module_utils_nxapi_get_capabilities.yaml
- nxos_nxapi_default_http_behavior_fix.yaml
- nxos_vxlan_vtep_vni_fix.yaml
- openvswitch_db_make_key_optional.yaml
- pause-stdout-redirection.yaml
- pause-try-except-curses.yaml
- preserve_delegate_nolog.yml
- remote_tmp_de-escalated_user.yaml
- sysvinit_bugxif.yml
- user-freebsd-createhome-name-fix.yaml
- user_freebsd_always_changed_bugfix.yaml
- v2.6.2_summary.yaml
- vmware_remove_vm_sceanrio.yaml
- vultr-parameters-parsing.yaml
- vyos_command_retry.yml
- win_chocoalatey_install_tls12.yml
- win_reboot-fixes.yml
- win_security_policy-empty-value.yaml
- win_unzip_share-discard-cmdlet-output.yaml
- win_user-validate-fixes.yaml
release_date: '2018-07-27'
2.6.20:
codename: Heartbreaker
fragments:
- boto-logging-credentials.yml
- dont-template-cli-passwords.yml
- no-log-sub-options-invalid-parameter.yaml
- v2.6.20_summary.yaml
release_date: '2019-10-17'
2.6.3:
codename: Heartbreaker
fragments:
- 42786-sysvinit-fix-2-issues.yml
- 42943_vmware_vmnic_fix.yaml
- azure_nsg_deployment_lb.yaml
- convert-valid-data-to-bytes-for-conversion.yaml
- fix-selectors-error-condition.yaml
- fix-swap-mount-module.yaml
- fix-world-readable-skip-message.yaml
- get_url_bug_fix.yaml
- lxd-idempotent-config.yaml
- nicer_multi_error.yml
- nios_api_duplicate_record-fix.yaml
- openstack_inventory-optional-region.yaml
- openvswitch_db_column_value_type.yaml
- slack_callback_invocation.yaml
- v2.6.3_summary.yaml
- vars_prompt-allow-prompting-for-play-vars.yaml
- win_domain_controller-netlogon.yaml
release_date: '2018-08-16'
2.6.4:
codename: Heartbreaker
fragments:
- 16748-docker_container-memory.yaml
- 33579-docker_container-log_driver.yaml
- 42380-docker_container-check-mode.yaml
- 42641-44812-docker-env-variables.yaml
- 42857-docker_container-working_dir.yaml
- 43931-strip-trailing-comments.yml
- 44054--win_domain_computer.yaml
- 44500-win_domain_computer.yaml
- 44808-docker_container-idempotency.yaml
- aws_lightsail_documentation_fix.yml
- azure_rm_storageaccount.yaml
- fips_md5_import.yaml
- fix-os_router.yaml
- fix_ios_l2_interface.yaml
- fix_ios_l2_interface_vlan.yaml
- fix_ios_user.yaml
- fix_ios_vlan_interface_issue.yaml
- fix_no_log_loop.yml
- galaxy_list_all_roles.yaml
- more-world-readable-warning-skips.yaml
- network_config_diff_fix.yml
- nios_lookup_handle_exception.yaml
- nios_network_vendor_specfic_dhcp_fix.yaml
- no-dynamic-import-tasks.yaml
- nxos_banner_text.yaml
- nxos_file_copy_md5sum.yaml
- nxos_interface.yaml
- nxos_linkagg.yaml
- nxos_non_structured_output_fix.yaml
- nxos_static_route_fix.yaml
- nxos_system.yaml
- one_host-env-fix.yml
- service.yml
- terminal_plugin.yaml
- user-properly-unexpire-new-user.yaml
- v2.6.4_summary.yaml
- win_psexec_command_arg.yaml
- win_uri-json.yml
- win_wait_for-timeout.yaml
- zypper-on-ubuntu.yaml
release_date: '2018-09-06'
2.6.5:
codename: Heartbreaker
fragments:
- 45203-sysvinit-fix-unassigned-variable.yml
- 45628-fetch_url-error-headers.yaml
- 45700-docker_container-dont-parse-absent.yml
- ajson-nested-decode.yaml
- azure_rm_deployment_fix_45941.yaml
- dd-put-empty-files.yaml
- docker_container-idempotency.yaml
- ec2_group_fix_target_containing_list_within_list.yaml
- fix_44984.yaml
- fix_ec2_group_target_vpc_precedence.yaml
- fix_ec2_group_vpc_precedence_classic.yaml
- fix_vyos_facts.yaml
- get-url-fix-idempotency.yaml
- loop_undefined_delegate_to.yaml
- mysql-migrate_to_pymysql.yaml
- nxos_ambiguous_command_check.yaml
- nxos_facts_26.yaml
- nxos_terminal_plugin.yaml
- piped-transfer-empty-files.yaml
- plugin-filters-cfg.yaml
- script-module-no-file-path.yaml
- v2.6.5_summary.yaml
- win_copy-dest-quote.yaml
- win_group_membership-com-marshal.yaml
- win_keep_remote_file_python26.yaml
- win_say-fix.yaml
- winrm_pexpect.yaml
release_date: '2018-09-28'
2.6.6:
codename: Heartbreaker
fragments:
- 34863-rabbitmq_user_unpack_fix.yaml
- 44755-win_nssm_fixes.yaml
- 45921-os_router-ignores-enable_snat-no.yml
- 46049-route53-caa-ordering.txt
- 46245-systemd-fix-service-enable-logic.yaml
- 46322-docker_container-image-not-given.yaml
- 46594-docker_container-publish-all-ports.yml
- 46595-docker_container-expected_ports.yml
- azure-version.yaml
- blockinfile-bytes-fix.yaml
- callback_fixes.yml
- fix_flatten.yml
- free-strategy-include-var-tags.yaml
- lineinfile-insertbefore-index-out-of-range.yaml
- user-docs-underlying-tools.yaml
- v2.6.6_summary.yaml
release_date: '2018-10-19'
2.6.7:
codename: Heartbreaker
fragments:
- user-do-not-pass-ssh_key_passphrase-on-cmdline.yaml
- v2.6.7_summary.yaml
release_date: '2018-10-31'
2.6.8:
codename: Heartbreaker
fragments:
- 43997-docker_network-inspect.yaml
- 44988-acme-post-as-get.yaml
- 45508-parse-docker-service-parameter.yaml
- 46275-fix-_cond_not_supported_warn.yaml
- 46521-zabbix_host-fix-link-template-error.yml
- 46961_fix_aws_ec2_cache.yaml
- 47096-junos-terminal-regex-fix.yml
- 47296-docker_container-memory_swappiness.yaml
- 47313-vmware_utils-handle_requests_import_error.yaml
- 47395-docker_container-ipvX_address.yaml
- 47396-docker_container-detach-auto-remove.yaml
- 47712-docker_container-detach-auto-remove.yml
- 47722-vmware_guest_powerstate-restore_timeout.yaml
- 47889-vmware_doc-fix_privilege_names.yaml
- 47900-docker_container-paused.yml
- 47997-docker_container-ipc-pid-mode.yml
- 48061-docker_container-auto_removal.yml
- docker_volume-force-change-detection.yaml
- lvg_fix_47301.yaml
- nxos_26_changelog.yaml
- openssl-python3.yaml
- postgresql_user-not-sup-error.yaml
- psexec-handle-socket-errors.yaml
- psexec-imp-error.yaml
- v2.6.8_summary.yaml
- win_uri-junk-data.yaml
release_date: '2018-11-15'
2.6.9:
codename: Heartbreaker
fragments:
- 44726-correct_deprecate_call.yaml
- 48580-apt_key-no-tty.yaml
- 48808-sysvinit_defaults_if_no_runlevels.yaml
- ps_sb_logging.yaml
- user-fix-zero-negative-expiration.yaml
- user-password_lock-change-fix.yaml
- v2.6.9_summary.yaml
release_date: '2018-11-29'

File diff suppressed because it is too large Load diff

View file

@ -3,16 +3,11 @@ release_tag_re: '(v(?:[\d.ab\-]|rc)+)'
pre_release_tag_re: '(?P<pre_release>(?:[ab]|rc)+\d*)$'
notesdir: fragments
prelude_section_name: release_summary
new_plugins_after_name: removed_features
sections:
- ['major_changes', 'Major Changes']
- ['minor_changes', 'Minor Changes']
- ['deprecated_features', 'Deprecated Features']
- ['removed_features', 'Removed Features (previously deprecated)']
- ['new_lookup_plugins', 'New Lookup Plugins']
- ['new_callback_plugins', 'New Callback Plugins']
- ['new_connection_plugins', 'New Connection Plugins']
- ['new_test_plugins', 'New Test Plugins']
- ['new_filter_plugins', 'New Filter Plugins']
- ['new_modules', 'New Modules']
- ['bugfixes', 'Bugfixes']
- ['known_issues', 'Known Issues']

View file

@ -0,0 +1,5 @@
bugfixes:
- "docker_container: makes unit parsing for memory sizes more consistent, and
fixes idempotency problem when ``kernel_memory`` is set (see
https://github.com/ansible/ansible/pull/16748 and
https://github.com/ansible/ansible/issues/42692)"

View file

@ -0,0 +1,2 @@
bugfixes:
- "Allow arbitrary ``log_driver`` for docker_container (https://github.com/ansible/ansible/pull/33579)."

View file

@ -0,0 +1,2 @@
bugfixes:
- Ignore empty result of rabbitmqctl list_user_permissions.

View file

@ -0,0 +1,2 @@
bugfixes:
- "mysql_user: match backticks, single and double quotes when checking user privileges."

View file

@ -0,0 +1,2 @@
bugfixes:
- fixes docker_container compatibilty with docker-py < 2.2

View file

@ -0,0 +1,2 @@
bugfixes:
- ansible-doc - fixed traceback on missing plugins (https://github.com/ansible/ansible/pull/41167)

View file

@ -0,0 +1,2 @@
bugfixes:
- fix apt-mark on debian6 (https://github.com/ansible/ansible/pull/41530)

View file

@ -0,0 +1,2 @@
bugfixes:
- plugins/inventory/openstack.py - Do not create group with empty name if region is not set

View file

@ -0,0 +1,2 @@
bugfixes:
- "fixes docker_container check and debug mode (https://github.com/ansible/ansible/pull/42380)"

View file

@ -0,0 +1,2 @@
bugfixes:
- "The docker_* modules respect the DOCKER_* environment variables again (https://github.com/ansible/ansible/pull/42641)."

View file

@ -0,0 +1,2 @@
bugfixes:
- win_updates - fixed module return value is lost in error in some cases (https://github.com/ansible/ansible/pull/42647)

View file

@ -0,0 +1,4 @@
bugfixes:
- "sysvinit module: handle values of optional parameters (https://github.com/ansible/ansible/pull/42786).
Don't disable service when `enabled` parameter isn't set.
Fix command when `arguments` parameter isn't set."

View file

@ -0,0 +1,2 @@
bugfixes:
- "docker_container: fixing ``working_dir`` idempotency problem (https://github.com/ansible/ansible/pull/42857)"

View file

@ -0,0 +1,2 @@
bugfixes:
- VMware handle pnic in proxyswitch (https://github.com/ansible/ansible/pull/42996)

View file

@ -0,0 +1,2 @@
bugfixes:
- user - Strip trailing comments in /etc/default/passwd (https://github.com/ansible/ansible/pull/43931)

View file

@ -0,0 +1,2 @@
bugfixes:
- "docker_network - fixes idempotency issues (https://github.com/ansible/ansible/issues/33045) and name substring issue (https://github.com/ansible/ansible/issues/32926)."

View file

@ -0,0 +1,3 @@
bugfixes:
- win_domain_computer - fixed error when description parameter is empty (https://github.com/ansible/ansible/pull/44054)
- win_domain_computer - fixed error in diff_support

View file

@ -0,0 +1,2 @@
bugfixes:
- Fix unwanted ACLs when using copy module (https://github.com/ansible/ansible/issues/44412)

View file

@ -0,0 +1,2 @@
bugfixes:
- win_domain_computer - fixed deletion of computer active directory object that have dependent objects (https://github.com/ansible/ansible/pull/44500)

View file

@ -0,0 +1,2 @@
bugfixes:
- Fix calling deprecate with correct arguments (https://github.com/ansible/ansible/pull/46062).

View file

@ -0,0 +1,10 @@
bugfixes:
- win_nssm - Fix several issues and idempotency problems (https://github.com/ansible/ansible/pull/44755)
- win_nssm - Fix service not started when ``state=started`` (https://github.com/ansible/ansible/issues/35442)
- win_nssm - Correctly escape argument line when a parameter contains spaces, quotes or backslashes
- win_nssm - Add missing space between parameters with ``app_parameters``
- win_nssm - Fix extra space added in argument line with ``app_parameters`` or ``app_parameters_free_form`` when a parameter start by a dash and is followed by a period (https://github.com/ansible/ansible/issues/44079)
- win_nssm - Fix error when several services were given to the ``dependencies`` option
minor_changes:
- win_nssm - Drop support of literal YAML dictionnary for ``app_parameters`` option. Use the ``key=value;`` string form instead

View file

@ -0,0 +1,2 @@
bugfixes:
- "improves docker_container idempotency (https://github.com/ansible/ansible/pull/44808)"

View file

@ -0,0 +1,2 @@
bugfixes:
- "ACME modules support `POST-as-GET <https://community.letsencrypt.org/t/acme-v2-scheduled-deprecation-of-unauthenticated-resource-gets/74380>`__ and will be able to access Let's Encrypt ACME v2 endpoint after November 1st, 2019."

View file

@ -0,0 +1,2 @@
bugfixes:
- vmware_host_service_facts - handle exception when service package does not have package name.

View file

@ -0,0 +1,2 @@
minor_changes:
- Update docs and return section of vmware_host_service_facts module.

View file

@ -0,0 +1,2 @@
bugfixes:
- Fix referenced before assignment in sysvinit module

View file

@ -0,0 +1,2 @@
bugfixes:
- azure_rm_sqlserver - fix for tags support

View file

@ -0,0 +1,2 @@
bugfixes:
- docker_service - correctly parse string values for the `scale` parameter https://github.com/ansible/ansible/pull/45508

View file

@ -0,0 +1,2 @@
bugfixes:
- "fetch_url did not always return lower-case header names in case of HTTP errors (https://github.com/ansible/ansible/pull/45628)."

View file

@ -0,0 +1,2 @@
bugfixes:
- "Don't parse parameters and options when ``state`` is ``absent`` (https://github.com/ansible/ansible/pull/45700)."

View file

@ -0,0 +1,2 @@
bugfixes:
- "os_router - ``enable_snat: no`` was ignored."

View file

@ -0,0 +1,2 @@
bugfixes:
- "route53 - fix CAA record ordering for idempotency."

View file

@ -0,0 +1,2 @@
bugfixes:
- In systemd module, fix check if a systemd+initd service is enabled - disabled in systemd means disabled

View file

@ -0,0 +1,2 @@
bugfixes:
- Fix for StrategyModule object has no attribute _cond_not_supported_warn (https://github.com/ansible/ansible/issues/46275)

View file

@ -0,0 +1,2 @@
bugfixes:
- "docker_container - the behavior is improved in case ``image`` is not specified, but needed for (re-)creating the container."

View file

@ -0,0 +1,2 @@
bugfixes:
- "zabbix_host - module was failing when zabbix host was updated with new interface and template depending on that interface at the same time"

View file

@ -0,0 +1,2 @@
bugfixes:
- "docker_container - ``publish_ports: all`` was not used correctly when checking idempotency."

View file

@ -0,0 +1,2 @@
bugfixes:
- "docker_container - fix idempotency check for published_ports in some special cases."

View file

@ -0,0 +1,2 @@
bugfixes:
- aws_ec2 - fixed issue where cache did not contain the computed groups

View file

@ -0,0 +1,2 @@
bugfixes:
- junos - fix terminal prompt regex (https://github.com/ansible/ansible/pull/47096)

View file

@ -0,0 +1,2 @@
bugfixes:
- "docker_container - fix ``memory_swappiness`` documentation."

View file

@ -0,0 +1,4 @@
---
bugfixes:
- Fix VMware module utils for self usage.
- Added unit test for VMware module_utils.

View file

@ -0,0 +1,2 @@
bugfixes:
- Avoid misleading PyVmomi error if requests import fails in vmware module utils.

View file

@ -0,0 +1,2 @@
bugfixes:
- "docker_container - fail if ``ipv4_address`` or ``ipv6_address`` is used with a too old docker-py version."

View file

@ -0,0 +1,2 @@
bugfixes:
- "docker_container - fix behavior of ``detach: yes`` if ``auto_remove: yes`` is specified."

View file

@ -0,0 +1,2 @@
bugfixes:
- "docker_container - fixing race condition when ``detach`` and ``auto_remove`` are both ``true``."

View file

@ -0,0 +1,2 @@
bugfixes:
- Restore timeout in set_vm_power_state operation in vmware_guest_powerstate module.

View file

@ -0,0 +1,2 @@
minor_changes:
- Update plugin filter documentation.

View file

@ -0,0 +1,2 @@
bugfixes:
- "docker_container - fix ``paused`` option (which never worked)."

View file

@ -0,0 +1,2 @@
bugfixes:
- "docker_container - fix ``ipc_mode`` and ``pid_mode`` idempotency if the ``host:<container-name>`` form is used (as opposed to ``host:<container-id>``)."

View file

@ -0,0 +1,2 @@
bugfixes:
- "docker_container - do not fail when removing a container which has ``auto_remove: yes``."

View file

@ -0,0 +1,3 @@
bugfixes:
- apt_key - Disable TTY requirement in GnuPG for the module to work correctly
when SSH pipelining is enabled (https://github.com/ansible/ansible/pull/48580)

View file

@ -0,0 +1,2 @@
bugfixes:
- sysvinit - enabling a service should use "defaults" if no runlevels are specified

View file

@ -0,0 +1,2 @@
minor_changes:
- Fixed typo in ansible-galaxy info command.

View file

@ -0,0 +1,2 @@
bugfixes:
- ec2_metadata_facts - Parse IAM role name from the security credential field since the instance profile name is different

View file

@ -0,0 +1,3 @@
---
bugfixes:
- "This reverts some changes from commit 723daf3. If a line is found in the file, exactly or via regexp matching, it must not be added again. `insertafter`/`insertbefore` options are used only when a line is to be inserted, to specify where it must be added."

View file

@ -0,0 +1,3 @@
---
bugfixes:
- win_firewall_rule - Remove invalid 'bypass' action

View file

@ -0,0 +1,3 @@
---
bugfixes:
- win_updates - Correctly report changes on success

View file

@ -0,0 +1,2 @@
bugfixes:
- azure_rm_managed_disk_facts - added missing implementation of listing managed disks by resource group

View file

@ -0,0 +1,2 @@
bugfixes:
- win_psmodule - the NuGet package provider will be updated, if needed, to avoid issue under adding a repository

View file

@ -0,0 +1,2 @@
bugfixes:
- azure_rm_postgresqldatabase - fix force_update bug (https://github.com/ansible/ansible/issues/50978).

View file

@ -0,0 +1,2 @@
bugfixes:
- azure_rm_postgresqldatabase - fix force_update bug.

View file

@ -0,0 +1,2 @@
bugfixes:
- "openssl_publickey - fixed crash on Python 3 when OpenSSH private keys were used with passphrases."

View file

@ -0,0 +1,2 @@
bugfixes:
- aci modules - Ensure we use native strings for signature

View file

@ -0,0 +1,2 @@
bugfixes:
- document old option that was initally missed

View file

@ -0,0 +1,4 @@
---
bugfixes:
- Changed the admin_users config option to not include "admin" by default as
admin is frequently used for a non-privileged account (https://github.com/ansible/ansible/pull/41164)

View file

@ -0,0 +1,2 @@
bugfixes:
- Ansible JSON Decoder - Switch from decode to object_hook to support nested use of __ansible_vault and __ansible_unsafe (https://github.com/ansible/ansible/pull/45514)

View file

@ -1,2 +1,2 @@
removed_features:
- removed the deprecated always_run task option, please use `check_mode: no` instead
- "removed the deprecated always_run task option, please use ``check_mode: no`` instead"

View file

@ -0,0 +1,2 @@
bugfixes:
- '**Security Fix** - avoid loading host/group vars from cwd when not specifying a playbook or playbook base dir'

View file

@ -0,0 +1,2 @@
bugfixes:
- now no log is being respected on retry and high verbosity. CVE-2018-16876

View file

@ -0,0 +1,2 @@
bugfixes:
- inventory_aws_ec2 - fix no_log indentation so AWS temporary credentials aren't displayed in tests

View file

@ -0,0 +1,3 @@
---
bugfixes:
- fix example code for AWS lightsail documentation

View file

@ -0,0 +1,3 @@
---
bugfixes:
- fix async for the aws_s3 module by adding async support to the action plugin (https://github.com/ansible/ansible/pull/40826)

View file

@ -0,0 +1,3 @@
---
bugfixes:
- fix decrypting vault files for the aws_s3 module (https://github.com/ansible/ansible/pull/39634)

View file

@ -0,0 +1,3 @@
---
bugfixes:
- allow custom endpoints to be used in the aws_s3 module (https://github.com/ansible/ansible/pull/36832)

View file

@ -0,0 +1,5 @@
---
bugfixes:
- fix permission handling to try to download a file even if the user does not have permission to list all objects in the bucket
- fix BotoCoreError exception handling
- fix errors with S3-compatible APIs if they cannot use ACLs for buckets or objects

View file

@ -0,0 +1,2 @@
bugfixes:
- use proper module_util to get Ansible version for Azure requests

View file

@ -0,0 +1,5 @@
---
bugfixes:
- fix azure security group cannot add rules when purge_rule set to false. (https://github.com/ansible/ansible/pull/43699)
- fix azure_rm_deployment collect tags from existing Resource Group. (https://github.com/ansible/ansible/pull/26104)
- fix azure_rm_loadbalancer_facts list takes at least 2 arguments. (https://github.com/ansible/ansible/pull/29050)

View file

@ -0,0 +1,2 @@
bugfixes:
- azure_rm_deployment - fixed regression that prevents resource group from being created (https://github.com/ansible/ansible/issues/45941)

View file

@ -0,0 +1,3 @@
---
minor_changes:
- add azure_rm_storageaccount support to StorageV2 kind. (https://github.com/ansible/ansible/pull/44242)

View file

@ -0,0 +1,3 @@
---
minor_changes:
- Restore module_utils.basic.BOOLEANS variable for backwards compatibility with the module API in older ansible releases.

View file

@ -0,0 +1,2 @@
bugfixes:
- blockinfile - use bytes rather than a native string to prevent a stacktrace in Python 3 when writing to the file (https://github.com/ansible/ansible/issues/46237)

View file

@ -0,0 +1,10 @@
bugfixes:
- "**SECURITY** - CVE-2019-14846 - Several Ansible plugins could disclose aws credentials
in log files. inventory/aws_ec2.py, inventory/aws_rds.py,
lookup/aws_account_attribute.py, and lookup/aws_secret.py, lookup/aws_ssm.py use the
boto3 library from the Ansible process. The boto3 library logs credentials at log level
DEBUG. If Ansible's logging was enabled (by setting LOG_PATH to a value) Ansible would
set the global log level to DEBUG. This was inherited by boto and would then log boto
credentials to the file specified by LOG_PATH. This did not affect aws ansible modules
as those are executed in a separate process. This has been fixed by switching to log
level INFO"

View file

@ -0,0 +1,2 @@
bugfixes:
- Update callbacks to use Ansible's JSON encoder to avoid known serialization issues

View file

@ -0,0 +1,2 @@
bugfixes:
- Fix an atomic_move error that is 'true', but misleading. Now we show all 3 files involved and clarify what happened.

View file

@ -1,4 +1,4 @@
---
features:
minor_changes:
- command module - Added argv option to allow command to be specified as a list vs. a string
(https://github.com/ansible/ansible/issues/19392)

View file

@ -0,0 +1,2 @@
bugfixes:
- openssl_certificate - Convert valid_date to bytes for conversion

View file

@ -0,0 +1,7 @@
bugfixes:
- docker connection - Support empty files with copying to target (https://github.com/ansible/ansible/issues/36725)
- chroot connection - Support empty files with copying to target (https://github.com/ansible/ansible/issues/36725)
- jail connection - Support empty files with copying to target (https://github.com/ansible/ansible/issues/36725)
- kubectl connection - Support empty files with copying to target (https://github.com/ansible/ansible/issues/36725)
- libvirt_lxc connection - Support empty files with copying to target (https://github.com/ansible/ansible/issues/36725)
- zone connection - Support empty files with copying to target (https://github.com/ansible/ansible/issues/36725)

View file

@ -0,0 +1,2 @@
bugfixes:
- correct debug display for all cases https://github.com/ansible/ansible/pull/41331

Some files were not shown because too many files have changed in this diff Show more