Commit graph

21577 commits

Author SHA1 Message Date
Adam Miller
c65f3fdca6 BSD UTC timezone is not always idempotent (#40855)
Signed-off-by: Adam Miller <admiller@redhat.com>
2018-06-01 23:46:07 -04:00
Ryan Brown
7f8654d586 Add minimum botocore and boto3 checking to AnsibleAWSModule (#41005)
* Add minimum botocore and boto3 checking to AnsibleAWSModule
2018-06-01 18:45:22 -04:00
Tim Rupp
2daf5f3edb
Correct states in bigip_pool_member (#41035)
Fixes: #40631

The module was not correctly handling a certain state where the node
could be down, but the monitor was enabled on the node.

This patch fixes it.
2018-06-01 14:38:23 -07:00
Sam Doran
479b26fe31 Do not try to import simplejson in jsonfile.py (#40983)
With the addition on ajson.py in cbb6a7f4e8, two
new classes were created: AnsibleJSONDecoder and AnsibleJSONEncoder. These
classes are used when calling json.looads() and json.dumps().

This works fine with everything except the jsonfile.py cache plugin, which would
first try to import simplejson as json, then fall back to json. When simplejson
is installed, the load() or dump methods from simplejson are called, which then
try to use the AnsibleJSONEncoder/AnsibleJSONDecoder subclass from ajson.py.
But asjon.py imports json, not simplejson, and things blow up.
2018-06-01 11:24:57 -07:00
Nathaniel Case
70e3a7c9e1
Don't try to reuse ansible_port, it doesn't work that way (yet?) (#41022) 2018-06-01 13:51:34 -04:00
Tom Wassenberg
6097776dc0 Fix flag in debug message (#40753)
The debug message stated that the vault password client script was invoked as `example.py --vault-id=example`, while it's actually `example.py --vault-id example`.
2018-06-01 13:48:22 -04:00
Matt Martz
d4930e6692
Add requests.Session like class (#37622)
* Adds requests.Session like class

* py2 syntax fix

* Add a few examples to the Request docstrings

* Add helper methods and docs

* Fix test failures

* Switch tests to test Request instead of open_url, add simple open_url test to validate funcitonality

* Fix filename in replace-urlopen code smell test
2018-06-01 11:44:20 -05:00
Brian Coca
c86fd6e2df Fix error reporting on bad type for config setting 2018-06-01 12:28:30 -04:00
s-hertel
c1400ce909 Fix cache timeout behavior 2018-06-01 12:25:04 -04:00
Tim Rupp
8bccd0830b
Re-allow SSH due to broken delegation (#40978)
Removes the SSH enforcement because it breaks situations where, for example,
an admin maintains Ansible Tower and another team needs to use Ansible
with the BIG-IP modules, but the Tower admin does not want to install
the F5-SDK on the Ansible Tower instance.

In this situation, the user needs to delegate the execution of the BIG-IP
module to another linux host that does have the dependencies installed.

Usually this is done with delegation, often over SSH. Limiting the SSH
connection here prevents this from working.
2018-06-01 08:55:50 -07:00
Daniel Jaouen
e90265e716 homebrew_tap: fixes #40853 (#40863) 2018-06-01 11:43:04 -04:00
Matt Davis
5228b939fe
update 2.7 codename 2018-05-31 15:46:07 -07:00
Tim Rupp
0cecc08886
Fixes variable usage in bigip device trust (#40975)
Variable used was incorrectly named
2018-05-31 14:40:21 -07:00
Brian Coca
bcabbe33c8 terms 2018-05-31 16:30:47 -04:00
Brian Coca
cbedbd3c9c enforce required config 2018-05-31 16:30:47 -04:00
Adam Miller
39f7e055a4 Add ignore_unknown_extensions to include_vars for dir (#35809)
processing to ignore non-valid file extensions

Fixes #35745

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-05-31 15:30:49 -04:00
Ryan Brown
52b79a87ee
Terraform: Pass module targets to terraform plan as well as apply (#40958)
* Pass module targets to terraform plan as well as apply

* Fix undefined variable

* Add target for plan-only operation
2018-05-31 14:35:40 -04:00
Nathaniel Case
91fd98a2bd
Complain if API response is not JSON (#40966) 2018-05-31 13:20:17 -04:00
Matt Martz
da4ff18406
Support 'apply' to apply attributes to included tasks - Impl 1 (#39236)
* Support 'apply' to apply attributes to included tasks

* Cannot validate args for task_include

* Only allow apply on include_

* Re-enable arg validation, but only for include_tasks and import_tasks

* s/task/ir/

* Add tests for include_ apply

* Include context with AnsibleParserError

* Add docs for apply

* version_added

* Add free-form documentation back

* Add example of free-form with apply
2018-05-31 12:08:38 -05:00
Matt Martz
961484e00d
Add src parameter for uri module that can be used in place of body. Supports binary files (#33689)
* First pass at a src parameter that can be used in place of body. Supports binary files

* Add test for uri src body

* Bump version_added to 2.6

* Close the open file handle

* Add uri action plugin that handles src/remote_src

* Document remote_src

* Remove duplicate info about remote_src

* Bump version_added to 2.7
2018-05-31 11:43:00 -05:00
Trishna Guha
0fd7d7500a
revert 40940 and fix nxos output truncated issue (#40960)
* revert 40940

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

* revert #40655 fixes output getting truncated issue for nxos

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-31 20:58:45 +05:30
Matt Martz
079318bf4a Honor ignore_errors when invoking the debugger, add config to disable this behavior (#39868)
* Honor ignore_errors when invoking the debugger, add config to disable this behavior. Fixes #39863

* Limit ignore_errors logic to failed
2018-05-31 11:14:26 -04:00
Nathaniel Case
e7afd3d378
Search for macaddresses more stringently (#40901)
* Search for macaddresses more stringently

Fixes #40829
2018-05-31 10:45:17 -04:00
Nilashish Chakraborty
a013cdc747
Fixes ios_logging idempotency issues (#40701)
* Fixes ios_logging idempotency issues

* Added intergration tests & minor fixes

* Minor fixes in tests

* Minor fixes in tests #2

* eos_logging fixes after PR review
2018-05-31 20:07:24 +05:30
James Mighion
083ddb9bc2 Adding changed option to save_when for aireos (#40681)
* Adding changed option to save_when for aireos

* Deprecating save option for aireos_config.

* Updating version_added to 2.7 since the PR missed the window for 2.6
2018-05-31 10:35:12 -04:00
Trishna Guha
5350d0697f
revert #40655 fixes output getting truncated issue for nxos (#40940)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-31 18:45:01 +05:30
Ondra Machacek
142cc48ca9 ovirt_templates: Add searching by cluster (#40934)
* ovirt_templates: Add searching by cluster

* ovirt_disks: Add searching by sd and vm_name

* Fix python syntax
2018-05-31 06:40:30 -04:00
Ondra Machacek
43af09fc8f ovirt_vms: Fix change cd (#40939)
* ovirt_vms: Fix attaching of CD

* ovirt_vms: Fix idemptency
2018-05-31 06:40:19 -04:00
Blair Rampling
55de3d07c5 adds alias parameter to nios_host_record (#39469) 2018-05-31 15:14:55 +05:30
jctanner
a9e53cdb68 Allow config to enable native jinja types (#32738)
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
2018-05-31 10:38:29 +02:00
Sumit Jaiswal
81510970ae
Fix for updating the name in case of host record and network view and also display meaningful error in case of connection timeout (#40597)
* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* to resolve the bug 40709

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* to fix shippable nios automation error

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* shippable error fix

* shippable error fix

* shippable error fix

* shippable error fix

* shippable error fix

* review comment fix

* shippable error fix

* shippable error fix
2018-05-31 12:25:15 +05:30
Matt Davis
f87ca27aa3
use PEP-440-compliant formatting of dev tag 2018-05-30 15:39:19 -07:00
Matt Martz
ad7ba91f75 Use _remote_is_local=True for local connection in synchronize (#40833)
* All instances of local connection should use _remote_is_local=True. Fixes #40551

* Switch to instance attribute for synchronize

* Add test that shows that synchronize _remote_is_local addresses tmpdir building
2018-05-30 13:28:11 -07:00
Matt Martz
96ec32630e Deprecate squash_actions (#35978)
* Deprecate squash_actions

* Wording update

* Update wording and version

* Update versions to reflect 2.7 deprecation

* Add 2.7 porting guide
2018-05-30 12:05:03 -05:00
Fabian von Feilitzsch
4d77878654 K8s dynamic collected changes (#40745)
* Move k8s modules to dynamic backend

* update required openshift version

* update -> patch

* use new dynamic client exceptions

* style

* guard urllib3 import

* guard ansibleerror import

* give more information about error cause

* format in variable

* style

* rename tests

* Search for provided kind in a few more places to match old behavior, properly handle failure

* make common code use fail instead of fail_json, to work for lookup plugins as well

* update docs

* move openshift_raw tests into k8s tests

* fix typo

* Use diff of response and resource to determine change, don't do any checking client-side before making requests

* remove duplicate yaml blocks

* Update porting guide for k8s module

* remove invalid doc refs

* If fuzzy searching finds a resource, update resource_definition to match proper kind and version

* remote unsupported openshift_raw variables

* properly check environment variables when determining auth method:
2018-05-30 12:04:48 -05:00
Nathaniel Case
82dfa542c2
Replace bogus (but routeable) ip addresses with RFC 5737 example addresses (#40554)
* Remove 1.1.1.1 from *_config tests

* remove from *_smoke and *_system

* Miscellaneous other tests

* Remove from module documentation as well

* Remove from unit tests as well

* Remove accidental duplication from rebase
2018-05-30 13:03:20 -04:00
Abhijeet Kasurde
91eb4a034e Use get_option instead of _options.get API
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-05-30 12:05:37 -04:00
René Moser
4006f1ba40 ec2_lc: fix state doc matching arg_spec (#40792)
* ec2_lc: fix state doc matching arg_spec

* Remove unused variable
2018-05-30 09:34:23 -04:00
Nilashish Chakraborty
b9ea646839
Fixes eos_logging idempotence issue #31862 (#40604)
* eos_logging idempotence fix

* fixed eos_logging idempotence issue

* Fixed pylint and pep8 errors

* Added tests for eos_logging & minor fix

* Removed q statements
2018-05-30 18:21:54 +05:30
Trishna Guha
786ec14e54
fix nxos dci failures (#40871)
* fix structured output for nxos_linkagg

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

* fix TypeError for nxos_interface

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-30 15:31:16 +05:30
Anil Kumar Muraleedharan
8ece8679d8 Lenovo typofix (#40865)
* Changing Lenovo Inc to Lenovo and update License file to be consistent.

* Typo correction of ENOS to CNOS
2018-05-30 15:23:26 +05:30
Guillaume Grossetie
5ffa1a1b2a Add a module to create a java key store (jks) from a certificate (#35273)
* Add a module to create a java key store (jks) from a certificate
* Create a jks from a certificate and a private key (secured by a password)
* Add an option to recreate the jks (useful when you want to update the jks password)
* If the certificate changed, recreate the jks
* Version added is now 2.7
2018-05-30 13:53:09 +05:30
Eike Frost
b72e3bb568 Documentation/default fix for keycloak modules (#37192)
* fix validate_certs doc and remove default for auth_client_id

* document admin-cli default instead of removing it
2018-05-30 03:32:33 -04:00
Markus Juenemann
46e03ec866 Fix typo in if statement in snmp_facts module. (#39578) 2018-05-30 02:10:19 +02:00
Sloane Hertel
7d2c71462d gluster_volume: add 'volume' alias to 'name' param (#40845)
* gluster_volume: add 'volume' alias to 'name' param

* remove gluster_volume from validate-modules/ignore.txt
2018-05-30 02:06:46 +02:00
Arie Bregman
1c3a117f83 doc: add name to tasks in ini_file module examples (#38888)
One of Ansible best practices is "Always Name Tasks".

This should include tasks in examples as well so people can learn
what is the right way to use it.
2018-05-30 02:02:48 +02:00
Pilou
de385560a8 jenkins_jobs: fix typos (#40844)
* jenkins_job: fix typos

* jenkins_job: add type for 'enabled' parameter
2018-05-30 01:44:02 +02:00
James Cammarata
ee519e0d0a
Add a helper to PlayIterator to recursively find the active state (#40847)
Also fixes a discovered bug in block rescue detection related to inserting
the ansible_failed_{result|task} variables when the rescue is in a nested
block.
2018-05-29 15:48:32 -05:00
Nathaniel Case
20f93816d6
Fix eapi tests to use become (#40838)
* Return the expected prompt character based on become status

* Update eos_banner tests for eapi

* Update eos_config tests for eapi

* Update eos_facts tests for eapi

* Update eos_interface tests for eapi

* Update eos_l3_interface tests for eapi

* Update eos_lldp tests for eapi

* Update eos_logging tests for eapi

* Update eos_smoke tests for eapi

* Update eos_system tests for eapi
2018-05-29 14:18:03 -04:00
Ricardo Carrillo Cruz
669949e6a3
Do not gather mem facts if command invalid (#40820)
* Do not gather mem facts if command invalid

In some firmwares, 'show memory statistics' fail, thus
do not populate mem if we got a failure after running that command.

* Fix pep8

* Warn if got error when running 'sh memory statistics'

* Fix pep8
2018-05-29 18:16:53 +02:00