Commit graph

21303 commits

Author SHA1 Message Date
Nathaniel Case
483df13626 Fixing issues with httpapi (#40388)
* I seem to have forgotten the back half of tests

* Set http timeout from persistent_command_timeout

* Tweak URL generation and provide URL on error

* Push var_options to connection process

* Don't wait forever if coming from persistent

* Don't send the entire contents of variables to ansible-connection
2018-05-21 15:58:35 +01:00
Sam Doran
1c20029694
Fix ctrl+c in pause module and add tests (#40134)
* Fix all cases with pause and ctrl+c
 - naked:
	- pause:
 - with prompt
	- pause: prompt=hi
 - time wait
	- pause: seconds=60
 - time wait with prompt
	- pause: seconds=60 prompt=hi


Fixes #35372

* Use curses to control stdout
* Use curses to clear lines on interactive input
* Validate input for echo parameter and fail nicely if invalid
* Add integration tests for pause module using pexpect
* Use try except when trying to determine erase sequence to account for lack of TTY in containers in tests
* Improve output validation for regular paus test
* Accept two digit precision for pause length in test
* Check for seconds when seconds is specificed, minutes when minutes is specified
* Add test for no TTY mode

Co-authored by: Toshio Kuratomi <a.badger@gmail.com>
Co-authored by: Brian Coca <brian.coca+git@gmail.com>
2018-05-21 10:04:43 -04:00
Antoine Catton
39f9d3e4a6 Add the ability to specify an install_dir to the gem module (#38195)
* Add the ability to specify an install_dir to the gem module

* Add GEM_HOME when installing a non-global gem

* Add tests for custom gem path

* Fix sanity tests

* Add changelog entry

* Rebase and add tests for incorrect options

Co-authored by: Antoine Catton <devel@antoine.catton.fr>
2018-05-21 09:55:43 -04:00
Sumit Jaiswal
fc8663edc0
Integration tests for Infoblox 2.5 modules (#40344)
* Update nios.py

* Update nios.py

* Update nios.py

* nios lookup errors out when there are no results #37970  Open	

Indentation failure issue resolved

* Returning empty list instead of None

In case of no results, res will be returned as an empty list instead of None (implementing ganeshrn comment)

* infoblox ipv6 support changes

* infoblox ipv6 support changes

* for fixing pep8 errors

* moving ipaddr check to utils

* adding ipv6addr check

* increasing space to resolve pep8 error

* modified the playbook examples to valid ones

* Update nios_network.py

* integration tests for nios 2.5 modules

* modification done in existing integration nios testcases

* dns_view nios module tc

* host_record nios module tc

* network nios module tc

* network_view nios module tc

* zone nios module tc

* changes to fix shippabe errors for PR 40344

* PR40344 shippable fix

* PR40344 shippable fix

* PR40344 shippable fix

* PR40344 shippable fix

* PR40344 shippable fix

* PR40344 shippable fix

* PR40344 shippable fix

* PR40344 shippable fix

* PR40344 shippable error fix

* 40344 shippable fix

* 40344 shippable fix

* 40344 shippable fix

* 40344 shippable fix

* 40344 shippable fix

* 40344 shippable fix

* PR40344 shippable error fix for block comment should start with '# '
2018-05-21 17:04:20 +05:30
Jared Hocutt
44d9dd2c77 Fix example in ipa_dnszone module (#40443)
The ipa_dnszone module had a typo in the examples where "ipa_dnsrecord"
was being used instead of "ipa_dnszone".
2018-05-20 16:28:02 +05:30
Tim Rupp
1190591e3c
Adds the bigip_gtm_global module (#40430)
This module can be used to manage the global GTM settings on a BIGIP
2018-05-18 20:48:09 -07:00
Tim Rupp
510995bd83
Adds remaining fqdn params to bigip_node (#40427)
This patch adds params for auto_populate, address type, up interval
and down interval params to bigip node
2018-05-18 19:14:07 -07:00
Chris Archibald
8b5f34e110 Add Na_ontap_broadcast_domain module. (#39753)
* add first module

* fix case

* Create na_ontap

* Fix small pep8 errors

* Fixes for issues found by Amit

* fixes for amit

* fix doc

* get doc to compile
2018-05-18 17:17:01 -07:00
Tim Rupp
5af91ef407
Adds wait parameters to bigiq applications (#40420)
The wait parameter allows the module to wait or not wait when
an application is created. By default the modules will wait.
2018-05-18 13:51:16 -07:00
Tim Rupp
1492414165
Fixes password missing in bigip_device_trust (#40414)
The documentation did not match the code. This patch fixes the code
to correctly fallback the peer password if necessary
2018-05-18 11:58:42 -07:00
Daniel Andrei Mincă
265a51ab93 format module values in gce_net module documentation (#40047)
* format code in gce_net module

The values passed to the module weren't being highlighted properly in
the documentation page.

As a result, use markup code format for the values provided in order to
be spotted easily on the page.

Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>

* separate phrases

Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>

* apply review fix for module options

According to http://docs.ansible.com/ansible/devel/dev_guide/developing_modules_documenting.html#formatting-functions

Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>
2018-05-18 16:46:49 +01:00
Simon
fb6ae90f60 Memset: initial module, integration tests, module_utils and supporting documentation. (#40071)
*  * Memset:
   * module_utils and associated documentation.
   * module to manage DNS zones.
   * integration tests to run against Memset's API.

* * memset.py:
  * remove import of requests from memset.py in favour of internal Ansible modules.
  * import necessary Ansible modules for request and response handling.
  * create a response object in order to retain a stable interface to memset_api_call from existing modules.
  * rework memset_api_call to remove requests.
* memset_zone.py:
  * improve short description to be more verbose.
  * ensure all imports directly follow documentation.
  * remove any reference to requests.
  * correct keyerror carried over from elsewhere.

* remove dependency on requests from documentation string

* disable integration tests until we have a cleanup method available
2018-05-18 10:45:38 +01:00
Deepak Agrawal
9e3ad96fa9
rename network_get network_put modules to net_get net_put (#40381) 2018-05-18 14:41:47 +05:30
Ganesh Nalawade
de2c1dc241
Fix netconf get_config lock/unlock (#40378)
Lock/unlock the datastore that is given as input for
instead of default to `running`
2018-05-18 13:10:28 +05:30
Martin Krizek
a996d4836a
rhsm_repository: use C locale for out/err scraping (#40338) 2018-05-18 07:55:37 +02:00
Tim Rupp
484b86a643
Adds the virtual argument to bigip_policy_rule (#40373)
This patch allows the module ot manage forwarding actions to virtual
servers in addition to the existing pools argument
2018-05-17 21:08:20 -07:00
Tim Rupp
f87cda8a54
small fixes and additions to bigip_virtual_address (#40362)
* Updated parameter names to match updated features in BIGIP
* Added support for route domains
2018-05-17 20:45:53 -07:00
Nathaniel Case
e9d7fa0418
HTTP(S) API connection plugin (#39224)
* HTTPAPI connection

* Punt run_commands to cliconf or httpapi

* Fake enable_mode on eapi

* Pull changes to nxos

* Move load_config to edit_config for future-preparedness

* Don't fail on lldp disabled

* Re-enable check_rc on nxos' run_commands

* Reorganize nxos httpapi plugin for compatibility

* draft docs for connection: httpapi

* restores docs for connection:local for eapi

* Add _remote_is_local to httpapi
2018-05-17 18:47:15 -04:00
Adam Miller
cc61c86049
sysvinit service module (#34962)
* sysvinit service module

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-05-17 17:32:27 -05:00
Toshio Kuratomi
3760cc3a7d Fix python-2.4ism that was still present in basic.py's use of tempfile 2018-05-17 15:24:56 -07:00
Toshio Kuratomi
0442efd33a Move rewriting of path earlier in the argument handling as other things depend on the path 2018-05-17 15:24:56 -07:00
Toshio Kuratomi
021f33e063 original basename minus src 2018-05-17 15:24:56 -07:00
Toshio Kuratomi
20b9ca6e7c Rename original_basename parameter in various file-related modules
original_basename is a private internal parameter so name it
_original_basename to reflect that it is internal.
2018-05-17 15:24:56 -07:00
Toshio Kuratomi
cd4d0069ba Reorganize ensure_directory to make things clearer
* value of file_args['path'] is now more clear
* We already have b_path so reuser that
* Add comments
2018-05-17 15:24:56 -07:00
Toshio Kuratomi
7d2ec56a99 Correct bug reporting the diff when state=touch as absent 2018-05-17 15:24:56 -07:00
Toshio Kuratomi
c8ac02d6f2 Emit a warning when src is used with a state where it should be ignored 2018-05-17 15:24:56 -07:00
Nathaniel Case
90770a290f Don't rewrite remote paths when remote is secretly local (#40259)
* Don't rewrite remote paths when remote is secretly local

* Remote overriding is configurable in connection

* Use c.DEFAULT_LOCAL_TMP instead of remote_tmp

* Remove remote_is_local from ConnectionBase

* remote_is_local->_remote_is_local

* Add warning signs to _remote_is_local and explanatory comments to its use
2018-05-17 23:21:30 +01:00
Scott Buchanan
b12cf754f6 1Password lookup plugin (#37207)
* add pytest_cache to gitignore

* onepassword lookup plugin

* fix linter/style test complaints

* second pass at making pycodestyle happy

* use json module instead of jq

* update copyrights, license & version added

* fix python2 compatibility

* doh. fix spacing issue.

* use standard ansible exception

* remove potentially problematic stdin argument

* actually call assertion method

* add support for top-level fields

* make vault uuids pedantically consistent in fixture

* fix new style issues

* ability specify section & correct case handling

* improve error handling

* add onepassword_raw plugin

* Add maintainer info

* Move common code to module_utils/onepassword.py

* Load raw data JSON data for easier use in Ansible

* Put OnePass class back inside lookup plugin

There is no good place for sharing code across lookups currently.

* Remove debugging code in unit tests

* Patche proper module in raw unit tests

* Add changelog entry

Co-authored-by: Scott Buchanan <sbuchanan@ri.pn>
2018-05-17 17:29:47 -04:00
Mário Santos
7e2087731e Add new OpenStack module for changing metadata of compute instances (#19113)
* Add new OpenStack module for changing metadata of compute instances

* Add missing RETURN documentation

* Fix API calls to match shade's implementation.

API was changed in the following PR (openstack-infra/shade):
https://review.openstack.org/#/c/319395

* Replace type by isinstance when type checking

* Add ANSIBLE_METADATA

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>

* Bump the ansible version

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>

* Add support for check_mode

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>

* Fix sanity tests

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>

* Force the meta parameter to be a string

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>

* Use short GPL license

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>

* Change meta argument to dict

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>
2018-05-17 17:24:28 -04:00
Artem Goncharov
db786b846f fixes issue 39472: (#40341)
With python 3.6 spwd.getspnam returns PermissionError instead of
KeyError if user does not have privileges
2018-05-17 17:22:40 -04:00
bengerman
82f6f08712 allow non-integer values in /etc/default/passwd to mirror solaris behavior 2018-05-17 16:57:58 -04:00
René Moser
de8b6b55f7
cs_vpc: implement state=started (#40319) 2018-05-17 22:42:53 +02:00
Alex Stephen
6ac2045db8 Adding support for GCP Compute Target Http Proxys (#38622) 2018-05-17 16:42:19 -04:00
Alex Stephen
22ccbf5cbb Adding support for GCP Compute Target Tcp Proxys (#38624) 2018-05-17 16:42:10 -04:00
Alex Stephen
afdbdd99ed Adding support for GCP Compute Target Https Proxys (#38908) 2018-05-17 16:34:20 -04:00
Adam Miller
98a198a777
Handle incorrect data type in list lookup plugin (#35483)
handle incorrect data type in list lookup plugin
Fixes #35481
test to ensure that loops properly handle incorrect datatypes

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-05-17 15:29:36 -05:00
Ben Berry
6a4f3fb729 S3 versioned lifecycle (#40161)
* - add tests for s3_lifecycle
- fix a bug comparing transitions with different storage_types

* make s3_lifecycle work with boto3

* add noncurrent version lifecycle rules
2018-05-17 15:07:40 -04:00
Martin Krizek
ca3390377a
redhat_subscription: C locale for stdout scraping (#40165) 2018-05-17 20:44:06 +02:00
Sam Doran
c9d3bb59a4 Do not join flag parameters in iptables module (#36658)
* Do not join flag parameters

This put a comma between every character of the tcp flag parameters, resulting in a bad iptables command.

Fixes #36490

* Use suboptions to ensure tcp_flags options are lists

* Add unit tests for tcp_flags

* Add example of how to use tcp_flags
2018-05-17 13:53:51 -04:00
Sam Doran
13aff08748 Add better error messages and checking to known_hosts (#38307) 2018-05-17 13:53:40 -04:00
Marcus Watkins
279cf596dc New Module: gitlab_hooks module and related tests (#40096)
* Added gitlab_hooks module and related tests

* Fix sanity check issues

* Refactor to use common util method, add check_mode support

* Fix module shebang
2018-05-17 13:52:48 -04:00
Marcus Watkins
7d87995207 New Module: gitlab_deploy_key and related tests (#40097)
* Added module gitlab_deploy_key and related tests

* Fix sanity check issues

* Refactor to use common util method, add check_mode support

* Fix module shebang
2018-05-17 13:52:40 -04:00
Sloane Hertel
571c183f59
Fix failing aws_ses_identity integration tests (#39560)
* Fix failing aws_ses_identity integration tests

Reduce boilerplate with yaml anchor

* remove unstable test alias

* Update feedback forwarding check to use desired state rather than
repeated API calls.
2018-05-17 13:45:02 -04:00
Dag Wieers
0fba72ce3c uri: Add form-urlencoded support to body_format (#37188)
* uri: Add form-urlencoded support to body_format

This PR adds form-urlencoded support so the user does not need to take
care of correctly encode input and have the same convenience as using
JSON.

This fixes #37182

* Various fixes

* Undo documentation improvements

No longer my problem

* Fix the remaining review comments
2018-05-17 13:18:18 -04:00
Sijis Aviles
0f16b26080 docs: Suggest get_url or uri for file checksum validation (#40087)
Fixes #13665
2018-05-17 11:52:33 -04:00
Ryan Brown
dda7d9e704
[AWS] Add Ansible Version to botocore user agent string (#39993)
Pull `config` out if it was provided to boto3_conn and add the useragent string
2018-05-17 11:41:14 -04:00
Brian Coca
677fe1076d
User unexpire (#39758)
* Allow negative values to expires to unexpire a user

Fixes #20096

(cherry picked from commit 34f8080a19)
(cherry picked from commit 54619f70f4)
(cherry picked from commit 8c2fae27d6)
(cherry picked from commit db1a32f8ca)

* tweaked and normalized

 - also added tests, made checking resilient
2018-05-17 11:34:13 -04:00
Pierre-Louis Bonicoli
19356c03e8 filesystem tests: update ocfs2 fs size on Trusty
Using Ubuntu 14.04, test fails because 'blkid' < 2.21 doesn't recognize
'ocfs2' filesystem smaller than 108Mo:
6baa150398

filesystem: fix MKFS_FORCE_FLAGS for ocfs2

mkfs.ocfs2 -F won't work because mkfs.ocfs2 asks for a confirmation:

    $ mkfs.ocfs2 -F img
    mkfs.ocfs2 1.6.4
    Cluster stack: classic o2cb
    Overwriting existing ocfs2 partition.
    WARNING: Cluster check disabled.
    Proceed (y/N):

The undocumented 'x' switch must be used too.
2018-05-17 11:18:18 -04:00
Luc
51af25bf60 remove bad lines
add new line and update choice documentation
adding description for ocfs2 support
use correct variable ansible_distribution to test ocfs2 with Debian
distribution
use ansible_os_family for Debian
increase ocfs2 fs size to 20M (minimal size 11 instead of 10M)
2018-05-17 11:18:18 -04:00
lchantre
4f86bec977 Update filesystem.py
add ocfs2 support for module filesystem
Update setup.yml
delete trailing spaces
add ocsfs2 defaut var
Install ocfs2-tools for all linux
Testing ocfs2 on for Ubuntu - restrict blkid to be be done
2018-05-17 11:18:18 -04:00