Commit graph

6665 commits

Author SHA1 Message Date
Jordan Borean
63e454a4b2 dnf - fix conf_file loading (#50515) 2019-01-03 15:25:58 -05:00
Sloane Hertel
d21ed42f4b
Add unstable alias to s3_bucket integration tests (#50508) 2019-01-03 14:15:45 -05:00
lolcube
e295315ef7 add openssh_cert module (#49605)
* add openssh_cert module

* fix some linter issues

* address review feedback

* add basis for integration tests

* change valid datetime formats

* handle principals as set not as list

* handle principals as set not as list

* handle principals as set not as list
2019-01-03 17:06:22 +05:30
Felix Fontein
a5bf71ac6a openssl_csr: idempotency doesn't work correctly for keyUsage (#50361)
* Fix key usage idempotency bug.

* Extend tests.

* Add changelog.
2019-01-03 17:04:24 +05:30
Stephan Müller
4dd2b8e2d0 disable docker_network ipam tests (#50477) 2019-01-03 17:03:44 +05:30
Joseph Benden
d810acf7a5 Add support for Kali Linux detection. (#50331)
Signed-off-by: Joseph Benden <joe@benden.us>
2019-01-03 09:43:24 +05:30
Adam Miller
ca084889c7 fix order of dnf api operations so transactions don't fail (#50038)
* fix order of dnf api operations so transactions don't fail

Previously dnf.base.fill_sack() was called before
dnf.base.update_cache() which apparently breaks dnf transaction
logic as per https://bugzilla.redhat.com/show_bug.cgi?id=1658694

Fixes #49060

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

* add changelog and test case

Signed-off-by: Adam Miller <admiller@redhat.com>
2019-01-02 17:50:06 -05:00
Wojciech Wypior
3ef71e529a added new module to manipulate signatre sets on ASM policy (#50209) 2019-01-02 13:12:08 -06:00
John R Barker
338dfaea34 Disable zabbix_host 50386 (#50427) 2019-01-01 14:12:34 -05:00
Felix Fontein
26e3240315 docker_secret, docker_config: allow to base64-decode data (#49688)
* Adjust docker_config and docker_secret to be more similar.

* Add data_is_b64 parameter to docker_secret and docker_config.

* Add changelog.
2019-01-01 16:06:45 +00:00
René Moser
e761ea3f9d
vultr_server: fix multiple ssh keys not handled (#50337)
* vultr_server: fix multiple ssh keys not handled

* add changelog fragment
2019-01-01 10:11:10 +01:00
Abhijeet Kasurde
eac35c68df
Temporarily disable mysql_variables (#50403)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-12-31 11:04:28 +05:30
Abhijeet Kasurde
cc001049a3
Temporarily disable mysql_user testcases (#50395)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-12-30 18:34:01 +05:30
John R Barker
ca1be227e9
Disable mysql_db (#50385) 2018-12-29 18:36:33 +00:00
Dag Wieers
eed330e8b5 Add missing aliases file (#50357) 2018-12-29 13:52:40 +00:00
Felix Fontein
a707f1a79c ufw: add integration tests (#50374)
* Add basic integration tests for ufw.

* Being more honest.
2018-12-29 13:50:04 +00:00
John R Barker
e6ced9c73f
Debug: Size of coverage file (#50380) 2018-12-29 13:01:35 +00:00
rajaspachipulusu17
3517373cfd Pluribus Networks igmp snooping module with Unit tests (#50146) 2018-12-24 13:40:02 +05:30
John R Barker
7ec82cdfc9
Revert TEMP HACK: Upload all to codecov (#50279)
Codecov.io have made some improvements to results processing.
Upload all the coverage data to see is codecov can process this.

Reverts https://github.com/ansible/ansible/pull/47515
2018-12-23 09:42:29 +00:00
Felix Fontein
e1218ca10f Elliptic curve tests for crypto modules (#50109)
* Add openssl_csr ECC test.

* Add openssl_publickey ECC test.

* Add openssl_certificate ECC test.
2018-12-23 10:23:31 +01:00
Nathaniel Case
0b3aa75b7f
Add backup parameter to cli_config (#50206)
* Add backup parameter to cli_config

* Add a unit test for cli_config backup
2018-12-21 09:55:14 -05:00
Diane Wang
ebaeb1d8b4 VMware: add VBS configuration support for Windows 10 (#48595)
* Fix space issue
* fix whitespaces issue
2018-12-21 14:47:35 +05:30
anasbadaha
d2446cbf0f Fix Issue #39598 (#49982)
* Fix Issue #39598

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix unit test for onyx_config

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Add comments for save running config

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Enhance onyx_config bug fix

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix result['changed'] = True comment

Signed-off-by: Anas Badaha <anasb@mellanox.com>
2018-12-21 11:54:10 +05:30
anasbadaha
6178a55afd Fix Issue #49612 (#50073)
* Fix Issue #49612

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix Pep8 failures

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Add validation for send empty group name

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix Error message

Signed-off-by: Anas Badaha <anasb@mellanox.com>
2018-12-21 11:53:36 +05:30
Matt Clay
01833b6fb1
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.
2018-12-20 22:08:57 -08:00
Jordan Borean
7bce6818eb
Added supershipit to botmeta sanity test (#50219) 2018-12-21 10:36:43 +10:00
Dag Wieers
14b03ac15f
MSC: Various bugfixes and features enhancements (#50200)
* MSC: Various bugfixes and features enhancements

This PR includes:
- Lookups of roles, labels and domains
- Auto-create new labels
- Improvements to comparing complex datastructures
- Force removal of sites
- Support non top-level queries
- Document internal functions
- Add parameter types to modules
- Fix documentation examples
- Improvements to idempotency wrt. returning changed
- Support site locations
- Update permission list
- Various improvements to integration tests

* Fix Ci issues
2018-12-20 18:18:46 +01:00
Julien Girardin
3e303bea4c List correctly current PV in "lvg" module: fix lvg reduce (#49731)
* Refactor integration test for lvg module to introduce grow/reduce test

* List correctly current PV in lvg module: fix lvg reduce

Previous behaviour was to only take into account PV passed in 'pvs'
argument. This lead to reduce not working as expecting:

* with state=present and list of wanted pvs, lvg found only the pvs to
  add or already present and ignored the pv to remove (obviously absent
  from the list of given PV)

* with state=absent and a pv to remove, lvg found that the remaining pvs
  list is empty (ignoring possible other PV in the vg) and decides to
  remove the vg entirely (as supposely no PV are left anymore to store
  lvm metadata)

* Add changelog fragment
2018-12-20 15:43:18 +00:00
Chris Archibald
39b1f1c363 Rewrite (#49570) 2018-12-20 12:19:32 +00:00
Sumit Jaiswal
f76d7bdbef
New Module for creating, managing Infoblox NIOS nameserver groups (#49124)
* adding new nios_nsgroup module

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* adding new nios_nsgroup module

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* adding new nios_nsgroup module

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fix shippable errors

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* added unit tests

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2018-12-20 14:36:41 +05:30
Christian Kotte
3f8d541326 VMware: Improve vmware_host_ntp module (#47273) 2018-12-20 10:37:23 +05:30
Zim Kalinowski
0127a75132
optimising vmss tests (#50175) 2018-12-20 10:48:21 +08:00
Sam Doran
8532dab3bf Fix ansible-runner test
Change test to support runner_on_start in Ansible 2.8 and ansible-runner 1.2.0
2018-12-19 15:08:36 -08:00
Matt Clay
4bd60c313b 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.
2018-12-19 11:18:24 -08:00
Anil Kumar Muraleedharan
eab3b02cb3 Refactoring of cnos_interface module like what followed by other vendors (#49927)
* Refactoring of cnos_interface module like what followed by other vendors

* To remove cnos-interface from E326 validation ignore list

* Effect of default parameters impacted UT
2018-12-19 11:38:19 -05:00
Andrea Tartaglia
65c7424a35 Added organization in the scm_credential get (#49884)
* Added organization in the scm_credential get

* Fallback looking for cred in project org

* Tests project with multi org credential

* Fixed CI issue

* Added changelog fragment
2018-12-19 12:01:12 +00:00
rajaspachipulusu17
afdd4e2343 Pluribus Networks dhcp filter module with unit tests (#49848)
* Pluribus Networks dhcp filter module with unit tests
* Added type which was missing in doc
* Removed unwanted global variable
* Fix return type
2018-12-19 17:16:25 +05:30
rajaspachipulusu17
8ca02d8359 Pluribus Networks admin service module with unit tests (#49854)
* Pluribus Networks admin service module with unit tests
* Documentation fix
* import module changes
* Removed unused imports
* Fix return type
2018-12-19 17:14:48 +05:30
Ganesh Nalawade
cc8e90395a
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
2018-12-19 14:46:44 +05:30
Matt Clay
97de7c133e Fix no metadata traceback in validate-modules. 2018-12-19 00:39:53 -08:00
Jordan Borean
65ce1b727e
win_copy - fix remote dir copy when it contains an empty dir (#50126) 2018-12-19 14:55:09 +10:00
Wojciech Wypior
59f4871615 added bigip_asm_policy_manage (#50115)
* added bigip_asm_policy_manage

* Update bigip_asm_policy_manage.py
2018-12-18 19:35:51 -08:00
Wojciech Wypior
f761cc4077 added ASM policy server technology module (#50116)
* added ASM policy server technology module

* Update bigip_asm_policy_server_technology.py
2018-12-18 18:38:19 -08:00
Toshio Kuratomi
bd072fe83a
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
2018-12-18 18:01:46 -08:00
Dag Wieers
05c6ff79f9 Convert to reduced list of known types (#50010) 2018-12-19 07:25:30 +10:00
Yannig Perré
6b41588e93 Fix with_ini example and unittest
* Fix example in ini.py
* Fix unittest in test_ini.py to pass CI as latest ansible returns list in
  different order. To prevent such issues in future results are sorted
* PEP8 E501 styling improvements

Co-Authored-By: Sergii Golovatiuk <sgolovat@redhat.com>
2018-12-18 12:25:02 -08:00
Abhijeet Kasurde
139e3477a7 Review comments
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-12-18 12:20:35 -08:00
Abhijeet Kasurde
44bd8fc0a8 Update unit tests for configmanager
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-12-18 12:20:35 -08:00
Dag Wieers
7fb1a71a2c
no-smart-quotes: Skip files by path in code-smell (#45881)
* no-smart-quotes: Skip files by path in code-smell

This is to ensure the generated docs do not trigger code-smell issues on
contributor systems.

* Implement feedback from review
2018-12-18 20:33:18 +01:00
Matt Martz
6025990fe9
Remove the use of mock from validate-modules (#50098)
* Remove the use of mock from validate-modules

* Monkeypatch AnsibleModule.__init__ not AnsibleModule
2018-12-18 11:44:17 -06:00