Commit graph

41891 commits

Author SHA1 Message Date
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.
2019-01-08 13:00:20 +00:00
Trishna Guha
1400d161c0
fix eos_l2_interface invalid command (#50644)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-01-08 17:27:20 +05:30
Nijin Ashok
449fdf44b9 ovirt_storage_connection: Fix issue in detaching the connection (#50005)
Currently deleting the storage connection just tries to delete the
connection but it doesn't detach the connection from storage domain.
The patch first tries to detach the connection from storage domain
before attempting to delete the same if the storage domain parameter
is provided.
2019-01-08 06:53:20 -05:00
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>
2019-01-08 10:42:24 +05:30
Ganesh Nalawade
1e09e21ba1
Fix issue in junos and bigip action plugins (#50636)
*  tmp is not required to be passed to in run()
   within action plugin
2019-01-08 08:43:15 +05:30
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
2019-01-07 17:08:01 -05:00
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.
2019-01-07 13:56:35 -08:00
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.
2019-01-07 22:29:01 +01:00
René Moser
48ffe2f3b2
tests: vultr: convert legacy tests to targets (#50156) 2019-01-07 22:23:54 +01:00
Semyon Deviatkin
618caf2168 add env variable VAULT_AUTH_METHOD (#50572) 2019-01-07 22:13:00 +01:00
Dag Wieers
100988899a xml: Improve documentation and examples (#50602)
This PR includes:
- Type information for parameters
- Added 'seealso' section to documentation
- Improve examples
2019-01-07 14:46:51 -06:00
Nathaniel Case
19d7197d97
Copy detailed logging to persistent.py so local can benefit, too. (#50614) 2019-01-07 15:46:31 -05:00
Toshio Kuratomi
27f9c3fba0 Clarify the change made to reverse_inventory 2019-01-07 10:17:06 -08:00
feran
1d3d6a3e2d archive: Fix check if archive is created in path to be removed (#29420) 2019-01-07 09:43:30 -08:00
Toshio Kuratomi
eb4249c7da Fix for the new 2.8 feature to have modprobe check for builtins.
uname output includes a newline.  strip() the newline so that the
filepath we construct points to the right place.
2019-01-07 09:05:50 -08:00
Dag Wieers
2d890105f1
raw is transport-agnostic
+label: docsite_pr
2019-01-07 16:53:27 +01:00
Martin Krizek
6d604f9b01 Allow for vaulted templates in template lookup (#49819)
Fixes #34209
2019-01-07 10:06:01 -05:00
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
2019-01-07 14:02:29 +01:00
Martin Krizek
82c95e07b5
Fix searchpath in the template lookup (#50488) 2019-01-07 11:33:39 +01:00
Zim Kalinowski
98b0ef370d
adding module azure_rm_virtualmachinescalesetinstance_facts (#50440) 2019-01-07 15:15:30 +08:00
rajaspachipulusu17
a1e1a42341 Pluribus Networks module for connection stat settings with UT's (#50186)
* Pluribus Networks module for connection stat settings
2019-01-07 10:40:39 +05:30
Steve Boyd
9693a55286 (action/script) Fix windows absolute path detection when executing powershell script (#50365) 2019-01-07 06:44:54 +10:00
Richlv
9093ca1f3b Improve style and fix typos in the Zabbix module titles and descriptions (#50575) 2019-01-06 01:33:54 +01:00
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
2019-01-05 02:18:12 +01:00
Matt Martz
bb77bc54d5
module_utils/urls.py is core (#50567)
* module_utils/urls.py is core

* More core supported module_utils

* More missed core module_utils
2019-01-04 15:10:38 -06:00
Matt Martz
9abeecb6d4
Add new AnsibleTemplateError to more easily catch templating issues (#50563)
* Add new AnsibleTemplateError to more easily catch templating issues. Fixes #50154

* Add changelog fragment
2019-01-04 14:33:05 -06:00
Wojciech Wypior
96f7cf394f Corrects doc strings in bigip_asm_policy_* modules (#50561) 2019-01-04 14:24:42 -06:00
Wojciech Wypior
4648a441d2 adds bigip apm policy import (#50559) 2019-01-04 13:50:50 -06:00
Wojciech Wypior
7362c1d6ca Changes exists() method logic in asm policy fetch, corrects documentation (#50560) 2019-01-04 13:47:56 -06:00
Wojciech Wypior
8b1214596a adds apm policy fetch module (#50534) 2019-01-04 12:32:06 -06:00
Toshio Kuratomi
40e7c7a210
Add a porting guide entry for ansible_distribution facts (#50251)
* Add a porting guide entry for ansible_distribution facts

Switching away from platform.distro() will cause changes sometimes due
to the new code using new sources of information that may be out of sync
with the old ones.  Just have to make people aware of that and also what
we are doing to mitigate it when appropriate.

* wordsmithed, added links for new distro backend
2019-01-04 10:03:56 -08:00
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
2019-01-04 11:37:59 -05:00
Ganesh Nalawade
555732f8bb
Fix junos terminal error regex (#50538)
*  Change junos terminal error regex to read error string
   correctly.
2019-01-04 17:38:07 +05:30
Trishna Guha
97621852db
add privileged role validation for nxos become (#50312)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-01-04 16:29:36 +05:30
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
2019-01-04 16:06:13 +05:30
UNR Information Security
8f55e817d2 Correct Errors in Documentation (#50507)
* Correct Errors in Documentation

According to the module, "compose" is not required, but the docs said it was - removed the "required" tag. Additionally, the example for removing a stack did not include the required "name" option (this method is why "compose" is not required.
+label: docsite_pr

* Removed change to description

Corrected issue to my "correction" on the description.

* Removed required false

* Removed all instances of required: false.
2019-01-04 05:16:15 -05:00
Yunge Zhu
83da2de9a0
azure_rm_webapp: fix updating app settings (#49181) 2019-01-04 16:32:36 +08:00
Lunik
06f0cde97d remove forced lowercase on group_name (#50445) 2019-01-04 03:06:54 -05:00
Arne Jørgensen
15fb9d3bc0 Fix lastpass lookup error
Fixes #42062.
2019-01-03 23:56:41 -08:00
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>
2019-01-04 13:00:12 +05:30
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>
2019-01-04 10:33:37 +05:30
Richlv
73ffe683b2 Update documentation for mysql_db notes (#50444)
* Simplify the requirement section to avoid duplicating info already in mysql_document_fragment.
* Package installation section simplified, mentioned RHEL; a typo fix in "than".
* added dnf for Fedora
2019-01-04 08:40:57 +05:30
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
2019-01-03 18:12:23 -08:00
Toshio Kuratomi
ed8e60d804 Cleanups and fixes to cli
* Mark methods which are really functions as staticmethod
* Fix calls to other staticmethods to use the subclass rather than the
  base class so that any inheritance overriding will be honored.
* Remove unnecessary logic and dead code
* Fix a typo in a docstring of how to implement subclass init_parser()
  methods
* Call superclass's post_process_args in ansible-doc
* Fix copyright comment according to suggested practice
2019-01-03 18:12:23 -08:00
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.
2019-01-03 18:12:23 -08:00
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
2019-01-03 18:12:23 -08:00
Toshio Kuratomi
c18da65089 Add a CLIArgs Singleton class that will hold the parse cli arguments 2019-01-03 18:12:23 -08:00
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
2019-01-03 16:21:09 -08:00
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
2019-01-04 10:15:24 +10:00
Dag Wieers
f90ec17465
ACI: Implement encoded query_string (#50358)
This requires urldecode support in Ansible
2019-01-04 00:38:57 +01:00