Commit graph

21303 commits

Author SHA1 Message Date
Matthew Stone
5b1a8ee1e8 Adding slx_command module and supporting module_utils. (#38235)
* Adding slx_command module and supporting module_utils.

This commit adds the slx_command module and tests as well as the
required slxos module_utils.

* Update copyright in header

* Adding missing module init

* Cleaning up shebangs/licensing.

* Incorporating feedback

Removing reference to `waitfor` alias in `slxos_command` module.
Adding `Extreme Networks` to `short_description` of `slxos_command` module.

* Adding cliconf tests

* Fixing 3.X tests

* Adding docstrings to test methods for slxos cliconf tests

* Adding slxos terminal tests

* Adding slxos module_utils tests

* Adding Extreme Networks team members to BOTMETA.yml
2018-04-11 12:59:34 +01:00
Maish
8f6ee2a5ca Added empty default for name parameter (#38514)
* Added empty default
Fix for issue https://github.com/ansible/ansible/issues/38482
2018-04-11 17:21:06 +10:00
Ganesh Nalawade
16c2d3717e
Add junos connection type check (#38527)
junos_netconf works only with connection=netconf
Add check to report appropriate error if any other
connection type is used.
2018-04-11 12:07:56 +05:30
Ganesh Nalawade
53d3e7e306
Add troubleshooting URL for persistent socket path related issue (#38542)
* Add troubleshooting URL for persistent socket path related issue

socket path timeout related error messages are not displayed on the
console as the ansible-connection process does not have access to it.
Until this is fixed need to point to troubleshooting URL so that
users can take corrective actions.

* Fix CI issue
2018-04-11 11:23:23 +05:30
Brian Coca
72b0ed8cb4 fix handling of some exceptions for mail plugin
redid the flow to simplify and dedupe code, also now we capture extra exceptions previouslly  causing traceback
see https://groups.google.com/forum/?#!msg/ansible-project/qhalnkYZMfI/93n8hlEpBAAJ
2018-04-10 22:17:33 -04:00
Brian Coca
886c4edfb9
avoid caching invetnory sources in loader (#38242)
* fix inventory plugin source caching

 - avoid caching invetnory sources in loader in base
 - same fix for yaml plugin
 - idem for 'auto' plugin

fixes #37162

* fix mock dataloader func sig
2018-04-10 22:15:52 -04:00
Brian Coca
399cba1c84 dict2items filter 2018-04-10 18:46:30 -04:00
Brian Coca
2e852fcd6d return empty host list when pattern is empty
fixes #37894
2018-04-10 18:43:29 -04:00
Brian Coca
fda9312379
actual error reporting on failed galaxy clone (#36788)
actual error reprting on failed galaxy clone

also allow debugging to see stdout/stderr from command
handle output for all commands on error
also use std temp dir instead of random
2018-04-10 17:26:17 -04:00
Brian Coca
32cf79c044 show changed in online 2018-04-10 17:25:24 -04:00
Brian Coca
5a333859fe allow for parameterized string functions
now also allow for ending parens

from following, 1, 2, 4 and 5 match, rest are ignored.

	{doc | to_nice_json}}
	{{(doc | to_nice_json)}}
	{{doc | to_nice_json| from_json}}
	{{doc | to_nice_json()}}
	{{doc | to_nice_json(indent=2)}}
	{{doc | to_nice_json(indent=2) | from_json()}}
	{{doc | to_nice_json(indent=2) | from_json}}

fixes #37579
2018-04-10 17:24:27 -04:00
Brian Coca
0c2e7fd841
made missing cli tools non fatal (#37194)
* made missing cli tools non fatal

* remove bare exceptions

these shoudl not be there as they can prevent 'wanted' exits
2018-04-10 17:23:29 -04:00
Brian Coca
42912e1ac8 minimize loading files/plugins
avoids some repetitive loading
 - read config file only once
 - now cache the ini parser per file
 - optimize shell plugin loading

tried to 'optimize' vars_plugins loading but it creates issues with precedence,
probalby due to iterator not being reset, will look into it in subsequent fix/PR
2018-04-10 17:22:31 -04:00
Brian Coca
34c002c771 give hint to users when a file is not found 2018-04-10 17:19:03 -04:00
Brian Coca
eef70d028f
restrore showing stderr on script success (#38177)
* restrore showing stderr on script success

accidentally removed during transition to plugin, with toggle for those
who prefer the quiet way

fixes #33776

* stderr display if no other errors capture first
* fixed issue with error encoding
2018-04-10 17:16:12 -04:00
Brian Coca
1850bb752f
ignore version when deciding callback loading (#38281)
* ignore version when deciding callback loading

The code already defaulted to load the callback if the properties are not present
there was no need for us to also check the version

fixes #38270

* fix error msg on set optoins to use correct name
2018-04-10 17:15:28 -04:00
Andrew Gaffney
95ce00ff00 Allow loading dirs from role defaults/vars (#36357)
This commit moves code to look for vars files/dirs to a common place and
uses it for loading role defaults/vars. This allows things such as
'defaults/main' or 'vars/main' being a directory in a role, allowing
splitting of defaults/vars into multiple files. This commit also fixes
the role loading unit tests for py3 when bytestrings are used for paths
instead of utf8 strings.

This fixes #14248 and #11639.
2018-04-10 17:14:38 -04:00
Simon Dodsley
cc250156c4 Update Pure Storage FlashArray hostgroup module (#38503)
Allow for deletion and additon of hosts and volumes to a
volume group.
2018-04-10 16:06:51 -05:00
Ryan S. Brown
d4e5e385ca [docs][cloud] Include volume_size in ec2 module docs 2018-04-10 16:57:04 -04:00
Simon Dodsley
f97f81ec2e Update Pure Storage FA Host module to allow for mixed protocol hosts (#37078) 2018-04-10 15:50:43 -05:00
Brian Coca
c679186f17 better handling of diff key types in compose
also made separator configurable
fixed some exception types
better error msgs
2018-04-10 15:15:52 -04:00
Philippe Makowski
0f9a66a32c urpmi module improvements (#37596)
* fix urpmi.update path #37432

* improve urpmi

* use get_bin_path rather than hard coding the path

* fix pep8 issue

* avoid using global

* - `RPM_PATH`, `URPMIUPDATE_PATH`, `URPME_PATH`) aren't constants, they should be lowercase rather than uppercase
- shorten too long lines
- remove unused import

* revert removed imports

* use lowercase rather than uppercase

* update doc

* update doc

* update doc after sanity check
2018-04-10 13:10:56 -04:00
Matt Martz
0507c907a9
get_url should accept headers as a dict, instead of only a complicated string (#35470)
* get_url should accept headers as a dict, instead of only a complicated string

* update headers description text

* Add headers string and dict tests for get_url

* Add intg test for string header format parsing error

* Adjust deprecation version ahead 1 release, add the version dict format was added in to description
2018-04-10 11:50:39 -05:00
Daniel Andrei Mincă
89d6c36584 Optimize file handling in the find module (#38192)
* Optimize file handling

Use the best practice of opening and doing operations on an opened file

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

* Fix docstring to Sphinx type

- update the docstrings to Sphinx type, as suggested by Toshio
- Move the pattern object assignment outside the context manager, as
  suggested by Matt

Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>
2018-04-10 09:01:44 -07:00
Matt Martz
450cfa8776
Handle duplicate headers in the uri module (#33792)
* Handle duplicate headers, and make it easier for users to use cookies, by providing a pre-built string

* Ensure proper cookie ordering, make key plural

* Add note about cookie sort order

* Add tests for duplicate headers and cookies_string

* Extend tests, normalize headers between py2 and py3

* Add some notes in test code

* Don't use AttributeError, use six.PY3. Use better names.
2018-04-10 09:26:51 -05:00
Matt Martz
f1082af73f
Error if a module is found to shadow a reserved keyword (#34649)
* Error if a module is found to shadow a reserved keyword

* Add test for shadowed module

* Bring in functools.wraps for the decorator

* Drop the decorator, make _find_plugin the real function, find_plugin now holds the shadow logic

* Swap order of functions for bottom to top execution order

* Only error for modules

* Add test for loading a lookup plugin that shadows a keyword
2018-04-10 09:26:27 -05:00
Martin Krizek
d97952dbf4
apt: allow for --allow-unauthenticated in upgrade (#38381)
* apt: allow for --allow-unauthenticated in upgrade

* Style fix

* Another style fix

* Add trailing comma
2018-04-10 15:37:41 +02:00
Ryan Brown
56cd8f2d48 Retry creation of tags when DHCP optionset is not found (#38528) 2018-04-10 09:08:41 -04:00
saichint
361437b042 fix nxos_igmp issues (#38496) 2018-04-10 00:05:58 -04:00
saichint
dabe5e6d07 fix nxos_hsrp issues (#38410)
* fix nxos_hsrp issues

* shippable fix

* add examples for md5 auth
2018-04-09 23:54:05 -04:00
Nate
c38617a736 fix for when status codes are provided as a comma separated list (#38080)
* fix for when status codes are provided as an array of strings

* convert status codes to int, additional tests
2018-04-10 12:25:08 +10:00
Will Thames
85d5901b31 Fix broken links in module documentation (#38469)
* Reflect updated names of the aws_batch_job modules
* Remove mention of `lambda_invoke` module which has yet to make it to
  Ansible.
* Update broken rst link in win_dsc module
2018-04-10 11:20:14 +10:00
Jordan Borean
22f2388ef1 winrm: added flag handler for kinit to request forwardable ticket when delegation is set (#37815) 2018-04-09 18:00:19 -07:00
Sloane Hertel
0fe778105b
Fix sporadic errors in ec2_vpc_subnet integration tests (#38473) 2018-04-09 17:03:36 -04:00
Jordan Borean
ccc56e138a
win_updates: handle if module failed to run (#38363) 2018-04-10 05:25:25 +10:00
THIERRY SALLE
6300e71903 Fix authot github account 2018-04-09 14:31:31 -04:00
David Resnick
283ccaa252 lastpass filter: add example 2018-04-09 14:20:21 -04:00
Matt Martz
6332beef65
Add unit tests for ansible.module_utils.urls (#38059)
* Start of tests for ansible.module_utils.urls

* Start adding file for generic functions throughout urls

* Add tests for maybe_add_ssl_handler

* Remove commented out line

* Improve coverage of maybe_add_ssl_handler, test basic_auth_header

* Start tests for open_url

* pep8 and ignore urlopen in test_url_open.py tests

* Extend auth tests, add test for validate_certs=False

* Finish tests for open_url

* Add tests for fetch_url

* Add fetch_url tests to replace-urlopen ignore

* dummy instead of _

* Add BadStatusLine test

* Reorganize/rename tests

* Add tests for RedirectHandlerFactory

* Add POST test to confirm behavior is to convert to GET

* Update tests to handle recent changes to RedirectHandlerFactory

* Special test, just to confirm that aliasing http_error_308 to http_error_307 does not cause issues with urllib2 type redirects
2018-04-09 10:17:43 -05:00
Rémy Léone
eccccfe77f Initial commit for Scaleway Compute (#38285) 2018-04-09 09:00:48 -05:00
Seuf
72120c3cac Grafana datasource module : tls_ca_cert or tls_skip_verify options (#36945)
* Allow to set tls_ca_cert or skip verify for grafana datasources

* version_added in documentation for new options tls_skip_verify

* Added default value for tls_skip_verify option in doc

* Fixed author git account

* Updated author
2018-04-09 14:41:09 +01:00
Ryan Brown
546a406a14
[docs] Add examples to ec2_instance docs (#38479) 2018-04-09 09:14:42 -04:00
Ganesh Nalawade
e10e0d42d8
Fix junos transport check (#38460)
For connection=local check only if the transport value in
provider is cli and the respective module support cli
transport. If not report back appropriate error message.
2018-04-09 16:22:09 +05:30
Martin Krizek
bb6f90ff6f
apt: properly set changed for autoremove/autoclean (#38329) 2018-04-09 11:10:42 +02:00
Martin Krizek
81a8c42115
Give hint when lookup fails on one element list (#38406)
* Give hint when lookup fails on one element list

* Mention wantlist first

* Fix pep8...
2018-04-09 11:08:04 +02:00
Yanis Guenane
99497ce54c openssl_certificate: Handle dump() in check_mode (#38386)
Currently, when ones run the module in check_mode it tries to retrieve
values from the actual certificate generated in the generate() function.

Since in check_mode we call dump() without calling generate(), self.cert
is None, leading to self.cert.get_notBefore(), self.cert.get_notAfter()
and self.cert.get_serial_number() raising an error.

>  NoneType' object has no attribute 'get_notBefore'

The solution is to have two way to handle dump() method, whether its run
in check_mode=True or check_mode=False leading to different way the
information is retrieved.
2018-04-09 09:26:02 +01:00
Abhijeet Kasurde
57738a3ab4
New module: digital_ocean_certificate_facts (#36731)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-09 12:57:11 +05:30
tobald
7f99876274 remove duplicate declaration (#38449)
result['uid'] is already defined at line 2213 in user.py module.
2018-04-08 22:24:32 +05:30
Beni Cherniavsky-Paskin
0c5f03d3f4 manageiq_provider: don't send top-level null fields on creation (#38448)
* manageiq_provider: method docstrings fixes

* manageiq_provider: refactoring step towards DRY

`resource` is now same in `edit_provider()` and `create_provider()`,
to be extracted to main later.

* manageiq_provider: Fix creation of openshift provider

Fixes #38331.
Sending `api_version` to openshift provider would cause error:
"OpenShift api_version cannot be modified"
due to https://github.com/ManageIQ/manageiq-providers-kubernetes/blob/gaprindashvili-2/app/models/manageiq/providers/kubernetes/container_manager.rb#L37

In `edit_provider` we `delete_nulls()` on the whole data being sent
so `api_version` was omitted if not specified.
In `create_provider()` we only did it on endpoints list so `api_version`
was always sent - now doing on whole data.
2018-04-08 12:36:51 -04:00
Pilou
ffee906c54 lvg: don't fail if an unknown physical device is encountered (#38446)
Physical devices are listed using 'pvs' command. Then, for
'/dev/dm-*' devices 'dmsetup' command is used to find pv_name.

An error occurs when 'pvs' command list an unknown device:

$ pvs --noheadings -o pv_name,vg_name --separator ';'
  /dev/dm-0;vg_var
  /dev/mapper/sdb3_backups;vg_data_backups
$ dmsetup info -C --noheadings -o name /dev/dm-0
Device dm-0 not found

Then the module fails:
{
  "changed": false,
  "err": "Device dm-0 not found\nCommand failed\n",
  "msg": "Failed executing dmsetup command.",
  "rc": 1
}

This failure can be avoided when the unknown device isn't used in
module parameter 'pvs'.
2018-04-08 05:04:28 -04:00
Brian Coca
42d15671d0
clarifying docs with first_found (#36951)
better examlpes as this was never really a task loop, but contained inside the lookup itself
2018-04-06 17:19:15 -04:00
Nathaniel Case
e05cad785e
Fall back to ValueError if JSONDecodeError is not available (#38276) 2018-04-06 16:28:39 -04:00
Julien Vey
bab947d854 Migrate s3_bucket module to boto3 (#37189) 2018-04-06 14:33:58 -04:00
Dag Wieers
9bb1ee30bf Required changes to support redirects on HTTP 307/308 (#36809)
* Required changes to support redirects on HTTP 307/308

This ensures HTTP 307 and 308 will redirect the request to the new
location without modification.

* Fix the unused newheaders reference

* Be more compliant

* Add integration tests for follow_redirects=all

* Improve other tests for new behaviour

* Make follow_redirects values more strict
2018-04-06 13:17:14 -05:00
Erwan Quélin
49aac5f8c7 Added module win_pester and relatives integration tests (#37343)
* Added module win_pester and relatives integration tests

* Corrected issues as stated by ansible-test

* Added defaults variable in integration tests

* Added task to install Pester if needed in the integration test

* Corrected error in win_psmodule task

* Added Pester installation with Chocolatey when Powershell version < 5

* Get facts...

* Disabled invoke-pester output

* Added pester_result type

* Added jhawkesworth changes proposal

* Corrected documentation linting

* Corrected linting

* Added dagwieers recommendations

* Added dagwieers recommendations

* Corrected linting errors and task error in integration test

* Corrected error in integration test

* Added dagwieers recommendations

* Corrected requirements in the DOCUMENTATION block
2018-04-06 11:48:45 +01:00
Ondra Machacek
fc7a68875a ovirt_templates: Add new attributes (#38211)
- operating_system
 - memory
 - memory_guaranteed
 - memory_max
2018-04-06 05:04:20 -04:00
René Moser
af3598343d doc: apt, yum: add example with package lists (#38333) 2018-04-06 10:58:51 +02:00
Artem Tiumentcev
fa8b047039 Corrected a parameter name (#38385) 2018-04-06 10:58:01 +02:00
saichint
1bf29651af fix nxos_acl issues (#38283)
* fix nxos_acl issues

* typo fix

* typo fix in sanity.yaml

* another typo fix in sanity.yaml
2018-04-06 00:57:13 -04:00
Abhijeet Kasurde
f355eb621a VMware: Documentation update vmware_guest_snapshot (#38083)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-05 21:23:18 -04:00
Julien PRIGENT
1f3b480142 ec2_snapshot_copy: Add wait_timeout module parameter (#38072) (#38243)
* ec2_snapshot_copy: add wait_timeout parameter
2018-04-06 10:40:16 +10:00
Brian Coca
2afb1090b1 allow incremental update for vars in loop for set_fact/include_vars (#38302)
* fix set_fact/include_vars looping

* tests for all behaviours affected

* add tests with injection off/on
2018-04-06 09:57:34 +10:00
Brian Coca
1b9879ccbf remove unused optoins from inventory cli
fixes #31929
2018-04-05 18:40:24 -04:00
AlanCoding
153c9bd539 Reduce recursion within group methods
This offers an optimization that allows loading larger
inventories of various structure by improving the
scaling laws involved for adding hosts and groups.

The primary speed benefit is the elimination of duplicate
recusion from traversing converging paths.
2018-04-05 18:38:44 -04:00
Jordan Borean
71e8527d7c powershell: display non-ascii characters in command outputs (#37229) 2018-04-05 14:59:51 -07:00
Jordan Borean
fd4d264253
win_setup: Added connection name to interfaces (#37327) 2018-04-06 07:36:38 +10:00
jhawkesworth
ad94d03ba1 Tolerate win line endings on windows module_util load (#37291)
* tolerate windows line endings when loading windows module utils.  Helpful for old custom windows modules.

* add test modules to demonstrate win line ending module load behaviour.

* attempt to fix sanity check failures

* pep8 fix

* explict skip of test modules from shebang check (core modules must still have expected unix style line endings)

* switch to rstrip() following core team meeting feedback
2018-04-06 07:13:31 +10:00
Eric Brown
4e38036bbd Replace the hard-coded temp path in gunicorn module (#38349)
The gunicorn module has a hard-coded reference to '/tmp' which may
or may not be the actual temp directory for an operating system.

This patch replaces '/tmp' with module.tmpdir which should
resolve to the correct temp directory for the OS.

Fixes Issue #36953

Signed-off-by: Eric Brown <browne@vmware.com>
2018-04-05 16:31:21 -04:00
Matt Martz
b794fa4fe7 Expose verbosity as a var, dedupe attr list. Fixes #36170 2018-04-05 16:06:01 -04:00
Ed Costello
0d31d1cd24 [cloud]Add aws_ses_identity_policy module for managing SES sending policies (#36623)
* Add aws_ses_identity_policy module for managing SES sending policies

* Add option to AnsibleAWSModule for applying a retry decorator to all calls.

* Add per-callsite opt in to retry behaviours in AnsibleAWSModule

* Update aws_ses_identity_policy module to opt in to retries at all callsites.

* Add test for aws_ses_identity_policy module with inline policy.

* Remove implicit retrys on boto resources since they're not working yet.
2018-04-05 15:11:12 -04:00
Renato Orgito
dca61cc397 Update docs to reflect support for CDP neighbors (#38051) 2018-04-05 19:14:55 +01:00
Brian Coca
f630d420c6 clarify os x password with user module (#38344)
also removed pointer to non existing example

fixes #36427
2018-04-05 14:13:22 -04:00
angystardust
1f54775581 Clarify the "refresh_inventory" meta task when using a dynamic inventory script (#37575)
Clarify the "refresh_inventory" meta task when using a dynamic inventory script since it was somehow documented in this old mailing list message:
https://groups.google.com/forum/#!topic/ansible-project/ImhePKKDBZM
2018-04-05 10:49:51 -07:00
Andrew Gaffney
8673e1e661 Support for module param defaults (#22648) 2018-04-05 11:44:51 -04:00
Chaitanya Deshpande
f9bd29fe4d Added module for Autoscale Launch Config (#37345)
* Added module for Autoscale Launch Config

* Fixed review comments
2018-04-05 15:51:39 +01:00
Kevin Breit
d5cfc54ef4 Validate SSL in panos_import (#36972)
* Fix bug 36936

* Added version_added to argument and fixed whitespace

* Update panos_import documentation

Update parameter documentation and add note.

* Add type documentation

* added version number for documentation

For real

* Integrated recommended changes

- Added recommended changes from PR

* Changed validate_ssl default back to True considering there is a
note at the top of documentation explaining change

* Format changes based on recommendations from gundalow

* Rename validate_ssl to validate_cert

* Change description to remove SSL reference

* Change url default ih documentation

* Integrated small changes from bug report
- Renamed validate_cert to validate_certs
- Changed documentation for disabling cert validation
2018-04-05 13:29:33 +01:00
shadbarton
613f24a346 Fix typo in apt.py (#38332) 2018-04-05 14:06:12 +02:00
James Hogarth
509f52a8ed ISSUE-37945 output not populated on failure (#37952)
* ISSUE-37945 output not populated on failure

This always includes output, but it is empty on failure.

* handle the other failcases as well
2018-04-05 05:49:10 -04:00
Ryan Brown
1c7b9e66b4 AWS WAF module custom waiter (#37026)
Consolidate waiters to a single file

* Add waiter message with token ID
* Add waiter

Add waiter for WAF change tokens

Working waiter for waf_condition module

Add support for waiters to waf_rule

* WAF data model refactor

* Fix ref to self.client

* Add custom waiters to aws_waf_web_acl

* Allow add/remove rule tasks to operate in parallel, then wait for their change tokens to complete

* Move waiter into run_func_with_change_token_backoff since it is generic to all WAF update operations

* Wait for deletes on waf_web_acl

* Remove always-wait

* Remove waiter retry catch
2018-04-05 11:30:57 +10:00
Milan Ilic
5b703a2a53 Add OpenNebula one_image_facts module (#38169)
* Add OpenNebula one_image_facts module

`one_image_facts` - module for gathering facts about OpenNebula images
Add integration tests

* Add an alias for ids
2018-04-04 22:53:31 +02:00
Martin Krizek
92bb3c2788 Fix grafana CALLBACK_VERSION 2018-04-04 11:26:22 -04:00
Colin Rymer
893b4e9116 Fix spelling of "lookup" across docs and src comments
PR #38273 by @colinrymer
2018-04-04 15:52:55 +02:00
Roman Bolshakov
3c53e2f8ea openvswitch_db: Split key-value pairs correctly (#33335)
Map values can contain commas, e.g.
    - name: Configure OVN bridge mapping
      openvswitch_db:
        state: present                                                                                                                                                                                                                                table: open_vswitch                                                                                                                                                                                                                           record: .                                                                                                                                                                                                                                     col: external_ids                                                                                                                                                                                                                             key: ovn-bridge-mappings
        value: '"vmnet-static:br-vmnet-st,vmnet-dynamic:br-vmnet-dyn"'

Previous behaviour was splitting the value and raised an exception.
2018-04-04 07:49:01 -06:00
Evgeny Fedoruk
5e990301bb Fixing lack of failure when uploaded source is invalid (#37461)
Checking the response status for 400 and throwing exception.
Unit tests updated.

Fixes #37406
2018-04-04 07:48:22 -06:00
John R Barker
a4e932ee9f ansible_ssh_pass is the ENV variable (#38035)
* ansible_ssh_pass is the ENV variable

* ansible_ssh_pass then ansible_password

* priority is top(lower)->bottom(higher)
2018-04-04 07:45:57 -06:00
Samer Deeb
72d42bd065 issue:38167 add support for onyx version 3.6.6000 for onyx_linkagg (#38191)
Signed-off-by: Samer Deeb <samerd@mellanox.com>
2018-04-04 07:43:10 -06:00
Daniel Andrei Mincă
19ca1b2b8a Fix typo in Slack Callback plugin (#38268)
`get_options` is an undefined method from CallbackBase

As a result, remove the trailing `s` letter.

Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>
2018-04-04 15:29:49 +02:00
Abhijeet Kasurde
ac9dbdeb10 nmcli: check NMClient, NetworkManager availability (#38076)
This fix adds check for NMClient, NetworkManager availability
while using require_version API.

Fixes: #38042

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-04 05:58:38 -04:00
Ganesh Nalawade
3a4fc4af08
Add error handling for junos in case wrong connection type (#38023)
* Add error handling for junos in case wrong connection type

Fixes #37990

If a junos module doesn't support given connection/transport type
return appropriate error message.

* Fix CI issues

* Fix review comment
2018-04-04 09:54:47 +05:30
Jordan Borean
f37a44430f win_service: fix when dealing with paths with special chars and change WMI to CIM cmdlets (#37897)
* win_service: fix when dealing with paths with special chars and change WMI to CIM cmdlets

* compare username in lowercase for test
2018-04-03 18:28:10 -07:00
Dag Wieers
3a1cd4d45a
Fix incorrect RN used in module (#38245)
This requires backporting to v2.5
2018-04-04 02:43:58 +02:00
Julien Vey
63a8ae94a7 cloudfront_distribution: fix restrictions (#37476) 2018-04-04 10:26:14 +10:00
Rémi REY
71699d5140 Introduce grafana callback plugin. (#34246)
* Introduce grafana callback plugin.

The grafana plugin plublishes annotations to the HTTP API available in
Grafana 4.6+

The callback publishes:
* An annotation on playbook start, tagged with "ansible",
 "ansible_event_start" and playbook name, example:

```
{
    "text": "Started playbook test.yml\n\nFrom 'pc45.home'\nBy user 'remirey'\n",
    "tags": ["ansible", "ansible_event_start", "test.yml"],
    "time": 1514291163000
}
```

* An annotation on error containing the host and task who failed and
  tagged with "ansible", "ansible_event_failure" and playbook name, example:

```
{
    "text": "Playbook test.yml Failure !\n\nFrom 'pc45.home'\nBy user 'remirey'\n\n'TASK: simulate failure' failed on localhost\n\ndebug: {\"changed\": false, \"msg\": \"Some random failure\"}\n",
    "tags": ["ansible", "ansible_event_failure", "test.yml"],
    "time": 1514291165000
}
```

* A region annotation emitted on playbook stats, tagged with "ansible",
  "ansible_report" and playbook name, example:

```
{
    "text": "Playbook test.yml\nDuration: 1.641703\nStatus: FAILED\n\nFrom 'pc45.home'\nBy user 'remirey'\n\nResult:\n{\"localhost\": {\"unreachable\": 0, \"skipped\": 0, \"ok\": 2, \"changed\": 1, \"failures\": 1}}\n",
    "tags": ["ansible", "ansible_report", "test.yml"],
    "isRegion": true,
    "timeEnd": 1514291165000,
    "time": 1514291163000
}
```

Fixes #34225
2018-04-03 18:51:52 -04:00
Peter Sprygada
91a748e33b fixes issue when netconf would report ios is not supported (#38155)
* fixes issue when netconf would report ios is not supported

This change now will map ansible_network_os=ios to the correct netconf
plugin implementation.  This will resolve an error where the netconf
connection plugin will report that ios is unsupported.
2018-04-03 17:01:59 -04:00
Sloane Hertel
873a9ddf8d [cloud] Add custom waiters to stabilize ec2_vpc_subnet module - Fixes #36083 (#37534)
* stabilize ec2_vpc_subnet module

* Add waiters for ec2_vpc_subnet

Clean up integration tests

* Reenable CI for stabilized ec2_vpc_subnet tests

* rename waiters

* Use module_json_aws where applicable

Handle WaiterError first if waiting failed

* Fix traceback when tagging with keys/values that look like booleans

* Fix check mode with tags

* Add integration tests for tags that look like booleans and check mode

* Add waiter for deleting subnet

* Sleep a few seconds after using aws command line
2018-04-03 15:25:00 -04:00
Rémy Léone
95c15757a2 Initial commit for Scaleway support (#37638) 2018-04-03 14:04:42 -05:00
Julien Vey
b000339a31 ec2_instace: fix instance_role argument (#37465) 2018-04-03 11:39:39 -04:00
Matt Martz
ddf937d642
Don't pass keyword args as positional, include file_name. Fixes #38190 (#38194) 2018-04-03 09:59:13 -05:00
brhatiga
8199b448e8 Add no_log to activationkey (#36657) 2018-04-03 07:35:21 -04:00
Megian
7a5e7c83d3 dictionary changed size during iteration error (#37454)
Iterating an object and changing it at the same time is unsecure and no longer permitted in Python >= 3.6

Provisioning an instance fail with the Python error: "RuntimeError: dictionary changed size during iteration"
2018-04-03 06:13:09 -04:00
Kassian Sun
72657ce815 Add example to clear the usage of extra_opts (#31873) 2018-04-03 05:03:11 -04:00
Charles Chan
fd711671ed copy: doc: fix typo (#38197) 2018-04-03 09:26:35 +02:00
Trishna Guha
119352b538
nxos_vlan purge (#38202)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-04-03 02:53:44 -04:00
saichint
24cc6b80bd fix nxos_aaa_server_host issues (#38188) 2018-04-03 01:53:43 -04:00
Dag Wieers
35b7b608bf
Add missing required property to docs
<!--- Your description here -->

+label: docsite_pr
2018-04-03 03:32:49 +02:00
Julien PRIGENT
70bcc5ed45 ec2_snapshot_copy: WaitError and ClientError exception handling (#38072) 2018-04-03 10:23:35 +10:00
Gennady Aleksandrov
67cd641c04 Fixes #38085 - cloudfront_invalidation doesn't work for the first invalidation ever (#38086) 2018-04-03 10:14:09 +10:00
Abhijeet Kasurde
2d90f50eeb git_config: add quotes in complex value (#38168)
This fix adds quotes to complex values of git config keys.

Fixes: #20954

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-02 19:09:39 -04:00
cpitre
5d779fada0 Doc formatting update for office_365_connector_card.py (#38142)
* Update office_365_connector_card.py

The two bullet items were about one single item; this module is not idempotent.
Therefore the two bullet items should be one.

 label: docsite_pr

* Update office_365_connector_card.py

Removed trailing white space that caused the test failure.
2018-04-02 16:23:47 -05:00
Ryan Brown
87bd169ca9 Allow subnets with names formatted like subnet-1234 (#37740)
* Allow subnets with names formatted like `subnet-1234`

* Deduplicate IDs, in case a subnet is specified both by name and ID
2018-04-02 17:13:44 -04:00
Alex Stephen
d129396274 GCP: Compute IP Addresses (#36325) 2018-04-02 16:42:49 -04:00
Artem Tiumentcev
082b03c829 fix set options in callbacks for foreman 2018-04-02 12:17:39 -04:00
Jim Gu
5839f07e0f yaml callback fails on python3
When the URI module returns complex JSON objects, the YAML callback
fails while trying to represent these objects.  The problem arises
because the filter method returns an iterator in Python 3, rather than a
str object.  Therefore, the str method expandtabs() is not available,
and the callback fails with the following error:

[WARNING]: Failure using method (v2_runner_on_failed) in callback plugin (<ansible.plugins.callback.yaml.CallbackModule object at 0x7f7c7ed8aa20>): 'filter' object has no attribute 'expandtabs'

Issue can be replicated by running this playbook:

- hosts: localhost
  gather_facts: false
  tasks:
    - uri:
        url: https://jsonplaceholder.typicode.com/posts

ansible-playbook tmp.yml -v
2018-04-02 11:41:00 -04:00
Will Thames
423b0e0f58 Improve details and events results for ecs_service_facts (#37983)
* Use AnsibleAWSModule to simplify AWS connection
* Add Exception handling, pagination, retries and backoff
* Allow events to be switched off
* Allow details to be obtained without having to specify services
2018-04-02 11:26:23 -04:00
Sascha Marcel Schmidt
50761bef0a changes description to match module (#31364) 2018-04-02 11:24:15 -04:00
Milan Ilic
a73e2a924b Add OpenNebula one_image module (#37831) 2018-04-02 16:58:39 +02:00
saichint
697c301f04 fix nxos_aaa_server issues (#38117) 2018-04-02 07:56:06 -04:00
Yasen Simeonov
b4debfad9a Add NSX-T Logical Switch support in vmware_guest (#37979)
* Add NSX-T Logical Switch support in vmware_guest

* Update vmware_guest.py

add space after % operator
2018-04-02 05:35:13 -04:00
balonik
0cdba9ff70 add instanceUuid (also called PersistentId) in vmware utils (#37127) 2018-04-02 01:49:39 -04:00
Felix Fontein
93fc99c576 Making clearer that the module has to be executed twice, and that the second run needs the data of the first (#37884). (#38135) 2018-03-31 10:07:00 -04:00
René Moser
28ce3c2329
doc: inventory: nmap: fix version added (#38157) 2018-03-31 11:45:12 +02:00
René Moser
b06dfbec54
cs_user: fix E325 (#38158) 2018-03-31 11:44:04 +02:00
Felix Fontein
8b98c29afd Remove the deprecated tls-sni-02 challenge method. (#38137) 2018-03-31 03:17:12 -04:00
Ondra Machacek
9a21f9b2db ovirt_host_networks: Fix of bond assignment (#38054)
* ovirt_host_networks: Fix of bond assignment

* ovirt_host_networks: Fix bond modes

* ovirt_host_networks: Fix incorrect prefix documentation
2018-03-30 07:56:11 -04:00
Ondra Machacek
477a602fdf ovirt_hosts: Fix failed_state after PM fence (#38102) 2018-03-30 07:55:17 -04:00
Yuwei Zhou
1c00a14c31 fix typo (#38131) 2018-03-30 03:46:53 -04:00
Dag Wieers
126a41327c
Update docs to highlight lookup plugins for templating
<!--- Your description here -->

+label: docsite_pr
2018-03-30 09:33:02 +02:00
Dag Wieers
3973eb4c30
Added an example using a templated payload file
<!--- Your description here -->

+label: docsite_pr
2018-03-30 09:27:45 +02:00
Abhijeet Kasurde
16cf51926d VMware: vmware_portgroup teaming policy support (#36778)
This fix adds support for specifying teaming policy in
vmware_portgroup module.

Fixes: #36773

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-29 23:03:45 -04:00
Martin Krizek
fd96bcd22f Use correct action in warning about missing name 2018-03-29 18:10:00 -04:00
Brian Coca
5e2f215dd7 Nmap inventory (#32857)
* nmap inv plugin draft

* more accurate regex

* fix format
2018-03-29 17:16:36 -04:00
Sam Doran
a4c82d5842 Update EdgeOS modules to be community supported (#38112) 2018-03-29 15:59:46 -05:00
gmaes
27c47f75ad #29334 handle maven local repo (#36159) 2018-03-29 16:16:46 -04:00
Sloane Hertel
ee06f57f0d
[ec2_vpc_nacl] revert suboptions for ingress and egress module parameters (#38071) 2018-03-29 16:16:01 -04:00
Dag Wieers
800dad5bdf uri: Add redirect tests for none, safe, urllib2 and all (#37068)
This is required if we want to ensure that #36809 doesn't cause any
important behavioral changes.

This PR changes the uri module to support follow_redirects=urllib2

It also adds a better error message when the connection closes before
any data was returned.
2018-03-29 14:54:42 -04:00
Renato Orgito
fea8c84a17 Fix returned landscape value when using python3 2018-03-29 11:44:05 -07:00
Pilou
7908f78fa6 module_common: handle None value for templar (#36651)
* module_common: set required parameter templar

Fix the following error (related to b455901):

  $ ./hacking/test-module -m ./lib/ansible/modules/system/ping.py -I ansible_python_interpreter=/usr/bin/python
  Traceback (most recent call last):
    File "./hacking/test-module", line 268, in <module>
      main()
    File "./hacking/test-module", line 249, in main
      (modfile, modname, module_style) = boilerplate_module(options.module_path, options.module_args, interpreters, options.check, options.filename)
    File "./hacking/test-module", line 152, in boilerplate_module
      task_vars=task_vars
    File "ansible/lib/ansible/executor/module_common.py", line 910, in modify_module
      environment=environment)
    File "ansible/lib/ansible/executor/module_common.py", line 736, in _find_module_utils
      shebang, interpreter = _get_shebang(u'/usr/bin/python', task_vars, templar)
    File "ansible/lib/ansible/executor/module_common.py", line 452, in _get_shebang
      interpreter = templar.template(task_vars[interpreter_config].strip())
  AttributeError: 'NoneType' object has no attribute 'template'

* module_common.modify_module: templar is required
2018-03-29 13:54:48 -04:00
jctanner
e10724fadb dedupe the --rsh options in favor of user supplied (#38096) 2018-03-29 09:32:27 -05:00
saichint
6f2cb28bb9 fix nxos_vlan issues (#38008) 2018-03-29 06:26:33 -04:00
Deepak Agrawal
66b389a00d
show version brief does not work on iosxr virtual (#37609)
* show version brief does not work on iosxr virtual

* ci failures fix
2018-03-29 12:33:41 +05:30
Fabian Zimmermann
0efbb702b9 fixes bug: puppet module is no longer updating persistent external facts (#38026) 2018-03-29 14:54:44 +10:00
jctanner
7ea05a2d56 synchronize: fix the mixture of quoting and passing of lists to run_command (#38020)
* switch to six.moves.shlex_quote

* remove the unncessary quotes on rsh
2018-03-28 18:45:49 -07:00
Milan Ilic
0128022654 Add OpenNebula one_vm module (#37825)
* Add OpenNebula one_vm module

* `one_vm` - module for managing VM instances instances on OpenNebula

* Add integration tests
2018-03-28 23:32:03 +02:00
Blair Rampling
e5d44934e7 changes default WAPI version to 2.1 (#37578) 2018-03-28 18:27:17 +01:00
Will Thames
98b29f8ad6 [cloud]Ensure SGs in default VPCs get default egress rule (#38018)
SGs created when a VPC ID was not specified would not necessarily
get the default egress rule, even when no explicit egress rules
were set.

Add some checks for egress rules in results from existing tests
2018-03-28 12:53:35 -04:00
Samer Deeb
9dfb665e43 issue:37307 Add support for changes in pfc output in onyx 3.6.6000 (#37651)
* issue:37307 Add support for changes in pfc output in onyx 3.6.6000

Signed-off-by: Samer Deeb <samerd@mellanox.com>
2018-03-28 17:13:54 +01:00
Blair Rampling
7324f49829 fixes example address parameters (#37765) 2018-03-28 17:11:24 +01:00
Martin Krizek
447b342662
apt: use --auto-remove with dist-upgrade (#37594) 2018-03-28 12:18:36 +02:00
Olivier Bourdon
612d0d6634 Fix interfaces_file for proper file contents (#37818)
The generated file was completely unusable by the system
therefore the fix which ensures that diffing the file
prior to changes and after only shows diffs

Furthermore the code did not work for Python 3.6
>       f.writelines(to_bytes(lines, errors='surrogate_or_strict'))
E       TypeError: a bytes-like object is required, not 'int'

The other modifications (lambda variable renaming) is to
comply with default flake8 rules
2018-03-28 10:21:43 +01:00
Benoit Perroud
710db82930 flattened: doc: Typo in lookup example (#38006) 2018-03-28 08:25:40 +02:00
Jorge Andrade
29c8d9b923 Update xml.py (#38019)
Fix a trivial typo 

 label: docsite_pr
2018-03-28 07:47:28 +02:00
balonik
371317b553 don't create vmware vm on ESX in maintenance mode (#37124)
* don't create vmware vm on ESX in maint mode

update vmware_guest not to try to create VM on ESXi host in maintenance mode

* update as requested
2018-03-27 23:12:43 -04:00
Yuwei Zhou
454096ca59 Fixes #37700 Azure image can be created with tag (#37981)
* image can be create or add

* update tags

* can remove all tags

* Update azure_rm_common.py
2018-03-27 23:10:29 -04:00
Abhijeet Kasurde
d065cce021 VMware: Use RFC 952 compliant hostname while customization (#38005)
VMware throws error if hostname provided by user is not RFC 952
compliant. Added minor documentation fixes.

Fixes: #24225, #27096

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-27 22:49:22 -04:00
Sean Lok
0ee275ca64 Add Meaningful Cloudfront Identity during creation of cloudfront distribution (#37914) 2018-03-28 10:38:16 +10:00
Adam Miller
ab9b4479a1 Quote --rsh command options for rsync in syncrhonize module (#35976)
Currently the --rsh command arg being passed to rsync is not quoted,
but we're adding arguments to the ssh command and that causes rsync
to attempt to accept them as it's own, which is not the desired
outcome.

Fixes #35717

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-03-27 20:26:00 -04:00
Matt Martz
897c8df8d0 Ensure the MAC address uses colons instead of hyphens for later comparison. Fixes #35463 (#35465) 2018-03-27 15:20:01 -04:00
Abhijeet Kasurde
8ce2ee0ebb VMware: Fix regression in get_all_host_objs (#36770)
If user does not specify esxi_hostname then module
fails to detect ESXi hostsystem from given configuration.
This fixes the regression in get_all_host_objs API by
getting first host managed object from list.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-27 14:57:17 -04:00
Abhijeet Kasurde
4edcbeb62d
VMware: Gather facts when powerstate is specified (#37908)
This fix adds additional facts after VM powerstate management.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-28 00:19:33 +05:30
Adrian Likins
6e737c8cb6
Fix 'New Vault password' on vault 'edit' (#35923)
* Fix 'New Vault password' on vault 'edit'

ffe0ddea96 introduce a
change on 'ansible-vault edit' that tried to check
for --encrypt-vault-id in that mode. But '--encrypt-vault-id'
is not intended for 'edit' since the 'edit' should always
reuse the vault secret that was used to decrypt the text.

Change cli to not check for --encrypt-vault-id on 'edit'.

VaultLib.decrypt_and_get_vault_id() was change to return
the vault secret used to decrypt (in addition to vault_id
and the plaintext).

VaultEditor.edit_file() will now use 'vault_secret_used'
as returned from decrypt_and_get_vault_id() so that
an edited file always gets reencrypted with the same
secret, regardless of any vault id configuration or
cli options.

Fixes #35834
2018-03-27 14:12:21 -04:00
Toshaan Bharvani
cbe2915ba5 continue fact gathering even without dmidecode (#34925)
* continue fact gathering even without dmidecode

If dmidecode is not available we still wan to continue with fact
gathering.
On certain platforms dmidecode just won't work
2018-03-27 13:56:49 -04:00
Renato
ed6c4b4058 Add spectrum_device module (#19739) 2018-03-27 11:58:01 -05:00
Afsal Rahim
1428db45bc updated example with correct parameters (#37679)
Updated EXAMPLES documentation which had following 2 incorrect parameters: 
'type' has been changed to 'ds_type'
'basic_auth' parameter has been removed.

 label: docsite_pr
2018-03-27 18:49:11 +02:00
Manuel Bonk
4aa1477470 fix typo (#37996)
fix typo
 label: docsite_pr
2018-03-27 18:47:48 +02:00
Will Thames
c1af147c1f warn about assign_public_ip immutability only if explicitly set (#37974)
Change assign_public_ip to default to None rather than False so
that we can detect whether the value is being explicitly set or
not, and only warn if it is explicitly set to False for something
with a public_dns_name

Fixes #37985
2018-03-27 08:20:57 -04:00
Ed Costello
d79b9f88bb Fix broken link to cloud utils from AWS guidelines. (#37166)
* Fix broken link to cloud utils from AWS guidelines.

* Replace absolute links within repo with relative links.
2018-03-27 18:55:25 +10:00
saichint
135d343254 fix nxos_udld_interface issue (#37527) 2018-03-27 02:57:14 -04:00
Renato
023f130a46 Add CDP support for the neighbors option (#37655) (#37667) 2018-03-27 12:06:17 +05:30
Jordan Borean
b1ac65d95a
win_copy: added fix for win_copy deleting local tmp folder (#37964) 2018-03-27 16:20:10 +10:00
Jordan Borean
68e44e082e
Ansible.ModuleUtils.FileUtil: catch DirectoryNotFoundException when testing a path (#37968) 2018-03-27 16:19:45 +10:00
Jordan Borean
c4e7b54630
win_reboot: fixed up warning message for dep args (#37898) 2018-03-27 13:03:07 +10:00
Toshio Kuratomi
e707e71ec5 Except in specific cases, we want to use text strings on the controller 2018-03-26 16:54:39 -07:00
Toshio Kuratomi
02f44176b9 Document the relationship between octal numbers and the leading zero
Fixes #37875
2018-03-26 16:25:06 -07:00
Toshio Kuratomi
a82fea65c1 We need to save the basename into an attribute for calling code 2018-03-26 16:15:05 -07:00
David Passante
abae7a49f7 Fixes #37824. cloudstack: do not rely on APIs list queries for names (#37910) 2018-03-26 15:53:28 -04:00
nathanwebsterdotme
ce6595b567 aws_ssm_parameter_store - Make the module idempotent (#36252)
* Make the module idempotent

* pep8 fixes.

* Made required changes for overwrite_value for idempotency.

* Fix missing error definition

* Add in missing documentation variable.
2018-03-26 15:46:37 -04:00
Matt Martz
6051ef4041
Revert accidental addition of Mapping in #37741 (#37939) 2018-03-26 13:57:56 -05:00
Matt Martz
ffbbb5a25b
Use arg_spec type for comparisons on default and choices (#37741)
* Use arg_spec type for comparisons on default and choices

* Further improve type casting

* Make sure to capture output in more places

* Individually report invalid choices

* Update ignore.txt after resolving merge conflicts
2018-03-26 12:15:32 -05:00
Toshio Kuratomi
9890ce47e8 Optimizations in mod_args parsing
* Make it less likely that we have to identify all the modules during
  a playbook run.  PluginLoader is optimized to look for modules one
  directory at a time.  If we find a module before we've examined all
  the directories we never have to touch the other directories.
  Reordering this conditional makes it so tasks which don't have
  a module file will not force us to examine all the module directories
  before moving on to other sources of task actions.
* Change several variables we consult to see if a task is in a certain
  category from lists/tuples to frozensets.  These are static lists
  which we only do containment tests on so frozensets should be faster
2018-03-26 10:08:38 -07:00
Matt Martz
1f824bd620 Don't overwrite builtin jinja2 filters with tests (#37881)
* Don't overwrite builtin jinja2 filters with tests. Fixes #37856

* Fix tests and other callers of _get_filters
2018-03-26 12:06:00 -05:00
Nathaniel Case
169209c32a
Put back $PATH checking in ansible-connection call (#37933) 2018-03-26 12:49:30 -04:00
saichint
0df5cfd41f fix nxos_static_route issues (#37614)
* fix nxos_static_route issues

* remove nxos_static_route from ignore
2018-03-26 11:13:32 -04:00
Matt Martz
0dcd8b598c
Don't assume that self._task.action is copy, explicitly set. Addresses #37238 (#37777) 2018-03-26 10:04:06 -05:00
Ganesh Nalawade
8eaa9cc938
Fix junos modules check_mode issue (#37311)
Fixes #37208

If check_mode is enabled instead of committing th config need to
discard all the chnages to cnadidate db
In case of cli to discard changes issue `rollback 0` command
and for netconf execute `discard-changes` rpc call
2018-03-26 07:27:30 -04:00
Adam Miller
7cd3d9cc1a Correct msg to detect idempotent yum groupinstall (#37858)
The message text used to check stderr for a warning about
groupinstall in order to determine if a change occurred is specific
to the version of yum that is in RHEL7 and newer. This change simply
removes a couple words off the end in order to only use text found
in the warning message in older versions of yum.

Fixes #35982

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-03-26 10:46:24 +02:00
Abhijeet Kasurde
f0fd0f219d Hide apikey from log in uptimerobot (#37342)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-26 03:02:00 -04:00
Heusini
702b5a3e81 Added poweroff_guest vm and reboot_guest vm in vsphere_guest (#34348) 2018-03-26 02:35:58 -04:00
Abhijeet Kasurde
adbda67151 New module: digital_ocean_domain_facts (#37269)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-26 01:48:13 -04:00
Will Thames
681c69f8c1 Fix the aws_kms_facts module name in module docs (#37902)
Forgot to update the examples when the module name changed to
have the `aws_` prefix
2018-03-26 12:18:36 +10:00
Sloane Hertel
ba0ff415a0 [cloud] ec2_vpc_nacl: add documentation about ingress and egress rules (#37747)
Fixes #25152

Use suboptions
2018-03-26 11:44:44 +10:00
Nate
2c44061a04 append request headers instead of replacing (#37845) 2018-03-26 05:35:41 +10:00
Jordan Borean
b7ce2b1c5a
win_certificate_store: fix typo stopping key_storage from working (#37810) 2018-03-24 09:17:18 +10:00
Eric Brown
e95e9de235 Typos in the yaml inventory plugin
This patch fixes up some English typos in the yaml inventory
plugin documentation.

* s/specifically/specific
* s/as/as an

Signed-off-by: Eric Brown <browne@vmware.com>
2018-03-23 18:01:40 -04:00
Strahinja Kustudic
68ff986708 Fix 'repomd.xml signature could not be verified' (#35989)
If a repo with `repo_gpgcheck=1` is added and the repo GPG key was never
accepted, quering this repo would throw an error `repomd.xml signature
could not be verified` and the module would fail. If that happens now
`yum -y makecache` will be run which will fetch the new repo data and
accept the repo GPG key.
2018-03-23 16:13:49 -05:00
Alex Tsitsimpis
c3ab6cb9b1 template: Add option to lstrip_blocks' and fix settingtrim_blocks` inline (#37478)
* template: Add integration tests for `lstrip_blocks'

Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>

* template: Fix passing `trim_blocks' inline

Fix passing `trim_blocks' option to the template module as inline
argument. Previously passing the `trim_blocks' option inline instead of
using the YAML dictionary format resulted in it always being set to
`True', even if `trim_blocks=False' was used.

Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>

* template: Add option to `lstrip_blocks'

Add option to set `lstrip_blocks' when using the template module to
render Jinja templates. The Jinja documentation suggests that
`trim_blocks' and `lstrip_blocks' is a great combination and the
template module already provides an option for `trim_blocks'.

Note that although `trim_blocks' in Ansible is enabled by default since
version 2.4, in order to avoid breaking things keep `lstrip_blocks'
disabled by default. Maybe in a future version it could be enabled by
default.

This seems to address issue #10725 in a more appropriate way than the
suggested.

Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>

* template: Add integration tests for `trim_blocks'

Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>

* template: Check Jinja2 support for `lstrip_blocks'

Since the `lstrip_blocks' option was added in Jinja2 version 2.7, raise
an exception when `lstrip_blocks' is set but Jinja2 does not support it.
Check support for `lstrip_blocks' option by checking `jinja2.defaults'
for `LSTRIP_BLOCKS' and do not use `jinja2.__version__' because the
latter is set to `unknown' in some cases, perhaps due to bug in
`pkg_resources' in Python 2.6.6.

Also update option description to state that Jinja2 version >=2.7 is
required.

Signed-off-by: Alex Tsitsimpis <alextsi@arrikto.com>
2018-03-23 12:05:21 -04:00
Martin Krizek
687f3bbef3
apt: fix mark when no packages (#37835) 2018-03-23 15:06:03 +01:00
David Passante
270e799cb6 cs_vpc_offering: listVPCOffering API returns any matching names (#37783)
* fix listVPCOffering API method returns any matching names

* fix build_ci no-underscore-variable

* clearer variable name

* making it simpler
2018-03-23 09:13:41 -04:00
Martin Krizek
00d9345158
apt: mark installed packages manual (#37751)
* apt: mark installed packages manual

* Add fallback for when manual is not a thing
2018-03-23 12:23:12 +01:00
Jordan Borean
ca225d6da0
Changed Azure SecurityRule to use kwargs instead of positional args (#37695) 2018-03-23 20:37:22 +10:00
Fredrik Holmberg
e06f3463fd Typo in ipaddr filter (#37592)
interger = integer
2018-03-23 11:06:53 +01:00
Colin Nolan
a4a2b4a381 consul_kv: decodes kv values from Consul to utf-8 (#35894)
* Decodes kv values from Consul to utf-8.

* Switches to using module utils to perform text decoding.

* Adds self to authors list to help community maintenance.
2018-03-22 14:56:38 -07:00
Tim Werner
a51a699314 make jira authentication Python3 compatible (#33862)
* make jira authentication Python3 compatible
2018-03-22 14:38:01 -07:00
Brian Coca
3bec76fc85 Avoid 2nd processing of facts for actions
include_vars and set_fact are already updating hostvars in strategy
no need to 're add again' with lower priority the same data.

fixes #37535, mostly by avoiding reprocessing and 'cleaning'
2018-03-22 17:27:38 -04:00
Toshio Kuratomi
0633f73faf Fix loader for filters (#37748)
* Fix loading of filter and test plugins

Filter and test plugins are different than other plugins in that they
can have many plugins in a single file.  Therefore they need to operate
a little differently.  They need to have all of the potential files
returned.  Then the caller takes care of passing those onto jinja2 in
order for jinja2 to make use of them.

This problem was (most recently) introduced with f921369445

This commit also restructures how we deduplicate plugins to take paths
into account.  If we want to start scoping which set of modules are
loaded (due to roles, for instance) we'll need to hang on to the path
information.

* add integration test for override

* Fix style checks for bcoca code

* Implement jinja2 plugin loader as a subclass

Having a subclass allows us to customize the overriding of jinja
plugins.  We can then move common parts of common code into the Loader.
2018-03-22 17:23:10 -04:00
chenl87
e501134755 [aws] Register scalable target prior to creating/deleting a scaling policy (#35632)
* Added missing scalable target creation

* Changed if statement

* Added support to results of all actions

* Fixed line lengths, whitespaces and blank lines between functions

* Fixed documentation formatting

* Work in progress, fixed returns from functions, still need to do exception handling

* Work in progress, still need to do exception handling

* Moved to AnsibleAWSModule, Added exception handling

* Added detailed return doc

* Fixed return doc alarms

* fixed return yaml

* Fixed function calls when creating/deleting

* fixed unnecessary blank line

* removed imports and unnecessary checks handled by AnsibleAWSModule

* removed whitespace
2018-03-22 16:45:55 -04:00
Ravi
340064bfb9 Fix python3 interpreter issue (#34811) (#35176)
* Fix python3 interpreter issue (#34811)

* Update ansible.module_utils._text (#34811)

* Convert to text later to account for multibyte characters
2018-03-22 12:59:46 -07:00
Sloane Hertel
da3f7a8db1 [cloud] ec2_vpc_route_table: ignore routes without DestinationCidrBlock - fixes #37003 (#37010)
* [cloud] ec2_vpc_route_table: ignore routes without DestinationCidrBlock

Add module warnings rather than silently skipping

* Permit warnings for routes tables containing vpc endpoints to be turned off

* Add tests to ensure a VPC endpoint associated with a route table does not result in a traceback
2018-03-22 15:15:36 -04:00
Sloane Hertel
3a5a0fed06 [cloud] ec2_ami_copy: undeprecate wait_timeout to allow modifiable timeouts again to allow a longer timeout than 600 seconds (#37680)
Fixes #37111
2018-03-22 13:34:47 -04:00
Tony Goetheyn
868811adbc Documentation update (#37782)
- Mention Perl requirement for customisations to work in Linux based OS.
- Fix typo
2018-03-22 13:30:03 -04:00
Lachlan Cooper
fcbee7e40b Check that output from list_vhosts can be split (#37630)
As with list_users, list_vhosts can sometimes return a value that
doesn't contain a '\t' character. This appears to be the case if the
server has no vhosts, for example.

The same fix was applied to the rabbitmq_users module here:
fafb89cde5
2018-03-22 13:03:20 -04:00
Alessandro Asoni
6ad784bbbb Fixed issue with accessing response in digital_ocean module (#37268) 2018-03-22 10:35:56 -04:00
Will Thames
9802088082 New generator inventory plugin (#37690)
* New generator inventory plugin

Allows construction of hosts and groups through cartesian
product of various group combinations

* Add generator plugin documentation
2018-03-22 09:32:15 -04:00
Dag Wieers
2c2f335893
win_psexec: Fix pslint issues (#37718) 2018-03-22 03:21:07 +01:00
Dag Wieers
de5fb66026
win_product_facts: Fix pslint issues (#37722) 2018-03-22 03:18:48 +01:00
Zim Kalinowski
fef5f01b11 adding possibility to specify resource group for referred virtual net… (#36768)
* adding possibility to specify resource group for referred virtual network

* fixed sanity issues

* removed trailing whitespace

* added test

* fixed documentation

* try to fix unstable test

* Tidied up the description of virtual_network_resource_group
2018-03-22 12:10:29 +10:00
Zim Kalinowski
9fb04d20e1 azure_rm_networkinterface: don't query subnet as it's not necessary (#36826)
* don't query subnet as it's not necessary

* fixed pep8?

* another attempt to fix pep8 indentation
2018-03-21 21:59:46 -04:00
Dag Wieers
bc4f8a6786
win_tempfile: Fix pslint issues (#37720) 2018-03-22 01:10:16 +01:00
Jordan Borean
04539ca448
Updated text for azure_rm_virtualmachine around images that can be used (#37686) 2018-03-22 09:34:09 +10:00
Zim Kalinowski
0b828ee830 azure_rm_virtualmachine: adding possibility of disabling public ip address (#36766)
* adding possibility of disabling public ip address

* fixed indent

* fixed whitespace

* fixed mistake

* try to create test with vm without public ip address

* try to fix test

* another attempt for test

* fixing test

* create vm with no ip with different name and delete it immediately

* a few additional fixes

* another attempt to pass test

* must be deleted

* simplified no ip test

* reorganised tests

* Wrapped choice in C()
2018-03-22 09:30:42 +10:00
Zim Kalinowski
89401f13f7 azure_rm_networkinterface: fixed issue when public ip address should not be created (#36824)
* fixed issue when public ip address should not be created

* adding test for public ip address

* fixed samples

* another fix to sample formatting

* fixed test

* fix test

* fixed test

* another attempt to fix test

* maybe it works now

* still wrong

* improved check per customer request

* removed stupid semicolon

* updated test to match main scenario

* changed ip configurations to list

* another attempt
2018-03-22 09:16:32 +10:00
Dag Wieers
fdc0e5c5fb
win_defrag: Fix pslint issues (#37719) 2018-03-22 00:06:42 +01:00
Dag Wieers
f78b415db0
win_wakeonlan: Fix pslint issues (#37717) 2018-03-21 23:45:17 +01:00
Yuwei Zhou
8c819dd9cb Support MSI for ansible on Azure resources (#36634)
* msi

* add env and param

* add msi in default

* add azure_rm

* add document

* subscription param

* if not enabled msi

* remove the msi in default mode since the infinite loop will block if not enabled msi

* lint

* lint

* Update azure_rm_common.py

* fix

* catch exc and make error message more friendly

* lint

* Minor docs changes to the msi source option
2018-03-22 06:01:44 +10:00
Matt Clay
aee01564a9 Clean up non-standard module shebangs. 2018-03-21 11:04:55 -07:00
Abhijeet Kasurde
0ae7a0e88c
VMware: Use environment variable for connection (#37726)
This fix adds environment variables for connection in vmware_*
modules.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-21 13:31:24 -04:00
Dmitry Ulyanov
1d6bc094cf Add http(s)_proxy support in yum module (#36800)
* added set_env_proxy function for setting proxy environment

Added set_env_proxy function, that set system http(s)_proxy
environment for fetching RPM if proxy settings set in yum.conf file
that fix Issue - #18979

* fix automatic field numbering specification

* changed if statement in setting http_proxy environment

* Change set_env_proxy function to function with decorator

That decorator set system proxy environment from yum.conf and revert
back to system configuration after fetching RPM

* Minor fix

- rename variable schem  to scheme
- change 'in' to 'startswith'

* change decorator set_env_proxy to decorating through contextmanager

- added import contextmanager from contextlib
- set_env_proxy now decorating through contextmanager
- fix http/https setting environment principle
2018-03-21 11:55:36 -05:00
Nathaniel Case
6aed74a97d Fix edgeos_config: {backup: yes} (#37619)
* Fix edgeos_config: {backup: yes}

* Add actual plugin copy
2018-03-21 12:48:09 -04:00
Alexander Bethke
eebe728ae8 Fix SteamOS ansible_distribution fact (Fixes #33628) (#37576)
Fixes #33628
2018-03-21 11:50:54 -04:00
Andreas Mosti
ca634486f1 added parameter for allowing prerelease packages in win_chocolatey for #33243 (#37205)
make sure we don't pass it to state absent

removed trailing whitespace

forcing CI
2018-03-21 15:46:40 +01:00
Abhijeet Kasurde
aadbb6c0b4 VMware: Handle exception gracefully (#36619)
This fix adds logic to handle exception raised from conversion of
user parameter 'memory_mb'.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-21 10:29:46 -04:00
Murali krishnaswamy
7a4c3e5cad ovrit_cluster: fix for CPU arch entity #37425 (#37436)
* ovrit_cluster: fix for CPU arch entity #37425

* Corrected Indentation

* Condition to check if `architecture` is defined
2018-03-21 09:57:00 -04:00
Julien Vey
ec2e027980 cloudfront_distribution: fix the order of headers to avoid updates again and again (#37340)
* Fix python2/3 compatibilities issues

* Sort cloudfront_distribution headers to avoid useless updates
2018-03-21 22:16:42 +10:00
Alexander Braverman Masis
062a5551e0 ManageIQ module - provider refresh (#37573) 2018-03-21 05:34:24 -04:00
Chaitanya Deshpande
5bdc32ff8d Updated modules for Avi version 17.2.8 (#37344) 2018-03-21 02:47:09 -04:00
Charles V Bock
0214a85382 Correct module name in vcenter_license.py (#37672)
Module name should be vcenter_license not vmware_license.
2018-03-21 00:30:46 +01:00
Julien Vey
850ab534d7 iam_role_facts: Add information about instance profiles associated with the iam roles (#37641) 2018-03-21 09:29:18 +10:00
Ludek Finstrle
81cfbbbeb9 constructed inventory does not use group variables from previous inventory #37397
* Add support for loading invenotry group variables in constructed plugin
2018-03-20 18:26:27 -04:00
alu
b7aa41b9b9 Fix crash in py3: 'TypeError: a bytes-like object is required, not 'str' (#37504)
* Fix crash in py3: 'TypeError: a bytes-like object is required, not 'str'

Fixes #37387

* Review applied https://github.com/ansible/ansible/pull/37504#pullrequestreview-104799823
2018-03-20 14:33:14 -07:00
Toshio Kuratomi
09325b619e
Fix csvfile traceback on Python3 (#37625)
* Fix csvfile traceback on Python3

The csvfile lookup uses some custom iterators.  These needed to be
ported to handle the python3 iterator protocol.  In addition, the
csvfile module takes an iterator of byte strings in Python2 and an
iterator of text strings in Python3

Fixes #36808
2018-03-20 12:58:51 -07:00
Izuke
e02c72d856 Fixes #32146 Fixes reconcile inventory to correctly remove hosts from ungrouped 2018-03-20 15:37:39 -04:00
Toshio Kuratomi
b98ad3a12b Compare byte strings to byte strings
* Fix a traceback in ansible-pull on python3 comparing output from
  subprocess with a text string.
* Rename variables that hold byte strings so we are clear that those are
  not text strings.
* Use to_text() to transform variable that's being displayed as it's
  less fragile than str().

Fixes #36962
2018-03-20 12:04:05 -07:00
Toshio Kuratomi
0d55081ba8 Fix use of user_data field with spot_price in ec2 module (#37628)
The user_data field is base64 encoded inside of the boto library.  In
Python3, base64 must be used with byte strings.  So we make sure to
encode the user_data into a byte string before passing it on to the boto
library.

Fixes #34978
2018-03-20 15:01:24 -04:00
Matt Clay
775539a8b8 Fix api_profile choices in Azure docs fragment. 2018-03-20 11:07:34 -07:00
Phil Nelson
54e70fc783 Fix name parameter templating in include_role module (#36372)
An IncludedFile() object built using the original_task will have
its _task bound to the original_task. The iterative reassignment of
original_task._role_name during with_item loops leaves all returned
included_files with the same ._task._role_name (the final name from
the with_items list). This commit builds IncludedFile() objects
from an original_task.copy() to avoid the problematic binding.
2018-03-20 14:01:48 -04:00
Matt Martz
6c3e565ba3
Fix py3 issue in wait_for_connection (#37646) 2018-03-20 11:21:19 -05:00
Matt Martz
b95b077993 Restore skipped/failed in JSON callback, add custom facts (#37204)
* Restore skipped/failed keys. Fixes #37050

* Display custom stats. Fixes #37184

* Add version_added

* Drop fallback, use self.get_option

* Remove unused import
2018-03-20 10:32:33 -04:00
Aleksander Kovtunenko
f51a6ea832 implemented installroot option (#33613)
* fix

* move version to 2.6
2018-03-20 10:41:50 +00:00
Chaitanya Deshpande
334b291720 Added module for L4 Policy Set (#37346)
* Added module for L4 Policy Set

* Fixed review comments
2018-03-20 10:30:23 +00:00
Chaitanya Deshpande
b0a8d823d2 Added module for User Account (#37347) 2018-03-20 10:13:10 +00:00
Samer Deeb
a89bafce2e issue:37306 Fix issue with vlan support for onyx version 3.6.6000 (#37310)
* issue:37306 Fix issue with vlan support for onyx version 3.6.6000

Signed-off-by: Samer Deeb <samerd@mellanox.com>
2018-03-20 10:08:35 +00:00
Claes Nästén
6308047dc9 nso_verify handle leaf-list in 4.5 and identityref (#37393)
NSO verify did not handle leaf-list value verification in 4.5 and
later due to changes made for configuration writing made.

map prefix for identityref types in verification.
2018-03-20 10:01:36 +00:00
Trishna Guha
00abe6dbe7
fix UnboundLocalError nxos_bgp_af module (#37610)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-20 01:53:08 +05:30
Fabian von Feilitzsch
716e170821 Auth method for the k8s lookup plugin now matches other modules (#37533) 2018-03-19 15:00:05 -04:00
Alessandro Arnone
ffd1200948 [cloud] ec2_asg: wait for the lifecycle hooks - Fixes #37281 (#37282)
Wait for the lifecycle hooks by matching states `Terminating:Wait` and `Terminating:Proceed` in addition to `Terminating`.
2018-03-19 14:59:07 -04:00
JP Mens
357beeb7ae Address some language in EXAMPLES (#37555) 2018-03-19 13:51:23 -04:00
Andrew Gaffney
0d0bdbec62 Load plugin config defs on first load only (fixes #37553) (#37584) 2018-03-19 13:34:15 -04:00
René Moser
3e44186137
cs_instance: add new template filter all (#37571) 2018-03-19 17:27:16 +01:00
Claes Nästén
9c668fb167 nso_action use json result format if available in NSO (#37395)
Use JSON result format when it is available and make the result format
returned look like it when JSON result format is not available in NSO.
2018-03-19 15:17:12 +00:00
Claes Nästén
458a07d5a4 add timeout parameter and increase default timeout for nso modules (#37391)
NSO operations can take much longer than 10 seconds as they operate on
real network equipment, set default timeout to 5 minutes and allow for
user override.
2018-03-19 15:12:58 +00:00
Adrian Likins
e166946a0a Fix redundant yaml error blurbs on ModArgs parse errors (#36923)
* Fix redundant yaml error blurbs on ModArgs parse errors

Some of the AnsibleParserErrors from parsing.mod_args
are created with the obj=some_yaml_ds options but
some are not.

If they were, we don't want to add another yaml_ds to
it, because that will result in double yaml error blurbs.
And since we dont need to add info, we can just re raise it.

But if there is no ._obj, add it here so we get the extra
detail in the error message (see issue #14790) and raise
a new AnsibleParserError instance.

Fixes #36848

* cleanup existing test_tasks pep8/sanity issues
2018-03-19 10:55:29 -04:00
Julien Vey
6281441e4d cloudformation: add create_timeout attribute (#36445)
* cloudformation: add create_timeout attribute
* No default value
* Only applies on stack creation
* In minutes
2018-03-19 10:38:17 -04:00
Claes Nästén
f8d20f970f Update Cisco NSO module required versions. (#36736)
NSO modules will now work with older versions of NSO, update version
requirements.
2018-03-19 14:18:44 +00:00
Julien Vey
26d9de6f3e apt_repository: check attribute repo for None value (#36944) 2018-03-19 10:16:43 -04:00
Martin Krizek
5be9315603 apt: use to_native instead of str for exc (#37595) 2018-03-19 19:00:58 +05:30
Felix Fontein
60fee5154b letsencrypt: don't mask values specified in data (#37556)
* Don't mask values specified in data.

This heavily improves readability of error messages such as
'Authorization for ******** returned in********:  CHALLENGE: ********-01 DETAILS: Incorrect TXT record "********" (and 1 more) found at ********.********;'
(verbatim quote).

* Added documentation.
2018-03-18 16:51:50 -04:00
Toshio Kuratomi
e356e13d66 Fix the initial value of a variable
This should be a dict, not a string.

Fixes #37455
2018-03-18 09:45:29 -07:00
Diogo Baeder de Paula Pinto
5d9090fbd7 Adding metadata from existing app to the JSON results, so that, for example, the app port can be referenced later 2018-03-18 09:43:41 -07:00
Diogo Baeder de Paula Pinto
a97d8dff5a Fix argspec for webfaction modules
* Fixing webfaction_domain "subdomains" argument parsing - must coerce to list, not string
* Fixing webfaction_db and webfaction_app "machine" argument default
2018-03-18 09:43:41 -07:00
cclauss
d30554bc90 Network F5: Adjust for Python 3 scoping rules (#37554)
This PR makes and adjustment for Python 3 scoping rules which differ from Python 2.  In Python 3, the variable __ex__ goes out of scope at the exit of the __try-except__ block.  This means that when __ex__ is referred to on the lines that follow, it would be an _undefined name_ causing a __NameError__ to be raised instead of the expected __ConnectionError__.

flake8 testing of https://github.com/ansible/ansible on Python 3.6.3
The command "echo ; echo -n "flake8 testing of ${URL} on " ; python -V" exited with 0.
130.72s$ time flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
./lib/ansible/module_utils/api.py:114:21: F823 local variable 'retry_count' (defined in enclosing scope on line 107) referenced before assignment
                    retry_count += 1  # pylint: disable=undefined-variable
                    ^
./lib/ansible/module_utils/six/__init__.py:54:20: F821 undefined name 'basestring'
    string_types = basestring,
                   ^
./lib/ansible/module_utils/six/__init__.py:55:27: F821 undefined name 'long'
    integer_types = (int, long)
                          ^
./lib/ansible/module_utils/six/__init__.py:57:17: F821 undefined name 'unicode'
    text_type = unicode
                ^
./lib/ansible/module_utils/six/__init__.py:658:16: F821 undefined name 'unicode'
        return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape")
               ^
./lib/ansible/module_utils/six/__init__.py:754:37: F821 undefined name 'basestring'
            if not isinstance(data, basestring):
                                    ^
./lib/ansible/module_utils/six/__init__.py:757:32: F821 undefined name 'file'
            if (isinstance(fp, file) and
                               ^
./lib/ansible/module_utils/six/__init__.py:758:38: F821 undefined name 'unicode'
                    isinstance(data, unicode) and
                                     ^
./lib/ansible/module_utils/six/__init__.py:768:32: F821 undefined name 'unicode'
            if isinstance(sep, unicode):
                               ^
./lib/ansible/module_utils/six/__init__.py:774:32: F821 undefined name 'unicode'
            if isinstance(end, unicode):
                               ^
./lib/ansible/module_utils/six/__init__.py:782:36: F821 undefined name 'unicode'
                if isinstance(arg, unicode):
                                   ^
./lib/ansible/module_utils/six/__init__.py:786:23: F821 undefined name 'unicode'
            newline = unicode("\n")
                      ^
./lib/ansible/module_utils/six/__init__.py:787:21: F821 undefined name 'unicode'
            space = unicode(" ")
                    ^
./lib/ansible/modules/cloud/misc/rhevm.py:594:24: F821 undefined name 'e'
            setMsg(str(e))
                       ^
./lib/ansible/modules/cloud/openstack/os_user.py:202:38: F821 undefined name 'shade'
    if description and StrictVersion(shade.__version__) < StrictVersion('1.13.0'):
                                     ^
./lib/ansible/modules/cloud/openstack/os_volume.py:153:27: F821 undefined name 'shade'
            StrictVersion(shade.__version__) < StrictVersion('1.22')):
                          ^
./lib/ansible/modules/files/archive.py:391:92: F821 undefined name 'e'
                module.fail_json(dest=dest, msg='Error deleting some source files: ' + str(e), files=errors)
                                                                                           ^
./lib/ansible/modules/network/dellos9/dellos9_facts.py:379:24: F821 undefined name 'key'
                parsed[key] += '\n%s' % line
                       ^
./lib/ansible/modules/network/dellos9/dellos9_facts.py:399:24: F821 undefined name 'key'
                parsed[key] += '\n%s' % line
                       ^
./lib/ansible/modules/network/dellos9/dellos9_facts.py:403:24: F821 undefined name 'key'
                parsed[key] += '\n%s' % line
                       ^
./lib/ansible/modules/network/dellos9/dellos9_facts.py:418:24: F821 undefined name 'key'
                parsed[key] += '\n%s' % line
                       ^
./lib/ansible/modules/network/f5/bigip_device_httpd.py:461:40: F821 undefined name 'ex'
        if 'Connection aborted' in str(ex) and 'redirectHttpToHttps' in params:
                                       ^
./lib/ansible/modules/network/f5/bigip_device_httpd.py:465:33: F821 undefined name 'ex'
        raise F5ModuleError(str(ex))
                                ^
./lib/ansible/modules/network/ironware/ironware_facts.py:274:24: F821 undefined name 'key'
                parsed[key] += '\n%s' % line
                       ^
./lib/ansible/modules/network/ironware/ironware_facts.py:514:24: F821 undefined name 'key'
                parsed[key] += '\n%s' % line
                       ^
24    F821 undefined name 'basestring'
1     F823 local variable 'retry_count' (defined in enclosing scope on line 107) referenced before assignment
25
2018-03-17 19:19:43 -07:00
Felix Fontein
190755ff65 Fixing domain to authorization matching for ACME v2. (#37558) 2018-03-17 19:03:16 -04:00
Dag Wieers
51662acc6c
Clean up Grafana docs a bit (#37516)
* Clean up Grafana docs a bit

But more is needed, default values, missing choices, proper
descriptions, actual sentences :-)

* Remove validate-modules entries
2018-03-17 02:53:26 +01:00
Luca Lorenzetto
e541bed186 Added parameters to na_cdot_volume (#37202)
* Added parameters to na_cdot_volume

Before this commit there were no parameter for creating a volume
and exporting it as NFS volume. The added parameters are:
- *junction-path* for specifying where to mount the volume in the namespace
- *export-policy* for specifying which export policy to apply to the given namespace
- *snapshot-policy* if required, applying a snapshot policy for scheduling data protection tasks

* Sanity fixes

* Sanity fixes (2)
2018-03-16 15:14:06 -04:00
Ryan Petrello
872a7b4a7a add some Tower module integration tests (and fix a bug or two) (#37421)
* add additional test coverage for tower modules

* add test coverage for the tower_credential module

* add test coverage for the tower_user module

* fix a bug in py3 for tower_credential when ssh_key_data is specified

* add test coverage for tower_host, tower_label, and tower_project

* add test coverage for tower_inventory and tower_job_template

* add more test coverage for tower modules

- tower_job_launch
- tower_job_list
- tower_job_wait
- tower_job_cancel

* add a check mode/version assertion for tower module integration tests

* add test coverage for the tower_role module

* add test coverage for the tower_group module

* add more integration test edge cases for various tower modules

* give the job_wait module more time before failing

* randomize passwords in the tower_user and tower_group tests
2018-03-16 13:28:19 -04:00
Nathaniel Case
594840c1d6
Close & remove paramiko connection where appropriate (#37528)
* Close & remove paramiko connection where appropriate

* Update unit test
2018-03-16 13:28:04 -04:00
Jack
93d2761551 Fix typo in timezone.py (#37442) 2018-03-16 11:18:03 +05:30
Sloane Hertel
16f8a993a0 Increase delay and tries for ec2_vpc_net backoff - fixes #36063, fixes #37323, fixes #36078 (#37354)
* Increase delay and tries for ec2_vpc_net backoff

Wait for DHCP option to be created in ec2_vpc_dhcp_option

Wait for all modifications to the VPC

* Use the vpc_available waiter because is uses Filters

* Missed one

* Optimize retries to only occur if the functionality is available

* Increase max wait time

* Add comments to explain what the waiters are doing
2018-03-16 08:07:54 +10:00
Dag Wieers
cdd21e2170
Clean up module documentation (#36909)
* Clean up module documentation

This PR includes:
- Removal of `default: None` (and variations)
- Removal of `required: false`
- Fixing booleans and `type: bool` where required

* Fix remaining (new) validation issues
2018-03-15 22:15:24 +01:00
Ondra Machacek
a6617e4357 ovirt: Fix documentation for interface parameter (#37459) 2018-03-15 13:31:22 -04:00
Nathaniel Case
85cc5ea129
Raise error when trying to use older iosxr modules with netconf (#37423) 2018-03-15 12:49:35 -04:00
Martin Krizek
a6d31b6fb1
apt: better error msg when update_cache fails (#37410) 2018-03-15 17:32:25 +01:00
Mans Matulewicz
6292fe1116 small typo fix
small typo fix
2018-03-15 11:01:32 -04:00
S. Veyrié
d3df0249af maven_artifact: add verify_checksum option - fixes #31799 (#33370)
* maven_artifact: add verify_checksum option - fixes #31799

* maven_artifact: some cleaning

* Remove blank lines to please the format checker

* Now targeting 2.6...
2018-03-15 06:43:08 -04:00
saichint
05b266cc66 fix nxos_udld issues (#37418) 2018-03-15 15:37:46 +05:30
Martin Krizek
995f6c7689
apt: clarify allow_unauthenticated docs (#37453)
* apt: clarify allow_unauthenticated docs

* Fix sanity check
2018-03-15 10:07:18 +01:00
Toshio Kuratomi
5bdc8fe9f6 Clarify the apt module force documentation (#37353)
The force parameter is inherently insecure.  Be clearer in the
documentation that this is the case.

Fixes #25242
2018-03-15 01:24:32 -07:00
Shinichi TAMURA
73512eeb78 timezone module: allow suse linux as target (#36719)
* timezone module: allow suse linux as target

* use with statement for file handling
2018-03-15 04:00:28 -04:00
Trishna Guha
dd37857884
fix ios_l2_interface (#37389)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-15 11:33:59 +05:30
Pilou
c718c42df4 ansible_tower modules doc: fix typos, use formatting functions (#37414)
* fix typos

* use formatting functions

* use 'job template' instead of 'job_template'

* acronyms: user uppercase

* become_enabled param is about privilege escalation
2018-03-15 13:58:50 +10:00
Simon Legner
4bba66e664 doc: Update pscx examples (#37245)
* win_chocolatey: replace pscx example

PSCX is no longer distributed via Chocolatey: https://chocolatey.org/packages/pscx#comment-3762408157

* win_unzip example: install psxc via win_psmodule
2018-03-15 09:10:58 +10:00
jjshoe
ff15a9e7e2 Document that this module was renamed recently (#37420) 2018-03-14 11:36:42 -07:00
Ricardo Carrillo Cruz
dd0140dfed
Add a note to iosxr_(command|config|facts) stating netconf is not supported (#37394) 2018-03-14 13:24:31 +01:00
Simon Dodsley
841cb0e6a4 Add fact to obtain iSCSI initiator IQN 2018-03-13 17:39:53 -07:00
Pilou
4378542ac7 Connection error messages are unsafe: wrap them (#37329)
* Check that connection error msg are not unsafe

* Connection error messages are unsafe: wrap them

For example, in case of error, docker connection plugin returns exception
message containing Go template. These messages weren't tagged as unsafe
and were consequently rendered:

The conditional check 'result is failed' failed. The error was:
{
  'msg': u'Docker version check ([\'/usr/bin/docker\', \'version\', \'--format\', "\'{{.Server.Version}}\'"]) failed: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/version: dial unix /var/run/docker.sock: connect: permission denied\n',
  'failed': True
}:
template error while templating string: unexpected '.'.
String: Docker version check (['/usr/bin/docker', 'version', '--format', "'{{.Server.Version}}'"]) failed: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/version: dial unix /var/run/docker.sock: connect: permission denied
2018-03-13 16:20:24 -07:00
Felix Fontein
042ad70da0 Production ACME v2 endpoint is available. (#37369) 2018-03-13 16:59:50 -04:00
Ryan Brown
93946ba627 Use NormalizedOperationMethod to catch ClientErrors so the waiter can handle them properly (#37356) 2018-03-13 16:02:39 -04:00
Adrian Joian
123694397a [openstack][docs] Fixing spelling error (#37351) 2018-03-13 14:21:23 -04:00
Toshio Kuratomi
31878ee0ea Fix ansible_lo being used inside of ansible_facts
The logic was keeping ansible_facts['ansible_lo'] instead of fixing it
to be ansible_facts['lo']
2018-03-13 12:05:14 -04:00
Sam Doran
aeb56e4bbe
Accept list or string for ports is seport module (#36661)
* Accept list or string for ports is seport module

Fixes #36466

* Update docs
2018-03-13 12:04:27 -04:00
Deepak Agrawal
a1026dbce5
Eos :do not push config to device if check_mode is enabled (#37287)
* eos can not check config without config session support

* add testcase for check_mode without config session

* fix eos eapi to read use_session env var
2018-03-13 17:13:23 +05:30
saichint
dc61f4c6b1 Fix nxos_vrf issues (#37092)
* fix nxos_vrf issues

* fix doc
2018-03-13 17:08:37 +05:30
Trishna Guha
ba5e562c76
Fix nxos_l2_interface and test typo (#37336)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-13 13:36:38 +05:30
Mike Wiebe
ff57fd0bb4 Fix nxos_switchport (#37328) 2018-03-13 12:03:05 +05:30
Samer Deeb
9031533c0c issue:36955 remove creating temp file for debug
Signed-off-by: Samer Deeb <samerd@mellanox.com>
2018-03-12 23:06:08 -04:00
Dag Wieers
80ba7b7402 Various module doc fixes (#37256)
This PR includes:
- A fix for multiple-choice defaults
- A fix for messed up dictionary samples
- Cleaner defaults when they don't appear part of choices
2018-03-12 13:50:52 -07:00
Toshio Kuratomi
b945846814 Remove dead code
I wrote this code because we had a traceback at some point with pyyaml
not able to handle our AnsibleUnicode type (the C library was doing an
exact match to python's unicode type rather than testing with the object
inheritance hierarchy.) Neither jimi think that AnsibleUnicode gets
passed into this function anymore, though, so we think it is safe to remove.
2018-03-12 12:13:19 -07:00
Julien Vey
099d8f0b56 route53_zone: enable check mode (#37201) 2018-03-12 14:43:43 -04:00
jeffreykoetsier
d54675b44b Add support for Cloudformation's parameter attribute UsePreviousValue (#31775)
* Add support for Cloudformation's parameter attribute UsePreviousValue
2018-03-12 13:46:36 -04:00
Felix Fontein
3ce325e35e Improving EC account key parsing (see #37275). (#37293) 2018-03-12 06:54:06 -04:00
William L Thomson Jr
d1332b83ee Add support for --quiet-build and --quiet-fail to portage module
PR #36452
2018-03-12 11:19:07 +01:00
Sebastian Gumprich
16c564c4b4 fix spelling mistakes in several modules (#36296)
* fix more spelling mistakes

* fix spelling mistakes
2018-03-12 11:00:19 +01:00
Abhijeet Kasurde
a50db37c6c New module : digital_ocean_image_facts (#35887)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-11 11:43:23 -04:00
Mikhail Naletov
3bf6c50fa9 terraform: fixed typo, name error sdtout -> stdout (#37253) 2018-03-10 23:44:37 +01:00
Ondra Machacek
c5c78ab045 ovirt_vms: Pass correct VM entity to create method (#37249) 2018-03-10 04:41:23 -05:00
Ed Costello
1ceaf84108 Document compare_policies utility in AWS guidelines. (#37174) 2018-03-09 16:19:55 -05:00
Victor da Costa
cb53b717a4 Ansible Galaxy: skel for network role #37241 (#37251)
* Skel for network role (#37241)

Skel and boilerplate for network role.

* Add network option as valid type
2018-03-09 13:31:27 -05:00
mikedlr
c2a063a5c0 aws ssm parameter lookup - testing and documentation around negative and failure cases (#36550) 2018-03-09 12:30:33 -05:00
Dennis Glindhart
5506229e79 Remove restriction of SRV protocols (#36709) 2018-03-09 09:22:01 -05:00
Ganesh Nalawade
b440544e73
eos_config module exit session gracefully (#37244)
Fixes #36979
If `abort` is not issued in the top level session prompt
the existing session goes to pending state.
The fix is to come out of config mode by issuing `end` command
and again to same config session and execute `abort` which
`abort` is issued at the top level session prompt.
2018-03-09 19:24:23 +05:30
Trishna Guha
2501834c42
add nxos_snapshot test for missing required param (#37248)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-09 17:47:14 +05:30
Dylan Murray
90943a3362 Add APB role_type to ansible-galaxy init (#36789)
* Add APB role_type to ansible-galaxy init

* Add handlers scaffolding

* Fix shippable errors by setting default

* Add unit tests and fix shippable

* Updates init description
2018-03-09 06:50:17 -05:00
Trishna Guha
a10df8b0b5
fix required args for nxos_snapshot and docs improvement (#37232)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-09 14:08:01 +05:30
Markos Chandras
5234b78b5f modules: zypper: Optimize the 'search' subcommand (#37191)
When looking for installed packages we do not need to query
repositories since we only care about the rpmdb. As such, we can
disable all the repositories operations in order to improve the
performance of that step

Before this patch, when using 'state: present' in the zypper module,
the operation was taking about 12 seconds to complete:

time ansible-playbook foo.yml 1>/dev/null

real	0m12.614s
user	0m10.880s
sys	0m0.683s

After this patch:

time ansible-playbook foo.yml 1>/dev/null

real	0m4.193s
user	0m2.560s
sys	0m0.575s

see:
https://bugzilla.opensuse.org/show_bug.cgi?id=1084525
2018-03-09 03:28:36 -05:00
saichint
74e79d9f5e fix nxos_vrf_af issues (#37211) 2018-03-09 12:20:27 +05:30
Abhijeet Kasurde
c25a42bef6 VMware: New module : vmware_datastore_cluster (#36365)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-08 23:44:15 -05:00
Abhijeet Kasurde
1ec3d1f768 VMware: refactor vmware_datacenter (#36214)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-08 23:36:27 -05:00
Tim Smith
e479e55f59 Fix the docs link to Ohai in the Ohai module (#33788) 2018-03-08 17:00:17 -08:00
Jordan Borean
708869edd6
win: handle non string as an environment value (#37215)
* win: handle non string as an environment value

* Changed powershell environment handler to use .net function instead for special chars
2018-03-09 08:02:54 +10:00
Ivan Mikheykin
58261a42e9 Auto install of python-apt without recommends.
debian:9

`apt-get install python-apt` - this will install python2.7 and python3
After this operation, *88.4 MB* of additional disk space will be used.

`apt-get install --no-install-recommends python-apt` - only python2.7
After this operation, *35.0 MB* of additional disk space will be used.

(cherry picked from commit c542e62)
2018-03-08 16:21:30 -05:00
Sam Doran
3134ba6bee
Do not try to add an entry if none exist (#37152)
When commit revisions are disabled, there will be no revision items returned.
Add note about setting ANSIBLE_PERSISTENT_COMMAND_TIMEOUT to a higer value to avoid timeouts.
2018-03-08 14:36:32 -05:00
René Moser
0130490faa
cs_instance: fix py3 user_data base64 (#37135)
* cs_instance: tests: reproduce py3 user_data base64 issue

* cs_instance: fix base64 encoding with py3
2018-03-08 17:05:57 +01:00
René Moser
4b6b2d4206
vultr: fix py3 compat (#37171)
* vr_server: fix base64 encoding with py3

* vultr: fix AttributeError with py3
2018-03-08 16:46:06 +01:00
Felix Fontein
155adb1631 Using correct content type (as per version 10 of ACME draft). (#37165)
* Using correct content type (as per version 10 of ACME draft).

* Another incompatibility with ACME v2: body must be {} and not contain v1 data (Pebble fails otherwise).

* Fixing bug: self.args in a subclass of Exception is apparently always a tuple.
2018-03-08 09:11:20 -05:00
Trishna Guha
02999b77a4
fix nxos_switchport/l2_interface trunk_vlans state absent (#37180)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-08 18:10:04 +05:30
Ondra Machacek
d45ceb3a4f ovirt_hosts: Add option to choose to reboot the host (#35956) 2018-03-08 06:07:03 -05:00
Rene Moser
190d3fbbed cs_instance: fix error when state destroyed but querying user_data 2018-03-08 10:32:01 +01:00
John R Barker
6c8d40f653
yum is Python 2 only. If Python 3 use dnf (#37140)
* PY3 = dnf

Red Hat are unlikely to provide a Python 2 version of the yum bindings
as they are moving to `dnf`.

If Ansible can't find the yum Python library give the user a hint about
dnf and Python 3
2018-03-08 08:10:07 +00:00
Aren
2a0971435f examples fix: mode selection (#37128)
Mode selection in the examples didn't match (or work) for system: true.
It should be 
`mode: <mode here>`
2018-03-07 23:28:06 -05:00
Toshio Kuratomi
cca0ccaf97
Fix unarchive with strip-components in extra_opts (#37048)
* Fix unarchive with strip-components in extra_opts

When unarchive is given extra_opts to strip all leading directories, it
could end up trying to change the permissions on the root directory.
Tar archives shouldn't contain absolute paths anyways so make sure that
all paths are relative as we handle them.

Fixes #21397
2018-03-07 17:14:51 -08:00
Jordan Borean
c1f5e11cdf
win_uri: return response info on non 200 responses, convert DateTime values to ISO 8601 (#37104) 2018-03-08 09:43:42 +10:00
Abhijeet Kasurde
8f3f7f104f DigitalOcean: typecast map function for Python3 (#37126)
In Python2, `map` returns list whereas Python3, `map` function
 returns iterator. This fix typecast map function for Python3.

Fixes: #37114

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-07 11:31:23 -05:00
Julien Vey
51d491f8f0 route53_zone: move to boto3, and enable comment update (#36641) 2018-03-07 11:16:04 -05:00
TJ Tang
11f9286ab6 Fixes #37042
* correctly check that the no_device attribute is specified
 * ignore volume_size requirement if no_device is specified
2018-03-07 10:28:54 -05:00
Ondra Machacek
99ce712259 ovirt_host_networks: Fix idempotency (#37075) 2018-03-07 10:25:32 -05:00
bdowling
0fee332643 Added missing store regex pattern for prompt found after error (#35820) 2018-03-07 09:35:35 -05:00
Pilou
bc6b96d42e webfaction modules: fix broken import (#35024)
* webfaction_app: fix broken import
* doc: use formatting functions
* webaction_db: fix broken import
* webfaction_domain: fix broken import
* webfaction_mailbox: fix broken import
* webaction_site: fix broken import
* webfaction modules: fix doc
2018-03-07 06:22:06 -08:00
René Moser
e1297af18a cs_router: fix missing doc (#37107)
* cs_router: fix missing doc

* update ignore.txt
2018-03-07 13:34:39 +00:00
René Moser
67d8c8f5c6 cs_ip_address.py: fix missing doc (#37109)
* cs_ip_address.py: fix missing doc

* update ignore.txt
2018-03-07 13:15:39 +00:00
René Moser
2559e832df
cloudstack: fix common E324 in docs (#37082)
Notes about precedence of common args.
Partly fixes E324.
2018-03-07 11:09:08 +01:00
radixdlt
c6a6ea5d98 Add reference to VNET resource group (#34576)
Ported #26052
2018-03-07 04:01:33 -05:00
Nathaniel Case
efb8b539c1
Don't fail on configure in command (#37011)
* Don't fail on configure in command

* Change test to check mode
2018-03-06 18:10:09 -05:00
Jordan Borean
67ffde4ac1
win_wait_for: use loopback IP instead of hostname if 127.0.0.1 is used (#36762)
* win_wait_for: use loopback IP instead of hostname if 127.0.0.1 is used

* removed reverse dns lookup in port check
2018-03-07 08:40:57 +10:00
René Moser
4705edd1a7
letsencrypt: add new param force (#37077)
* letsencrypt: add new param force to ignore remaining days

* letsencrypt: fix E325
2018-03-06 20:51:24 +01:00
Nathaniel Case
f0dc0b28d4
Fix side-effect of flags being passed to ios get_config again (#37084) 2018-03-06 13:55:36 -05:00
Anil Kumar Muraleedharan
23f15e6ff6 Lenovo license update (#36840)
* Editing the License text after Review of Lenovo Legal team.
2018-03-06 18:02:46 +00:00
Alvaro Aleman
c9cb0016a0 Fix consul module service deregistration (#34847)
* Fix consul module service deregistration

Upstream pr in the python-consul library:
https://github.com/cablehead/python-consul/pull/174

This is based on work from https://github.com/bobh

Fixes ansible/ansible#34628

* Pass ACL token when deregistering consul service
2018-03-06 11:57:04 -05:00
skylerbunny
d984afa5ba Add compatibility for docker-py version 3 (#36973) 2018-03-06 07:14:31 -05:00
John R Barker
ebc71bcb16
Network modules to link to network guide (#37033)
* Network modules to link to network guide

* Make it clear what's deprecated
* enable -> become
* Detail when provider is still needed (eAPI/NX-API)
* Link to specific sections
* rx_rate & tx_rate to link to conditional docs
2018-03-06 12:01:07 +00:00
Trishna Guha
5f3feac7fa
remove unused tx_rate and rx_rate from vyos_interface (#37062)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-06 16:38:48 +05:30
saichint
4ed0e5072d fix nxos_vrrp issues (#36930) 2018-03-06 13:36:50 +05:30
Mike Wiebe
51e8eab9db Fix n3k separate to combined image upgrade (#37017)
* Fix n3k separate to combined image upgrade

* Address review comments
2018-03-06 10:05:08 +05:30
Ganesh Nalawade
ba3201cd2f
Fix eos integration test failures (#37020)
Fixes #36919

Fix other eos modules integration test failure in dci
2018-03-06 10:04:40 +05:30
Dag Wieers
cb79957b5f
Make use of named links in documentation notes (#37027)
* Make use of named links in documentation notes

Now that it is possible to name external links, we are making use of
this to make the documentation better.

* Add improvements to ACI documentation

* Disable QA for long line

* Add :menuselection: and :guilabel:

* Improve links on some modules
2018-03-06 00:05:13 +01:00
Ryan Brown
c8ef07e015 Route custom waiter (#36922)
This creates a way for us to use boto3's data-driven waiter support to use custom waiters where Boto3 hasn't implemented them yet.

The only waiter implemented so far is for VPC Route Tables to check that they exist, and this replaces some custom retry code.
2018-03-06 08:22:16 +10:00
Mikhail Naletov
51558f12f4 Added variables to destroy command (#37028) 2018-03-05 16:09:03 -05:00
Toshio Kuratomi
1bc860fafd
Python3 issues in maven_artifact (#37035)
Fixes #33761
2018-03-05 12:11:27 -08:00
Grigory Starinkin
2d98a2de68 fix python3 compatibility for znode module
kazoo client requires bytes and not string
2018-03-05 12:00:46 -08:00
David Newswanger
905b3e2f65
fix NIOS DNS lookup example (#36737) 2018-03-05 13:52:02 -05:00
msven
a2b3120e85 ec2_asg: fix #28087 and #35993 (#36679)
Fixes #35993 - Changes to update_size in commit eb4cc31 made it so
the group dict passed into update_size was not modified. As a result,
the 'replace' call does not see an updated min_size like it previously
did and doesn't pause to wait for any new instances to spin up. Instead,
it moves straight into terminating old instances. Fix is to add batch_size
to min_size when calling wait_for_new_inst.

Fixes #28087 - Make replace_all_instances and replace_instances behave
exactly the same by setting replace_instances = current list of instances
when replace_all_instances used. Root cause of issue was that without lc_check
terminate_batch will terminate all instances passed to it and after updating
the asg size we were querying the asg again for the list of instances - so terminate batch
saw the list including new ones just spun up.

When creating new asg with replace_all_instances: yes and lc_check: false
the instances that are initially created are then subsequently replaced.
This change makes it so replace only occurs if the asg already existed.

Add integration tests for #28087 and #35993.
2018-03-05 11:47:31 -05:00
Mike Klebolt
ce416f247f Fixes commit a28eb94, which broke validate_certs = False for python < 2.7.9 (#34887) 2018-03-05 11:34:03 -05:00
Guillaume Coré
daeec920b0 ini_file: add allow_no_value param (#24442) 2018-03-05 17:05:41 +01:00
Mikhail Naletov
7d0e1f92f4 [terraform] Support initializing modules and providers at runtime (#36996)
* Fixes #36994

Added function for force initializing modules and providers

Added type for force_init parameter
2018-03-05 11:01:53 -05:00
Nathaniel Case
7016b3b9ca
ios_static_route idempotence fix (#35912)
* Remove default admin_distance and fix the idempotence thereof

Fixes #33290

* Fix tests and use yaml anchors to shorten tests

* Add test for undefined admin_distance

* Read config from `show run` if `show ip static route` fails

* Restore flags to ios.get_config &  use get_config where appropriate
2018-03-05 09:28:37 -05:00
Nathaniel Case
0feea66988
Move _start_connection() to module_utils/connection and fix Popen() call (#36249)
* Fix Popen() call to use ansible python

* Remove PATH searching, reuse location of ansible instead
2018-03-05 09:12:01 -05:00
Peter Sprygada
6cbc69447b adds fix for terminal plugins 2018-03-05 08:54:40 -05:00
Peter Sprygada
18d605a132 ugh q 2018-03-05 08:54:40 -05:00
Peter Sprygada
d1ff03e84c fixes cliconf and netconf plugin loaders
This change updates the configuration and plugin loader objects for
cliconf and netconf to pull be able to configure where to find the
plugins.
2018-03-05 08:54:40 -05:00
abirami-n
4021194532 Fix_regex (#36569) 2018-03-05 06:30:37 -05:00
René Moser
6578403288
cs_zone_facts: implement return facts as ansible returns (#36993) 2018-03-05 11:42:38 +01:00
Abhijeet Kasurde
d1eb4fe58c
VMware: Refactor vmware_target_canonical_facts (#36964)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-04 10:20:47 +05:30
Abhijeet Kasurde
e0945900df
New module: digital_ocean_snapshot_facts (#35897)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-04 10:19:58 +05:30
John Smith
8824a8fe23 Assume firewall is offline on DBUS_ERROR during init (#36486)
During init, the FirewallClient tries to connect to the DBUS socket.  If it
fails to connect it should be safe to assume firewalld is offline.
2018-03-03 21:59:10 -06:00
Patrick Marques
83aaa8137a Fix Base64 decode TypeError (#36968)
```
TypeError: expected bytes-like object, not str
```
2018-03-03 16:33:07 -05:00
Abhijeet Kasurde
b973fff276
New module: digital_ocean_load_balancer_facts (#36966)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-03 21:55:54 +05:30
Abhijeet Kasurde
3ead89e3c5
New module: digital_ocean_tag_facts (#36965)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-03 21:55:21 +05:30
Will Thames
aa1e491244 [cloud aws_s3] Enforce required parameters for the various aws_s3 modes (#36767)
[cloud aws_s3] Most modes require `object` parameter, and this is easy to
get wrong (e.g. through confusion with the `dest` parameter). As
it's as easy to enforce, let's do that.
2018-03-02 16:33:04 -05:00
Will Thames
836d7a42a4 Remove old boto documentation and promote AnsibleAWSModule (#36763)
There should no longer be a need for boto documentation - it
just adds significant extra clutter to the guidelines.

AnsibleAWSModule greatly improves the codebase to such an extent
that we should mandate it for new code unless there is a
documented good reason.
2018-03-02 14:03:12 -05:00
Abhijeet Kasurde
3a161fa157
VMware: new module : vmware_datastore_maintenancemode (#36436)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-02 23:35:53 +05:30
Ryan Brown
2f72d082c0 Use Tower v2 API when available, falling back to v1 where necessary (#36663)
* Use Tower v2 API when available, falling back to v1 where necessary
2018-03-02 11:31:53 -05:00
Kevin Breit
a3390b63fe Reversed orser of icmp_type and icmp_code per bug 36378 (#36380) 2018-03-02 16:09:32 +01:00
Trishna Guha
ef7f3fcab6
eos_static_route fix (#36903)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-02 08:50:27 +05:30
Ed Costello
07bc98f019 Additions to AWS Module Guidlines from Pull Request Feedback (#36834)
* Update doc of AnsibleAWSModule to remove incorrect connect example.

Current example uses aws_connect method which no longer exists. Replace
this with the client and resource methods that do exist.

Also remove try/except block in connect example as guidelines imply that
there aren't connection errors thrown on connection, just when later
sing the connection.

* Update AWS module guidelines to include the AnsibleAWSModule connection methods.

* Add information on integration testing to the AWS module guidelines.

* Add information on common documentation fragments to AWS module
Guidelines.

* Changes as requested on PR.

* Restructure connection section to start with current best practice
* Explain the use of the CI build groups
* Use YAML Anchors for aws credentials example

* Replace guidance on use of test groups with link to aliases file.

This achieves the goal of explaining why this file is necessary without
introducing overhead of keeping documentation up to date when test
groups change.
2018-03-02 11:40:01 +10:00
Dag Wieers
858d10a91a
Clean up VMware BOTMETA and author/license info (#36873)
* Clean up vmware BOTMETA

This removes everything that's already part of the module docs. So
basically the BOTMETA file only extends the information from the module.

* Updated author information and copyright statement
2018-03-02 01:07:17 +01:00
Sloane Hertel
9deef5626f Only create tags if tags are provided (#36921) 2018-03-01 15:30:08 -05:00
Ryan Petrello
0e7106b106 properly pass /api/v1/ credential fields for older Towers (#36917) 2018-03-01 15:22:29 -05:00
Mikhail Naletov
7ade607525 Add variables and variable_file in terraform module (#36879)
* Fixes #36837

Added terraform variables for validate command

* Fixes #36837

Changed method from append to extend.
2018-03-01 12:50:49 -05:00
Ganesh Nalawade
b12e90311f
map network_os to ncclient device_params (#36819)
* map network_os to ncclient device_params

Fixes #36786

* update device map

* Add default netconf fallback plugin
2018-03-01 22:23:14 +05:30
Ryan Petrello
a82043939b properly detect the absence of credential_type in older tower-cli (#36908) 2018-03-01 10:36:18 -05:00
Chris Houseknecht
ac11027d58
Convert key to snake. Fixes #36845. (#36887) (#36904) 2018-03-01 10:03:32 -05:00
Pierrick Caillon
808f45db55 Allow configuration of manual mac address (#35504) 2018-03-01 20:24:40 +05:30
Kevin M. Gallagher
3a6f0fbb9c Allow inversion of uid_owner match in iptables module (#36073)
Fixes #20747 and updates documentation for uid_owner in iptables.py
2018-03-01 12:24:02 +00:00
Shawn Q Jackson
9db509db80 corrected typo in documentation examples (#36894) 2018-03-01 08:55:28 +01:00
Ganesh Nalawade
41d75783b5
Fix junos_command py3 related issues (#36782)
Fixes #36204

*  tostring() input string shoulb be in byte string format
*  to_ele() input is required in unicode format
2018-03-01 12:09:11 +05:30
Trishna Guha
2fbfce06e7
Fix nxos_interface multiple issues (#36827)
* fix interface_type

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

* fix setting mtu, doc for state check param, doc for params applicable for ethernet intf

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

* speed idempotence and add unittest

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

* fabric_forwarding_anycast_gateway applicable for svi type intf only

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

* fix speed

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-01 10:56:16 +05:30
ABond
e2615308f9 Include Digital Ocean Token Alias (#36810) 2018-03-01 09:56:53 +05:30
Abhijeet Kasurde
0694aca2a0
VMware: refactor configure disk logic (#36617)
This fix corrects logic related to disk parameters.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-01 09:36:54 +05:30
Brian Coca
809106ba77 fix unixy when debug's msg is not text (#36882)
fixes #36850
2018-03-01 09:23:39 +10:00
Pilou
274a4b0688 gitlab_project: don't ignore errors (#36702)
* gitlab_project: check that errors are reported

* gitlab_project: report encountered errors

Fix #36495
2018-02-28 23:22:47 +01:00
Jordan Borean
c3a805aa3c minor wording changes to remove ambiguity 2018-02-28 16:47:41 -05:00
Michael Gajda
45e7689335 Fix lineinfile example
The examples comment said 'Add a line to a file if it does not exist, without passing regexp' which suggests, that the file is being created. But the default for 'create' is false. Thus the example lacked this option.
2018-02-28 16:47:41 -05:00
Yanis Guenane
6633eaa2c1 crypto: Fix incorrect type for privatekey_passphrase (#36868)
Fix incorrect type for privatekey_passphrase path -> str
2018-02-28 17:19:22 +01:00
Abhijeet Kasurde
529bc0edc6
New module: digital_ocean_size_facts (#35898)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-28 20:11:53 +05:30
mikedlr
3f19ef680a aws_ssm_parameter_store module - value parameter should be no_log since it's often a secret (#36843) 2018-02-28 14:40:58 +00:00
Gaurav Rastogi
60e39b9718 Updated the documentation of modules to match argspec including the type setting for bool parameters (#36821) 2018-02-28 14:38:03 +00:00
Ondra Machacek
365220bea5 ovirt_vms: Fix NoneType in placement policy check (#36775)
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1549082
2018-02-28 08:05:58 -05:00
maorlipchuk
5859c102ee Add documentation for import FCP storage domain (#36780)
FCP storage domain task, does not need to contain port or address
since the storage domain is already on the Host.
Added an example for FCP import.
2018-02-28 08:05:48 -05:00
Ondra Machacek
a0db015454 ovirt_host_networks: Fix removing the label (#36783) 2018-02-28 08:05:32 -05:00
Ondra Machacek
d1214484e6 ovirt_vms: Fix boot devices idempotence (#36833) 2018-02-28 08:04:28 -05:00
Claes Nästén
042c111563 nso_config break cycles in dependency sorting (#36828)
False assumption that values can not have cyclic dependencies. Fix by
removing dependency on self and look for cycles, if found remove
dependency to get a partial sort done.
2018-02-28 11:16:49 +00:00
Ed Costello
645952c139 Add aws_caller_facts module and use it in setup-iam.yml (#36683)
* Add aws_caller_facts module and use it in setup-iam.yml

This removes the dependency on having the command line AWS tools
installed.
2018-02-28 16:30:34 +10:00
saichint
db43fe6a76 nxos_facts fix and integration tests (#36796)
* fix nxos_facts ipv6 error

* time_range not supported for N35
2018-02-28 10:45:50 +05:30
Abhijeet Kasurde
8d49bb6eee
VMware: new module: vmware_host_capability_facts (#36497)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-28 09:54:52 +05:30
Dag Wieers
398b3a4d76
ACI: Parameter username is not required (#36817) 2018-02-28 05:07:56 +01:00
Dag Wieers
68b39f7a84
Parameter method is not required (#36816) 2018-02-28 04:56:16 +01:00
Simon Dodsley
5b5a79917d Fix author string in documentation section (#36798) 2018-02-27 20:25:24 +00:00
Simon Dodsley
3240fee9fd Add Pure Storage FlashBlade Snapshot module (#32505) 2018-02-27 20:07:34 +00:00
Claes Nästén
e75989ec88 nso_config work around ordering issues (#36774)
Include dependencies when sorting entries to avoid issues with certain
versions of NSO.
2018-02-27 15:22:57 +00:00
Chandra Shekar Rangavajjula
52627f3fa0 Added extra choice floppy for bootdev option in ipmi_boot module (#36174) 2018-02-27 15:18:55 +00:00
Julien Vey
57f01c63e9 Add missing import keyword into snippet in Guidelines
PR #36779
2018-02-27 15:22:00 +01:00
Abhijeet Kasurde
443327f665
New module: digital_ocean_region_facts (#35911)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-27 19:24:29 +05:30
nwsparks
e15a903bdf Win lineinfile fix (#35100)
* win_lineinfile: fix #33858. Removed conversion from \r\n

* win_lineinfile: added test for #33858

* win_lineinfile: added documentation and more tests for change

* win_lineinfile: fixed wrong hash in testing
2018-02-26 19:34:44 -05:00
Alex Ratner
c2feab0606 fix plugin-to-doc naming mismatch, typos, grammar (#36366) 2018-02-26 14:25:28 -08:00
Giovanni Sciortino
602f059875 Add atomic_move in ini_file module
Fixes #34181
2018-02-26 10:53:40 -08:00
Ryan Petrello
641f8b4ef6 tower cred: support credential kind/type for /api/v1/ and /api/v2/ (#36662)
older versions of Tower (3.1) don't have a concept of CredentialTypes
(this was introduced in Tower 3.2).  This change detects older versions
of pre-3.2 tower-cli that *only* support the deprecated `kind`
attribute.
2018-02-26 13:12:54 -05:00
Peter Sprygada
fb6a8c0133
fix cliconf get_config method to match base signature (#36682)
This commit fixes up the get_config method to match the minimum method
signature as defined by the base class.  Without this patch, the
get_config method calls will fail in some cirumstances.
2018-02-26 10:56:22 -05:00
Michael Scherer
eb162bdf7f Add space between arguments for acme-tiny (#36739)
Currently, the module fail with a error saying that --acme-dir is mandatory.
Looking at the commandline:

    /usr/sbin/acme-tiny --chain --account-key /srv/letsencrypt/acme_key/acme.key
    --csr /srv/letsencrypt/nginx_certs/www.example.org.csr--acme-dir /srv/letsencrypt/webroot",

We can see that the space before --acme-dir is missing.
2018-02-26 09:15:17 -05:00
Joni Salmi
ff0f6286d7 Docker service update project_name doc (#36713)
```
FAILED! => {"changed": false, "msg": "Parameter error - project_name required when providing definition."}
```
2018-02-26 08:25:50 -05:00
Claes Nästén
2789cc5c09 NSO ValueBuilder improvements. 4.5 leaf-list compatability. (#36583)
Fix issues in ValueBuilder used in nso_config and nso_verify so that it
can handle leaf-list in NSO 4.5 and detect identityref types from
unions.

Fail gracefully if a type is not found.
2018-02-26 13:18:20 +00:00
Mário Santos
8b52006d5c Fix sanity checks in OpenStack docs fragment (#36722)
* Fix sanity checks in OpenStack docs fragment

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>
2018-02-26 13:05:53 +00:00
Peter Sprygada
93b795baf0
allows ib_spec attrs to be filtered in update (#36673)
* allows ib_spec attrs to be filtered in update

This change will allow the ib_spec entries to be be filtered on a change
object by setting the update keyword to false.  The default value for
update is true.  When the update keyword is set to false, the keyed
entry will be removed from the update object before it is sent to the
api endpoint.

fixes #36563

* fix up pep8 issues
2018-02-26 07:55:26 -05:00
René Moser
cdb2969703
cs_sshkeypair: fix ssh key rename (#36726)
* tests: cs_sshkeypair: add reproducer for failed key rename

* cs_sshkeypair: fix rename ssh key
2018-02-26 13:43:40 +01:00
Abhijeet Kasurde
581a0637ba
DigitalOcean: new module: digital_ocean_volume_facts (#36004)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-26 16:15:15 +05:30
Abhijeet Kasurde
4c20d16549
DigitalOcean: new module: digital_ocean_account_facts (#36003)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-26 14:11:26 +05:30
Abhijeet Kasurde
d94a1ef4cc
VMware: refactor vmware_datastore_facts (#36423)
This fix adds datastore cluster details about datastore in returning
facts. Updated documentation and tests.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-26 13:23:22 +05:30
Abhijeet Kasurde
435649274b
VMware: Hardware version support (#36562)
This fix adds support for specifying hardware version for
virtual machine.

Fixes: #35831

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-26 13:21:43 +05:30
Trishna Guha
44332bda78
fix nxos_vlan aggregate (#36710)
* fix nxos_vlan aggregate

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

* Add test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-26 12:29:49 +05:30
Trishna Guha
d6912cf40e
nxos_linkagg fix (#36706)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-26 11:21:51 +05:30
Ganesh Nalawade
5a6b893240
Decouple config and state check in vlan and vrf network modules (#36386)
* Decouple config and state check in {network_os }_vlan and { network_os }_vrf modules

Fixes #35567
Fixes #34754

`interfaces` option is used for configuration as well as operational state
check. If interface is configured to given vlan or vrf but if
operational state of interface is disabled it results in module failure.

Fix is to decouple same option usage for config and state.
With this fix `interfaces` is used as config option and a new
option named `associated_interfaces` will be used for intent check
for assigned interfaces.

* Fix CI failures

* Fix review comment

* Fixed integration test failure
2018-02-26 09:23:54 +05:30
Dag Wieers
8f6eea50db
More improvements to ACI module docs (#36689)
* More improvements to ACI module docs

* Asorted improvements

* Found 2 more

* Improvements to aci_rest documentation
2018-02-25 19:13:16 +01:00
Dag Wieers
07e8fb5dbb
Windows: Clean up documentation (#36684)
This PR includes:
- Further cleanup of BOTMETA.yml
- Cleanup of author github handles
- Use of proper booleans
- One-line license statement
- Copyright format statement
- Smaller cleanups
2018-02-25 03:09:54 +01:00
Dag Wieers
97fde8c760
ACI: Asorted fixes to documentation (#36681) 2018-02-24 22:50:54 +01:00
Dag Wieers
665f5b4e9c
ACI: Improve module index short_description (#36665) 2018-02-24 01:27:37 +01:00
Dag Wieers
7da7ba79bc Add anchors to some guides and all module categories (#36642)
* Add anchors to some guides and all module categories

This is required if we want to use *absolute* :ref: references instead of *relative* :doc: references.

* Update the Cisco ACI Guide reference

* Add `aci_guide` anchor

* Add `network_guide` anchor

* Add category anchor

* Improve readability

* Fix small typo
2018-02-23 17:10:47 -06:00
Ed Costello
2a0c7c4331 Fix documentation of validate_certificates option in aws doc_fragment.
Unignore sanity test failures for AWS modules caused by this common
fragment.
2018-02-23 13:21:44 -08:00
Brian Coca
2f13ddbd69
debug should have item (#36534)
* debug should have item

* item should only be present when var
2018-02-23 15:12:14 -05:00
Brian Coca
ef40e5e3b2 protect against plugins using verify incorrectly
assume false on any errors
2018-02-23 15:11:01 -05:00
Ryan Petrello
8a41233202 tower cred: update kind options in documentation 2018-02-23 10:49:07 -05:00
Ryan Petrello
cd6855275e tower cred: filter user name lookup by the proper key 2018-02-23 10:49:07 -05:00
Ryan Petrello
9cb4b70e27 tower cred: implement credential /api/v1/ kind compatability 2018-02-23 10:49:07 -05:00
Thierry Bouvet
640749d54f Fix credentials for Tower API V2 2018-02-23 10:49:07 -05:00
Gittins
a1241d99ee Updated examples aci_contract_subject_to_filter.py (#36626)
Changed examples to reference the correct module name. Previously the examples used "aci_subject_filter_binding".
2018-02-23 13:00:26 +01:00
Pilou
07927f52ae filesystem: fix documentation (#36556) 2018-02-23 10:59:38 +00:00
Martin Krizek
a79a5439c8
yum: fix yum version comparison (#36573) 2018-02-23 08:55:11 +01:00
Bruno
a7db945ac6 aci example minor fix testing actual real life scenario examples (#36613) 2018-02-23 03:04:40 +01:00
Bruno
68a97ca558 added additional examples for aci modules (#36612)
* added additional examples for aci modules

* small fix on aci_fabric_node

* removing jina2 for clarity
2018-02-23 02:39:58 +01:00
Julien Vey
d212bcf1e7 ec2_group:documentation explicit a behaviour for sg rules (#36586) 2018-02-23 09:24:25 +10:00
Chris Houseknecht
4a8b4bb8a8
Bump OpenShift client req to 0.4.3. Fixes openshift_scale. (#36601) 2018-02-22 16:31:47 -05:00
Simon Dodsley
b96ab46566 Initial commit for Pure Storage FlashBlade module (#32467) 2018-02-22 15:33:48 -05:00
Sloane Hertel
73fd593d45
aws_ec2 inv plugin: remove extra call to verify_file (#36588)
* Remove extra call to verify_file

* Allow next inventory plugin to be tried if the file isn't verified
2018-02-22 12:10:47 -05:00
Richlv
0e0d6cf4f2 Update zabbix_maintenance.py (#36123)
clarify that removal happens by name - while expected, it's good to be explicit
2018-02-22 10:46:04 -05:00
gratuxri
d31d981aa5 Updated vmware URL for guest_ids (#36511) 2018-02-22 12:17:11 +05:30
Matt Martz
a4df4d33ac Fix types when evaluating interpreter (#36541)
* Fix types when evaluating interpreter. Fixes #36536
* Rename variables that contain bytes to b_*
* Get rid of to_text() and to_bytes() calls that do nothing (because the
  data is already the proper type)
2018-02-21 18:03:16 -08:00
Jordan Borean
ef4f8851dc
win_feature: better error handling to make it easier to debug issues (#36491)
* win_feature: better error handling to make it easier to debug issues

* removed ignroed pslint rules that are no longer needed
2018-02-22 11:33:48 +10:00
Julien Vey
3abaa43b1c efs: improve documentation about the update of an efs (#36473) 2018-02-22 10:30:50 +10:00
Dag Wieers
a655bdb72e
Add missing copyright notice
I did a large part of the unzip implementation and gtar functionality.
2018-02-22 01:23:53 +01:00
Sam Doran
723daf3e3a
Check for regexp match when using insertbefore or insertafter (#36474)
Add tests to cover this scenario
Fixes #36156
2018-02-21 17:03:38 -05:00
Sloane Hertel
4d4553bbb0 [cloud] catch NoCredentialsError in boto3_conn (#36537) 2018-02-21 16:39:01 -05:00
Bruno
31bd214682 minor fix to exit_json for aci_static_binding_to_epg.py (#36540)
* minor fix to exit_json for aci_static_binding_to_epg.py

* The aci.exit_json() call doesn't need arguments
2018-02-21 21:17:41 +01:00
Julien Vey
a77b89e7b5 [cloud] ec2_group: fix check mode when using tags (#36503)
Fixes #36412
2018-02-21 14:48:51 -05:00
Toshio Kuratomi
03a6d72633 Revert "remove query/q (#36315)"
This reverts commit b47d2e07e1.

query is a feature for 2.5.  We're not reverting it now.
2018-02-21 10:37:51 -08:00
Dag Wieers
7435e115e0
ACI: Various changes to module documentation and guide (#36516)
* ACI: Various changes to module documentation and guide

This PR includes:
- We moved the object class information to the notes
- Add version information to guide chapters
- Add generic note to modules with reference to ACI guide
- Reference known issues in aci_rest documentation
- Remove module_utils function docs from modules
- Indicate which parameters are not required for querying all objects
- Added missing RETURN information

* Fix copyright strings

* Remove aci_domain_to_encap_pool.py for v2.5

* More updates

* PEP8 fix

* Improve listings of parameters/return values
2018-02-21 19:35:59 +01:00
Simon Dodsley
7ce1d49c55 Add new purefa_pgsnap module
Supplies the ability to create and destroy FlashArray
protection groups.
2018-02-21 10:01:29 -08:00
Matt Martz
10fefc7156
Re-use logic from StrategyBase._load_included_file in StrategyModule.run for free and linear (#36470)
This improves include_role performance and recursion limits
2018-02-21 09:53:15 -06:00
tgates81
7a55fe99ef find.py module: Added depth: option to specify how many level deep to… (#36205)
* find.py module: Added depth: option to specify how many level deep to traverse directories.

* find.py module: depth: added correct version_added value.

* find.py module: depth: Default value is None.
2018-02-21 10:51:26 -05:00
Brian Coca
b47d2e07e1
remove query/q (#36315)
* remove query/q

remove and fixed tests for removed func

* paren fix
2018-02-21 10:42:54 -05:00
John R Barker
5d0ed38e3a
Fixup VMware module docs issues (#36409)
Fix various argspec vs documentation issue
2018-02-21 15:20:42 +00:00
James Tanner
d1f76939e5 Do not cache the loop item label so that it will update with each item 2018-02-21 10:02:03 -05:00
Ed Costello
ca59a4ede4 Better handling of absent AWS SES identity notification information. (#36354)
* Better handling of absent AWS SES identity notification information.

Fixes #36065

aws_ses_identity module now handles the cases where information about
the notification setup for the identity isn't returned by the AWS api.

This seems to happen in an edge case, believed to be eventual
consistency on registering new identities. So this case is treated
as if has been no notification setup for the identity yet.

Also fix 2 flake8 warnings in the module, a missing newline and unused
import.

* Increase the Boto Retries on SES APIs to deal with throttling.

This should address the unstable integration test failing due to
parallel runs in shippable hitting AWS throttling.

* Add retries loading SES details for inclusion in successful response.

There seems to be an eventual consistency behaviour with identity
registration. It's possible to still get no identity back after
registration.

This can cause failures in the shippable builds. This should fix that by
creating a retry of retrieving the identity information after
registration.

A similar retry loop has been added to notification attributes to ensure
this doesn't suffer from the same failure.

* Add missing sleep in get_notification_attributes to avoid busy loop.
2018-02-21 09:33:33 -05:00
Sam Doran
5e7ee9df0a Add note to use script module rather than inline here documents (#32863)
* Add example on how to use a here document with shell module

* Remove here doc example and add note to use script module instead
2018-02-21 09:12:09 -05:00
Sloane Hertel
710db04ebd [ec2_vpc_net_facts] Fix UnsupportedOperation for regions other than u… (#35302)
* [ec2_vpc_net_facts] Fix UnsupportedOperation for regions other than us-east-1

* Make fix more Pythonic

* Fix the exception handling for the module
2018-02-21 09:11:36 -05:00
Trishna Guha
713828804d
nxos_vrf fix (#36494)
* nxos_vrf fix

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

* Address review

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-21 19:33:33 +05:30
Leigh Jenkin
e224039586 Fixes #12353 #20977 adds new option to galaxy cli to preserve scm meta (#34642) 2018-02-21 08:34:44 -05:00
Sloane Hertel
f7d79d4789 [cloud] Retry WAF actions on WAFStaleDataException (#36405)
Add a util to run functions with AWSRetry to retry on WAFStaleDataExceptions and update ChangeToken for each attempt
2018-02-21 08:14:17 -05:00
Trishna Guha
9598978e12
fix nxos_pim module doc (#36505)
* fix nxos_pim module doc

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

* address review
2018-02-21 18:42:37 +05:30
mikedlr
52f2057472 aws ssm parameter lookup - change to return Nones for missing variables (#36456)
* aws ssm parameter lookup - change to return Nones for missing variables

* aws ssm parameter lookup - fix error case message to dump response

* aws ssm parameter lookup - fix integration test cases
2018-02-21 06:50:00 -05:00
Jim Gu
b6d4fa1c96 Wait for VM state to reach poweredoff when state: shutdownguest (#31669)
This change adds the optional wait_for_state_change argument to the
vmware_guest, vmware_guest_powerstate module, which allows for module
completion to be blocked when using the shutdownguest state until the
VM has reached the poweredoff state.

Fixes: #28498

Signed-off-by: Jim Gu <heming.gu@mercurygate.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-21 17:14:12 +05:30
Jordan Borean
df8a5d7a4f
fetch: set fail_on_missing: True as default as per docs (#36469)
* fetch: set fail_on_missing: True as default as per docs

* Updated docs for fetch to say behaviour was changed in 2.5 and updated tests
2018-02-21 18:10:23 +10:00
Trishna Guha
d5858bbcbe
fail module when config is invalid and jsonrpc doesn't return error (#36482)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-21 12:36:10 +05:30
goshkis
abb956d9eb vApp properties support (#32579)
* Adding support for vApp properties.
* vm specification updated only if changes have to be applied. I.e. subsequent updates with the same data will not trigger changed state
* Auxiliary variables renamed, hope this makes the code more readable
* Integration tests changed - re-adding the same properties test not implemented, but tested on real vCenter deployment
* fixing documentation "version_added" for the feature
* Addressing reviewers comments #2:
* documentation updated with the only meaningful value for "option" attribute - "remove"
* Fixed improperly handled case when user requested "add" operation for existent property
* vApp configuration is updated only with properties that contains changes, not with all properties requested by user
2018-02-21 11:59:13 +05:30
Lindsay Hill
f207897f32 fixed conditional error message (#36476) 2018-02-21 11:44:18 +05:30
Abhijeet Kasurde
77b903bd85
VMware: Add missing state param in argument spec (#36339)
This fix adds missing argument parameter called 'state'
and its documentation.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-21 11:32:47 +05:30
Matt Clay
f87ec440e7 Fix PEP 8 issue. 2018-02-20 21:20:32 -08:00
Bruno
ef5e97ef5a aci_static_binding_to_epg fixes (#36478)
* aci_static_binding_to_epg fixes (documentation and logic for interface_mode)

* additional fixes after review
2018-02-21 00:09:53 -05:00
saichint
47a92386c9 fix nxos_bgp_neighbor_af issues (#36472) 2018-02-21 10:20:24 +05:30
Mike Wiebe
ef7d574920 Fix nxos_banner module for unstructured output (#36411)
* Fix nxos_banner module for unstructured output

* Refactor and bug fixes

* Fix pep8 error
2018-02-21 09:51:41 +05:30
Sam Doran
2bffcfa63b Add force option to systemd module (#35925)
* Add force option to systemd module

* Use multi-line YAML syntax in examples

* Add version_added for new option
2018-02-20 20:47:29 -05:00
Dag Wieers
5635c50f9b
aci_iplpg: Various fixes to integration tests/module (#36460) 2018-02-21 00:20:38 +01:00
René Moser
6402a3e504
cs_user: fix return user_api_secret for ACS v4.10 and later (#36447) 2018-02-20 23:08:19 +01:00
Dag Wieers
1720a210e9
aci_spvpg: Various fixes to integration tests/modules (#36458)
* aci_spvpg: Various fixes to integration tests/modules

This PR includes:
- A fix in module_utils aci.py
- Various fixes in integration tests

* Fix typo
2018-02-20 22:49:55 +01:00
Brian Coca
fdbd1297cf catch all cases of no inventory when asked to fail
fixes #36034
2018-02-20 11:59:39 -05:00
Trishna Guha
3d06ce245a
fix vyos_l3_interface adding multiple addresses to interface (#36377)
* fix vyos_l3_interface adding multiple addresses to interface

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

* add test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-20 20:54:27 +05:30
Ryan Brown
66c38dd6c3 Change to longer interval jittered backoffs for efs facts (#36266)
* Change to longer interval jittered backoffs for security group fact gathering

* Add the ECS throttling error code to the list of things to retry on
2018-02-20 10:17:31 -05:00
Ryan Brown
e9c57e732f Add AWSRetry when describing VPCs to help stabilize integration tests (#36264)
* Add AWSRetry when describing VPCs to help stabilize integration tests

* Add retry on create_tags because it is possible to reach this API call before the VPC is finished creating
2018-02-20 08:56:34 -05:00
Brian Coca
a79378fccb remove extra fields from debug output
fixes #35493

updated tests
2018-02-20 08:46:05 -05:00
Brian Coca
6af5693dc2
hide uneeded fields for callbacks (#36259)
* hide uneeded fields for callbacks

fix selective instead of pushing uneeded fields to the methods

* piipii
2018-02-20 08:41:18 -05:00
Brian Coca
c119d54e4a
now get_url defaults to module temp dir (#36218)
* now get_url and other modules default to module temp dir

also fixed 'bare' exception

* allow modules to work with older versions

* updated docs per feedback
2018-02-20 08:40:45 -05:00
Deepak Agrawal
0bbea9a579
vyos_config IndexError in sanitize_config (#36375)
* Bug in del(list) logic. Say you have a list of 4 elements a[0-3]
and you have to remove index 1 and 3, if you remove index 1 first
then list is cut short a[0-2] and does not have index 3

Fix: Remove indexes in reverse sorted order e.g. 3 and 1 in above
example so that order of indexes remain preserved even after deleting

fix is to remove indexes in reverse sorted order

* Add test cases for failed case
2018-02-20 18:29:34 +05:30
Jiri Tyr
000387ac23 Fix default value of gpgcheck in doc (PR #36267) 2018-02-20 13:47:12 +01:00
Sviatoslav Sydorenko
2ce1009c04
Fix portage mod usage of jobs and load-average opt
In short, it enables portage module to emit emerge
command with --jobs and --load-average options
with and without argument.

To emit emerge with such CLI argument without
a value, the user must set the corresponding
module option to 0.

By default, if these arguments are missing from
playbook they are omitted.

Misc changes:

* Use to_native to ensure crosspython compat

* Adjust jobs and LA options to accept 0 as reset

* Add docstring to emerge_packages

* Explicitly note in doc that False will work as 0

PR  #36355 by @webknjaz
2018-02-20 13:04:10 +01:00
saichint
80d19e6af3 fix nxos_bgp_neighbor issues (#36318) 2018-02-20 10:08:17 +05:30
Dag Wieers
6534e6a450
ACI: Add missing examples to module docs (#36417)
This PR includes:
- A cleanup of documentation examples for ACI modules
- A small fix in aci_rest integration test
2018-02-20 03:27:17 +01:00
Dag Wieers
fb9af72b48
aci_aep: Add missing integration tests (#36414)
This PR includes:
- Add missing aci_aep integration tests
- Fix small aci_rest issue
2018-02-20 03:04:17 +01:00
Sloane Hertel
b39534201f [cloud] If inventory file isn't able to be parsed by aws_ec2, raise an AnsibleParserError (#36387)
* If inventory file isn't able to be parsed by aws_ec2, return an empty dict instead of None

* Raise an AnsibleParserError instead

* remove extra lines

* aws_ec2 inventory plugin - fix path matching logic
2018-02-19 17:12:56 -05:00
Toshio Kuratomi
edaeb69a35 Fix the script and patch plugins tempfile ownership
Unified tmp accidentally removed the containing tmpdir from the list of
files to fix the permissions on when we're becoming a different
unprivileged user.  This resulted in a visible bug for script but not
for patch.  This is because patch also uploads the module to the same
temporary directory and the uploaded module also ends up calling
fixup_perms2() which includes the temporary directory.  So by the time
patch needs to access the temporary patch file, the directory is
appropriately set.

script's breakage was visible because script does not upload a module
(it's akin to raw in this way).  Therefore, we only call fixup_perms2()
once in script and so leaving out the tmpdir in script means that the
containing directory never has its permissions set appropriately.

Fixing both because it does not cause an extra round trip for patch so
any speedup would be minimal and it's better to fix the perms as close
as possible to where we know we need it.  Otherwise, changes to
seemingly unrelated code later could end up breaking it.

Fixes #36398
2018-02-19 13:07:58 -08:00
Dag Wieers
3ce5261272
mail: Fix cannot concatenate 'str' and 'int' objects
Fix an error in callback plugin when exceptions are being returned on failure.
2018-02-19 20:39:25 +01:00
Richlv
4a5809f111 Update zabbix_host.py (#36127)
fix tls documentation; minor style fixes
2018-02-19 11:25:38 -05:00
Dag Wieers
79d00adc52
aci_rest: Fix error handling and improve documentation (#36295)
This PR includes:
- A fix for a recently introduced issue wrt. error handling
- Added integration tests for provoked errors
- Influence standard return values using aci library for aci_rest
- Add proxy support documentation
- Documentation update related to #34175
2018-02-19 12:01:14 +01:00
Felix Fontein
cd9d554186 Letsencrypt authz deactivation (#36362)
* Allow to deactivate authz objects. Currently only after success.

* Making sure cleanup is done even when module fails (except if fetch_url() fails).

* Make deactivate_authzs eat exceptions so that all authzs are deactivated in case of errors.
2018-02-19 05:29:31 -05:00
Jeremy Lee
99627ab99d eos_vlan: Modified logic to allow for more than 6 interfaces to be assigned to … (#35568)
* Modified logic to allow for more than 6 interfaces to be assigned to a vlan

* arista output to json.  removing logic for string size.
2018-02-19 11:22:41 +01:00
Abhijeet Kasurde
542d27eee4
VMware: Make a common API for hostsystem params (#36314)
This fix adds a common API for getting host system managed object
from either cluster name or host system.

Fixes: #36010

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-19 14:00:09 +05:30
Abhijeet Kasurde
4d18586fc9
VMware: Refactor vmware_guest_tools_wait (#36098)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-19 13:53:38 +05:30
Henri Salo
b34ab6a0c4 hashi_vault: fix typo (#36368) 2018-02-19 08:34:05 +01:00
Trishna Guha
736d6406c0
fix nxos_config json pipeline error (#36236)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-19 10:11:43 +05:30
ABond
591695932e Fix bug in DigitalOcean module_util (#36352) 2018-02-18 07:47:26 +05:30
Abhijeet Kasurde
5242914ae5
Fix digital ocean issues (#36347)
Remove module from ignore lists and some documentation fix in
digital_ocean_block_storage and digital_ocean module.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-17 22:48:52 +05:30
Abhijeet Kasurde
d74d416beb
Refactor DigitalOcean modules (#35934)
- Updated documentation fragment
- Updated Argument spec
- Use common REST class for API calls

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-17 22:00:53 +05:30
Sviatoslav Sydorenko
3a097063d9 Drop duplicate imports from apt_repository module (#36320)
* Drop duplicate imports from apt_repository module
* Drop json import from apt_repository module
2018-02-17 16:33:12 +05:30
Mike Wiebe
6e096cb0c9 Remove kickstart_image_required check (#36319) 2018-02-17 10:20:31 +05:30
rahushen
e24c547a3a Fixes for the N3500 platform that uses the A8 image (#36261)
* fix nxos_l3_interface tests as n35 doesn't support ipv6

* add terminal dont-ask to nxos_feature and nxos_lldp

* put interfaces in L2 mode for N35

* fix nxos_feature unit-tests
2018-02-17 10:16:03 +05:30
John R Barker
f77a390131
Depreciate aos (#36029)
* Deprecate Apstra's aos_* modules

These modules don't work with AOS 2.1 or higher.
They will be replaced non-upstreamed modules

* Correct list
2018-02-16 18:26:07 +00:00
Mike Wiebe
ac169f5ffd Fix structured output bug (#36193) 2018-02-16 21:34:26 +05:30
Martin Krizek
3a5263a92f facts: fix device uuid's on el6 (#36128)
* facts: fix device uuid's on el6

Fixes #36077
2018-02-16 10:52:51 -05:00
bdowling
f2818caa61 Fix None stringification call to send_command (#36254)
send_command already performs the to_bytes safely on prompts (checking
for None).  Without this check the literal 'None' became a subprompt trigger!

Fixes #35662
2018-02-16 10:37:01 -05:00
kbreit
6a3fd92654 Improved language around in_vpc parameter. (#36137) 2018-02-16 13:14:58 +00:00
ThomasADavis
f8b85bdbf3 int("255.255.255.0" does not work, fixes issue #33867 (#36271) 2018-02-16 05:49:31 -05:00
kbreit
9018c63e56 Improved language around XML description. (#36263)
* Improved language around XML description.

* Moved details on second line
2018-02-16 11:15:17 +01:00
Anwesha Chatterjee
d2ac7ace01 Add information on the various package states (#35882) 2018-02-16 14:22:49 +05:30
Abhijeet Kasurde
f59e1a6136 Misc. typos in ovirt_host_networks (#36287)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-16 02:50:34 -05:00
Dag Wieers
d86c5aee3c aci_domain_to_encap_pool: Add integration tests (#36217) 2018-02-15 23:47:39 -08:00
Abhijeet Kasurde
3ecf2d5ba2
VMware: New module: vmware_guest_snapshot_facts (#36002)
This module gathers facts about VM's snapshots.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-16 11:52:03 +05:30
Ganesh Nalawade
cb52509775
Add eos_command doc with more examples (#36245)
* Add eos_command doc with more examples

*  More examples using cli and eapi transport
*  Example on how to handle json output
*  Example on handling result output in wait_for

* Fix typo
2018-02-16 11:48:12 +05:30
Abhijeet Kasurde
55d117458a
VMware: New module: vmware_guest_disk_facts (#36026)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-16 10:46:35 +05:30
Abhijeet Kasurde
4cc7af7372
docker_login: Hide password from response (#34491)
Fixes: #32869

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-16 10:41:54 +05:30
Abhijeet Kasurde
a377302d6b
VMware: Fix DVPG idempotency issue (#35837)
This fixes, cloning operation where template or existing VM
does not have network or DVPG. Also, adds some strict type checking in
network parameters.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-16 10:32:27 +05:30
saichint
75a34f6668 fix nxos_bgp_af issues (#36147)
* fix nxos_bgp_af issues

* shippable fix

* review comments

* shippable error fix
2018-02-16 09:34:24 +05:30
Ryan Brown
53a314f767 Fix incorrect docs in ec2_tag per #35738 (#36268) 2018-02-16 13:01:02 +10:00
Dag Wieers
334e405e6f
aci_taboo_contract: Add integration tests and examples (#36276)
This PR includes:
- Missing integration tests
- Missing examples
- Two typo's in other integration tests
2018-02-16 01:59:23 +01:00
Dag Wieers
e1b5bc049c
aci_firmware_source: Add integration tests (#36246)
This PR includes:
- Rename 'protocol' parameter to 'url_protocol'
- Add limited integration tests (as we have no public firmware access)
- Add missing examples
2018-02-16 00:20:41 +01:00
Adrian Likins
810fa7046b Fix ansible-console always asking for vault passwords
ansible-console was calling setup_vault_secrets
twice. Once directly and once via _play_prereqs()

The direct invocation was not setting auto_prompt=False.

However, the direct invocation isn't need at all so
this removes it so only _play_reqs() is used.
That fixes the unrequested vault password
prompting.

Fixes #33027
2018-02-15 15:40:51 -05:00
Michael Nugent
d212ca11b3 False matches the docs and intentions of the previous developer (#35762) 2018-02-15 15:40:10 -05:00
nwgarner
fed20b825f Update ios_ping.py to allow for count > 70. (#36142)
* Update ios_ping.py to allow for count > 70.

Find 'Success...' output rather than relying on list index.  Index -1 won't pass unit test.
2018-02-15 12:07:29 -05:00
Toshio Kuratomi
06f73ad578
Normalize usage of temp and tmp on tmp (#36221)
* Normalize usage of temp and tmp on tmp
* Rename system_tmps system_tmpdirs
* Add ANSIBLE_REMOTE_TMP spelling of environment variables
2018-02-15 09:01:02 -08:00
Ryan Brown
2678508d42
[cloud] Fix inconsistent case of Allocation_id in NAT Gateway outputs (#36058) 2018-02-15 10:51:16 -05:00
Pilou
b3ce136256 vars.clean: remove unused method inject_facts (#34838)
* vars.clean: remove unused method inject_facts

Removing this unused method seems better than fixing the typo.

* Fix typo in comments
2018-02-15 07:43:44 -08:00
Nathaniel Case
f67ff4a78e
Alter ASA regexes to be byte-strings (#36176) 2018-02-15 10:11:26 -05:00
Andrew Gaffney
dae737c8b7 Only template each hostvars var on-demand (fixes #33259) 2018-02-15 10:09:04 -05:00
Monty Taylor
0f893027c4 Add a module_utils OpenStack Cloud constructor (#20974)
Start using this to construct shade OpenStack Cloud objects in a
consistent manner. This will let us centralize things like dealing with
password arguments and whatnot. It also allows us to introduce the
ability to pass a fully formed config dict directly to the module.

Migrate all OpenStack modules to use openstack_cloud_from_module.

Have it return the shade library since it's responsible for
importing shade and shade is needed for the exceptions.

Only pull specific OpenStack arguments for the constructor

Rather than passing **module.params to the shade constructor, pull out
only the values that make sense. This should prevent the issues with
module parameters stepping on shade parameters.

Replace module.params.pop with module.params.get

We don't need to pop these anymore since the shade constructor is now
using opt-in values.

Using real urls is ungood. Use example.com domains. Also, get rid of the
antiquated port numbers.
2018-02-15 15:20:49 +01:00
Philippe Dellaert
cffa3caa60 Updating URL to Nuage Python VSPK documentation (#36213)
Fixes ansible/ansible#35766
2018-02-15 11:45:25 +05:30
Richlv
b1263c34e8 Update zabbix.py (#36126)
minor style fixes in module documentation fragment of zabbix
2018-02-15 09:18:57 +05:30
Toshio Kuratomi
717c7d26b7 Fix line too long 2018-02-14 19:02:56 -08:00
Toshio Kuratomi
a612137098 Final fix for #35666 Previous PR (#36143) was merged prematurely. 2018-02-14 18:46:13 -08:00
Dag Wieers
e431d578da
aci_encap_pool: Standardize on 'pool_allocation_mode' (#36215) 2018-02-15 02:59:54 +01:00
Toshio Kuratomi
15fe59ef0c * Fix for setting remote_tmp as a subdirectory of a system temp dir (#36143)
Fixes #35666

* Check that system_temps is all absolute paths
2018-02-14 20:34:14 -05:00
Brian Coca
9066b17d5d
better sudo/su deprecation on config entries (#36074)
* better sudo/su deprecation on config entries

fixes #32130

* typo fixes

* Copy edit

* Fixed more instances
2018-02-14 20:26:10 -05:00
Dag Wieers
dba561efa7
ACI: Avoid using 'previous' with query operations (#36181)
When ACI modules are being used for querying MOs, we should not return
the previous state, as there is no previous state, there's only the
current state.

This impacts a lot of tests that were used to testing the current state
as 'previous'.
2018-02-14 23:07:07 +01:00
Brian Coca
97b6e99479 fixes to virtual facts
fixes #36038
2018-02-14 15:54:36 -05:00
Brian Coca
3680d65d1d deal with no config for view
fixes #35965
2018-02-14 15:53:40 -05:00
Brian Coca
8de4f7cd9f
fix loop_control templating (#36124)
* fix loop_control templating

- properly template ALL properites for loop_control
- loop_control inherits from base, it should not, but needs validate/attribute functionality

fixes #24719
2018-02-14 15:52:19 -05:00
Brian Coca
b403653bd2
Inv export (#36188)
* add export option

* added 'export mode' to ansible-inventory

this optimizes the output for exporting inventory vs representing the 'ansible view'

fixes #30877

* added group priority when needed
2018-02-14 15:45:15 -05:00
Jordan Borean
f8d1c97279
win_uri: fix creates/removes option (#36016) 2018-02-15 06:17:23 +10:00
Jordan Borean
09d939fb00
win_domain_controller: optionally add -ReadOnlyReplica if true (#36017) 2018-02-15 06:15:46 +10:00
Jordan Borean
8fb66c18de
win_updates: fix regression when using string cat names (#36015) 2018-02-15 06:14:06 +10:00
Sam Doran
97573d8b0c
Add unit tests for edgeos_command (#35861) 2018-02-14 09:27:03 -05:00
Dag Wieers
da5cf72236
ACI: Fixes to domain parameters dependencies (#36158)
We identified an incompleteness to parameter dependencies that affects
querying all domain-related objects.

This PR also includes:
- Improvements to integration tests
- Add missing vm_provider types
- Fix examples

This relates to #36131
2018-02-14 13:51:38 +01:00
Krzysztof Zawadzki
ef9dac548f File Module docs, adding mode permission example with sticky bit (#36151)
* File Module docs, adding mode permission example with sticky bit
2018-02-14 12:18:13 +00:00
Anil Kumar Muraleedharan
cf9b427add Changing Lenovo Inc to Lenovo and update License file to be consistent. (#36155) 2018-02-14 10:44:05 +00:00
Lachlan Cooper
4267d12e61 Fix description for rabbitmq_policy (#36149)
This was copied from rabbitmq_vhost.
2018-02-14 09:41:05 +01:00
Lindsay Hill
08eaf37ca8 Fixed Arista typo in docstring (#36139) 2018-02-14 13:23:06 +05:30
Sean Cavanaugh
a52a7d2065 adding support for loopback interface (#36141)
* adding support for loopback interface

currently the loopback interface lo is not supported with vyos_l3_interface, this commit fixes that.  Right now there is a limit of loopback interfaces to just lo, if you want more interfaces you need to use a dummy interface https://wiki.vyos.net/wiki/Dummy_interfaces

* fixing spacing as per pep8 test

fixing issues for sanity test

lib/ansible/modules/network/vyos/vyos_l3_interface.py:120:15: E111 indentation is not a multiple of four
lib/ansible/modules/network/vyos/vyos_l3_interface.py:122:15: E111 indentation is not a multiple of four
lib/ansible/modules/network/vyos/vyos_l3_interface.py:126:19: E111 indentation is not a multiple of four
lib/ansible/modules/network/vyos/vyos_l3_interface.py:128:19: E111 indentation is not a multiple of four
lib/ansible/modules/network/vyos/vyos_l3_interface.py:131:19: E111 indentation is not a multiple of four
lib/ansible/modules/network/vyos/vyos_l3_interface.py:133:19: E111 indentation is not a multiple of four
lib/ansible/modules/network/vyos/vyos_l3_interface.py:137:15: E111 indentation is not a multiple of four
lib/ansible/modules/network/vyos/vyos_l3_interface.py:140:15: E111 indentation is not a multiple of four
lib/ansible/modules/network/vyos/vyos_l3_interface.py:145:15: E111 indentation is not a multiple of four
lib/ansible/modules/network/vyos/vyos_l3_interface.py:148:15: E111 indentation is not a multiple of four

* ugh, missed on spacing issue

* getting rid of continuation lines, the CI system does not like it
2018-02-14 13:01:48 +05:30
Dag Wieers
7897558b95
aci_aep_to_domain: Fix query all objects (#36131)
This PR includes:
- A fix to the module where domain_type without domain caused havoc
- A fix to the integration tests when querying all binding objects
- Improvements to integration tests
2018-02-13 19:07:23 +01:00
Chris Houseknecht
69be2c169f
Upgrade to openshift client 0.4.0 (#35127) 2018-02-13 10:34:24 -05:00
Matt Martz
76ff3e9efc
Prevent reparenting a block with itself (#36075)
* Prevent reparenting a block with itself

* Move __eq__ to Block, to avoid some unexpected problems
2018-02-13 09:30:05 -06:00
Daniel Andrei Mincă
6cfd198b13 provide detailed description of module (#36107)
Fix vague description of module.

Resolves:
Related:
Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>
2018-02-13 14:00:48 +00:00
John R Barker
e4c04aa0f3
Fix YAML issue (#36103) 2018-02-13 12:46:56 +00:00
Charl van Niekerk
5861d3333c Corrected the helm module documentation to the correct default state (installed -> present). (#35950) (#35951) 2018-02-13 13:34:17 +01:00
saichint
eab1b62cd2 fix nxos_interface_ospf issues (#35988)
* fix nxos_interface_ospf issues

* review comment
2018-02-13 09:27:22 +05:30
Dag Wieers
218f008dab
ACI docs: Add a section about common error messages (#36088)
Since we pass information directly to ACI, we sometimes get error messages back to the user that require some additional information or context.

This PR includes:
- Changes to the default error output so the error is easier to find
  when searching in e.g. Google
- 3 specific error messages that we have encountered and has confused
  our users before
2018-02-13 03:13:08 +01:00
Dag Wieers
9f028e9dea
aci_domain_to_vlan_pool: Add missing integration tests (#36079) 2018-02-12 23:54:30 +01:00
Brian Coca
e8b631d4df corrected dump signature 2018-02-12 16:52:04 -05:00
Dag Wieers
30adc2f124
aci_domain: Add missing integration tests (#36051) 2018-02-12 21:37:25 +01:00
Martin Krizek
39d9496282 add_host: check if name or hostname arg is provided 2018-02-12 15:24:45 -05:00
tedder
e8fc269cd3 fix spelling. Seriously, that's it. 2018-02-12 13:17:55 -05:00