Commit Graph

6706 Commits (3739dc9684403a9ef42227302678912071908b9d)

Author SHA1 Message Date
Matt Clay 7995f69a44 Improve performance of no-tests-as-filters test. 6 years ago
Felix Fontein c89d14da99 Add delay to fix spurious test breaks. 6 years ago
Matt Martz 6918b4e8f4
Add tests for WANT_JSON and old style modules (#50555)
* Add tests for WANT_JSON and old style modules

* quote source path

* Attempt to further appease tests

* Check for file and not just exists

* omg don't be dumb

* moar fixes

* shellcheck is the worst :)

* Test the custom modules for failure without arg files
6 years ago
Abhijeet Kasurde 17bb4f4932 default: callback plugin allow unreachable task to stderr (#50533)
Provide toggle flag to allow display of unreachable task to stderr
using default callback plugin.

Fixes: #48069

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Anil Kumar Muraleedharan cb89b1758d Lenovo cnos l2interface (#50641)
* Adding cnos_l2 interface module and its associated Integration test as well as Unit test code
6 years ago
Anil Kumar Muraleedharan f5ebd9736c Lenovo cnos banner new module (#50145)
* Adding cnos_banner module to the list.
6 years ago
Martin Krizek 4c72ef124b tqm._initialize_notified_handlers() is noop now (#50713) 6 years ago
jainnikhil30 cd27982959 Fixing exception import for tower modules (#50447)
* fixing the exception import from tower modules

* Adding tests for checking tower modules are failing with correct msg

* fixed failing tests

* fixed failing test in tower_team
6 years ago
Ricardo Carrillo Cruz 3e91ec28b8
Checkpoint access rule (#49937)
* WIP checkpoint_access_rule module

* Add fixes and docstrings

* Add dunder init

* Fix sanity tests issues

* Fix sanity test

* Add RETURN and EXAMPLES

* Fix example

* Fix pep8

* Add tests

* Fix pep8

* Fix pep8
6 years ago
Kairo Araujo 3ec469f904 Included support to AIX group of subsystems on service module (#33043)
* Included support to AIX group subsystems

AIX systems has subsystems as services but also uses group
subsystems.
For example, spooler is a group subsystem to services
qdaemon, writesrv, and lpd.
This change enables the possibility to use also the group
susbsystmes such as spooler, nfs, etc.

When the service name is informed, first the module will
check if the name is a subsystem, if not it will check if
the name is a group subsystem and also it subsystems states.

This change makes services more flexible with AIX systems.

* Included test/legacy/aix_services.yml for tests

As discussed on IRC ansible-devel channes, was include the
legacy tests for further manual tests.
6 years ago
Felix Fontein b52d7d56d9 docker_network IPAM test / general docker test cleanup (#50499)
* Re-enable docker_network tests.

* Basic cleanup of docker daemon.

* Add docker CLI detection.

* YAML notation.
6 years ago
Matt Martz 9a520b26e3
Make sure to clean up even if an exception occurs (#50620) 6 years ago
rwinand 2dbade4adc Introduce 'insertbefore' and 'insertafter' to specify the position (#44811)
* Introduce 'insertbefore' and 'insertafter' to specify the position children have to be inserted.

* Added version_added to new options

* Xpath in example needs single quotes

* Added integration tests for insertafter and insertbefore

* Changed version_added to 2.8
6 years ago
Felix Fontein fe4fa519d7 ufw: extend integration tests (#50400)
* Improve cleanup.

* Add check mode tests.

Failing tests commented out; will be fixed in #49948.

* Add reload and reset tests.

* Add tests for other global state.

* Work around ufw bugs.
6 years ago
Nilashish Chakraborty 7845373f96
New Module: vyos_ping (#50193)
* New module for vyos ping functionality

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Add some new parameters

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Need spaces

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fix pylint errors

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fix pylint errors

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fix docs

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fix docs

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fix docs

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
6 years ago
vpiserchia 774a667591 Add Devuan Support for ascii release - resolve 49615 (#49616)
* Add Devuan Support for ascii release - resolve 49615

* Devuan Ascii does not have the VERSION_ID in the /etc/os-release file, we need to set NA
6 years ago
Matt Clay 31c1bdd6a8 Fix run.py --branch argument.
The API docs state that both `branch` and `branchName` are valid,
but only `branchName` appears to work.
6 years ago
Gaudenz Steinlin 35f17bf4c2 Cloudscale volume (#49887)
* Cloudscale integration test setup

CloudProvider and CloudEnvironment classes for Cloudscale integration
tests. This also contains a cloudscale_common role with common
variables for all tests.

* cloudscale_volume module

New cloud module to manage volumes on the cloudscale.ch IaaS service.
6 years ago
René Moser 48ffe2f3b2
tests: vultr: convert legacy tests to targets (#50156) 6 years ago
Martin Krizek 6d604f9b01 Allow for vaulted templates in template lookup (#49819)
Fixes #34209
6 years ago
Ricardo Carrillo Cruz f9079274e7
Checkpoint httpapi plugin (#49929)
* Add checkpoint httpapi plugin and access rule facts module

* WIP checkpoint_access_rule module

* Add publish and install policy, plus fix empty json object request for publish

* Refactor publish and install_policy onto module_utils

* Add update resource logic

* Add checkpoint_host_facts module

* Return code and response on get_acess_rule function

* Add checkpoint_host module

* Add checkpoint_run_script module

* Add checkpoint_task_facts module

* Show all tasks if no task id is passed

Note, this is only available on v1.3 of Checkpoint WS API

* Add update logic to checkpoint host

* Add full details on get task call

* Add checkpoint httpapi plugin

* Fix pep8

* Use auth instead of sid property and return False on handle_httperror method

* Fix version in docstring

* Remove constructor

* Remove Accept from base headers

* Do not override http error handler and assign Checkpoint sid to connection _auth

There is scaffolding in the base class to autoappend the token, given
it is assigned to connection _send

* Use new connection queue message method instead of display

* Remove unused display

* Catch ValueError, since it's a parent of JSONDecodeError

* Make static methods that are not used outside the class regular methods

* Add missing self to previously static methods

* Fix logout

Was carrying copy pasta from ftd plugin

* Remove send_auth_request

* Use BASE_HEADERS constant

* Simplify copyright header on httpapi plugin

* Remove access rule module

* Remove unused imports

* Add unit test

* Fix pep8

* Add test

* Add test

* Fix pep8
6 years ago
Zim Kalinowski 98b0ef370d
adding module azure_rm_virtualmachinescalesetinstance_facts (#50440) 6 years ago
rajaspachipulusu17 a1e1a42341 Pluribus Networks module for connection stat settings with UT's (#50186)
* Pluribus Networks module for connection stat settings
6 years ago
Kairo Araujo fc6d85e4cf new module: Configure LVM and NFS file systems for AIX (#30810)
* new module: AIX LVM file system and NFS

This module creates, removes, mount and unmount LVM and NFS file system
for AIX using /etc/filesystems. For LVM file systems is also possible
to resize the file system.

* better parameters options structure

better parameters options structure

* Improved file system resize returns

Added better tratment for return codes for file system resize.
When a resize is not possible because no enough space on lv or
shrink is not allowed.

* improved doc and creation file system return code

- improved doc
- creation file system return code 10 was treated.

* Doc recomendations, dict result, line limit

- Added doc recomendations
- Changed return to dict results on main()
- Using 159 columns for code limit

* wrong changed return when file system is already

Fixed wrong changed return when file system is already mounted.
When the file system is already mounted the return for changed
is False.

* Fixed description and included playbook for tests

- Fixed description
- Included playbook for manual tests

* Various small bits to get this merged ASAP

* Rename test/legacy/aix_filesystem.yml to test/integration/targets/aix_filesystem/tasks/main.yml

Move integration test to its proper location

* Create aliases

* Fix CI issues
6 years ago
Wojciech Wypior 4648a441d2 adds bigip apm policy import (#50559) 6 years ago
Wojciech Wypior 8b1214596a adds apm policy fetch module (#50534) 6 years ago
Jordan Borean b967f4dcc1 dnf/yum - added install_weak_deps option (#50525)
* dnf/yum - added install_weak_deps option

* skip creating weak dep packages if rpm doesn't support it

* fix rpm check for older hosts
6 years ago
Ganesh Nalawade 71113ee291
Fix backup issue in network config modules and network action plugins common code refactor (#50301)
* Fix backup issue in network config modules

*  Fix `get_working_path` not found issue introduced due to
   backup config code refactor (PR #50208)

*  Further refactor config related action plugins to minimize
   duplicate code

*  Remove unwated imports in config action plugins

* Add common network class for action plugin and related code refactor

* Fix review comment
6 years ago
Yunge Zhu 83da2de9a0
azure_rm_webapp: fix updating app settings (#49181) 6 years ago
Sumit Jaiswal 189fcb37f9
Added new module to support NIOS Fixedaddress DHCP property (#49119)
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* nios fixedaddr new module

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

* updating name

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

* added unit tests

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
6 years ago
Abhijeet Kasurde bc6cd13874
Handle exception raised in recursive_finder API (#49590)
User module can contain Indentation errors or syntax errors.
Handle AST exceptions rather than showing traceback while importing such module.

Fixes: #21707

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Toshio Kuratomi 27c7d5bb01 Move the arguments module into cli/ and context_objects into utils
* Note: Python2 is not as intelligent at detecting false import loops as
  Python3.  context_objects.py cannot be added to cli/arguments because it
  would set up an import loop between cli/__init__.py,
  cli/arguments/context_objects.py, and context.py on Python2.

ci_complete
6 years ago
Toshio Kuratomi 7e92ff823e Split up the base_parser function
The goal of breaking apart the base_parser() function is to get rid of
a bunch of conditionals and parameters in the code and, instead, make
code look like simple composition.

When splitting, a choice had to be made as to whether this would operate
by side effect (modifying a passed in parser) or side effect-free
(returning a new parser everytime).

Making a version that's side-effect-free appears to be fighting with the
optparse API (it wants to work by creating a parser object, configuring
the object, and then parsing the arguments with it) so instead, make it
clear that our helper functions are modifying the passed in parser by
(1) not returning the parser and (2) changing the function names to be
more clear that it is operating by side-effect.

Also move all of the generic optparse code, along with the argument
context classes, into a new subdirectory.
6 years ago
Toshio Kuratomi afdbb0d9d5 Save the command line arguments into a global context
* Once cli args are parsed, they're constant.  So, save the parsed args
  into the global context for everyone else to use them from now on.
* Port cli scripts to use the CLIARGS in the context
* Refactor call to parse cli args into the run() method
* Fix unittests for changes to the internals of CLI arg parsing
* Port callback plugins to use context.CLIARGS
  * Got rid of the private self._options attribute
  * Use context.CLIARGS in the individual callback plugins instead.
  * Also output positional arguments in default and unixy plugins
  * Code has been simplified since we're now dealing with a dict rather
    than Optparse.Value
6 years ago
Toshio Kuratomi c18da65089 Add a CLIArgs Singleton class that will hold the parse cli arguments 6 years ago
Toshio Kuratomi 5844c8c7f0 Cleanups to the common.sys_info API
* Move get_all_subclasses out of sys_info as it is unrelated to system
  information.
* get_all_subclasses now returns a set() instead of a list.
* Don't port get_platform to sys_info as it is deprecated.  Code using
  the common API should just use platform.system() directly.
* Rename load_platform_subclass() to get_platform_subclass and do not
  instantiate the rturned class.
* Test the compat shims in module_utils/basic.py separately from the new
  API in module_utils/common/sys_info.py and module_utils/common/_utils.py
6 years ago
Jordan Borean 79dc9a75c3
ansible-test: docker_network set as untable (#50526)
* Revert "disable docker_network ipam tests (#50477)"

This reverts commit 4dd2b8e2d0.

* test - docker_network mark as unstable
6 years ago
Dag Wieers f90ec17465
ACI: Implement encoded query_string (#50358)
This requires urldecode support in Ansible
6 years ago
Dag Wieers f45c41ef3e urldecode filter for Jinja2 (#28503)
* urldecode filter for Jinja2

We needed this in order to deconstruct correct URLs using Jinja2.
And we might as well upstream this.

* Add integration tests

* Fixes for Python 3

* Add urlencode for older Jinja2
6 years ago
Matt Martz 3b49bbcfde Give IncludedFile more context via ansible_search_path (#50045)
* Give IncludedFile more context via ansible_search_path to template lookups. Fixes #49969

* Update units
6 years ago
Jordan Borean 6620facd19
ansible test: re-enable mysql tests with fix (#50430) 6 years ago
Jordan Borean 63e454a4b2 dnf - fix conf_file loading (#50515) 6 years ago
Sloane Hertel d21ed42f4b
Add unstable alias to s3_bucket integration tests (#50508) 6 years ago
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
6 years ago
Felix Fontein a5bf71ac6a openssl_csr: idempotency doesn't work correctly for keyUsage (#50361)
* Fix key usage idempotency bug.

* Extend tests.

* Add changelog.
6 years ago
Stephan Müller 4dd2b8e2d0 disable docker_network ipam tests (#50477) 6 years ago
Joseph Benden d810acf7a5 Add support for Kali Linux detection. (#50331)
Signed-off-by: Joseph Benden <joe@benden.us>
6 years ago
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>
6 years ago
Wojciech Wypior 3ef71e529a added new module to manipulate signatre sets on ASM policy (#50209) 6 years ago
John R Barker 338dfaea34 Disable zabbix_host 50386 (#50427) 6 years ago