Commit graph

21839 commits

Author SHA1 Message Date
John R Barker
ed3933b67a
Corrects typos in net_get/put module docs (#41991) 2018-06-27 10:38:40 -07:00
Lukas Beumer
26abdbf0fd Add the possiblity to force a plugin installation (#41688) 2018-06-27 12:36:51 -04:00
Kevin Jones
09f4c51f9f [openstack] add endpoint_type parameter to examples (#41979)
Certain project functions are not available on the openstack public api. Creating and deleting projects are examples where you must use the admin api.

In most devstack or simple openstack deployments the public, internal and admin apis may live at the IP. However in most production deployments the admin APIs are on a separate network than the public APIs. Therefore for these examples to consistently work, we must specify the admin endpoint_type.
2018-06-27 08:26:03 -04:00
Eitan Akman
fb7882bf86 Issue #39860: Add 'not_contains' method to parsing.py (#39874)
* Issue #39860: Add 'not_contains' method to parsing.py

* Issue #30860 Adds self.negate to Conditional class in lib/ansible/module_utils/network/common/parsing.py

* Issue #39860 Fix singleton-comparison issue per sanity tests

* Issue #39860 'test/integration/targets/nxos_command/tests/cli/not_comparison_operator.yaml' integration test

* Issue #39860 Add unit tests to '../../test/units/module_utils/network/common/test_parsing.py'

* Issue #39860 Fix singleton comparison issue

* Fix E302 expected 2 blank lines, found 1

* Issue #39860 Add license header to unit tests

* Issue #39860 Move integration test to 'test/integration/targets/nxos_command/tests/common/'; remove unnecessary comment from unit test

* Issue #39860 remove unnecessary comment from unit test
2018-06-27 10:21:17 +05:30
Jordan Borean
77526a5036
win_domain: fix typo in cmdlet call (#41993) 2018-06-27 11:29:45 +10:00
Andrew Saraceni
bcb49f2575 Refactor/fix win_group_membership to use SIDs for internal comparisons (#40725)
* refactor win_group_membership to use SIDs for comparisons instead of name parsing

* carry over previous doc cleanup changes

* remove trailing whitespace from docs
2018-06-27 10:54:27 +10:00
Jordan Borean
cc97e89620
Revert "win_security_policy: allow removing values (resolves #40869) (#41125)" (#41986)
This reverts commit f2bd6b6bfd.
2018-06-27 09:37:37 +10:00
jamessemai
f2bd6b6bfd win_security_policy: allow removing values (resolves #40869) (#41125)
* win_security_policy: allow removing values (resolves #40869)

* Removing warning

* Adding test for remove policy setting

* Fixing string comparison
2018-06-27 09:13:31 +10:00
Matt Martz
1401fa74cc
Cache items when task.loop/with_items is evaluated to set delegate_to vars (#41969)
* If we evaluate task.loop/with_items when calculating delegate_to vars, cache the items. Fixes #28231

* Add comments about caching loop items

* Add test for delegate_to+loop+random

* Be more careful about where we update task.loop
2018-06-26 15:10:04 -05:00
Troy Murray
15ce7c5bab change OS X to macOS (#41294)
* change OS X to macOS

<!--- Your description here -->

+label: docsite_pr

* Update all Mac OS X references to be macOS

* Drop extra Mac
2018-06-26 14:09:23 -04:00
hirsts
c0c20835ac Create splunk.py (#40568)
* Create splunk.py

This is a new callback for logging to Splunk. It is based on sumologic.py and updated to work with the Splunk HTTP Event Collector. 
This has been by our team and others. 
It is working with Ansible 2.5.2

* Update splunk.py

Addressed white spaces and formatting issues

* Update splunk.py

* Update splunk.py

* Updated version to match target release

Following code review recommendations. Thanks for the help

* Updated colon impacting documentation

Updated based on code reviews. Thanks the help

* Updated quotes to be consistent
2018-06-26 13:08:34 -04:00
Matthew Stone
c5c3900c52 Adding slxos_lldp module (#39259)
* Adding slxos_lldp module
2018-06-26 09:27:52 -07:00
Brian Coca
27e3cd6e05 options should be settable multiple times 2018-06-26 10:23:00 -04:00
Kevin Breit
7ab3f755ce Fixes idempotency check for partial configurations (#41941)
- Previous PR would overwrite new and existing values improperly
2018-06-26 12:14:01 +02:00
Pierre-Louis Bonicoli
4e275a4ba8 tower_project: manual projects don't require creds 2018-06-26 11:24:34 +02:00
Ganesh Nalawade
9acb5780bc
Add diff capability in vyos edit_config (#41950)
* Add diff capability in vyos edit_config

Fetch onbox diff within edit_config cliconf
plugin and return it in response

* Remove diff returned from ios edit_config

* Fix CI failure

* More CI fixes
2018-06-26 14:21:12 +05:30
Jordan Borean
2af36412f9
runas + async - get working on older hosts (#41772)
* runas + async - get working on older hosts

* fixed up sanity issues

* Moved first task to end of test for CI race issues

* Minor change to async test to be more stable, change to runas become to not touch the disk

* moved async test back to normal spot
2018-06-26 14:40:49 +10:00
Steve Jennings
57ea4cafff Add productType property as an ansible fact (#41139)
* Add productType property as an ansible fact

Suggest to add productType property from win32_operatingsystem CIM instance to differentiate between versions and add new fact.

* update code to display human-readable string

Commit added in response to nizmahone's suggestion to add humane-readable strings to the display. uses switch statement to evaluate and update $ansible_facts hash table with proper information

* remove string conversion, modify switch default

Adjusts line 202 to remove .String() conversion from uInt32.
Adjusts switch test values to integers
Uses switch default clause to handle null values

* formatting

fixed formatting issues, moved product_type into variable.
adjust ansible_fact hash table key to be consistent with the rest of the code.

* Moved product type within distribution
2018-06-26 12:03:50 +10:00
Jordan Borean
abfcc35e6f
win_iis_webapppool: do not output some cmdlet outputs (#41884) 2018-06-26 11:19:09 +10:00
Will Thames
895c512596 New k8s_facts module
Strip out the facts parts of the k8s module into a new simpler
module that deals with querying for facts, also allowing
field and label selectors
2018-06-25 17:05:20 -07:00
David Medberry
ffba0a5d99 Update aws_caller_facts.py (#41936)
Minor typo (accont vs account) and rewording to remove dangling from.

+label: docsite_pr
2018-06-26 09:54:44 +10:00
Sam Doran
4b5b4a760c
Account for empty string regexp in lineinfile (#41451)
* Use context managers for interacting with files

* Account for empty string as regexp

Rather than explicitly testing for None, also test for an empty string which will evaluate to False. An empty string regexp matches every line, which ends up replacing the incorrect line.

* Store line parameter in a variable

* Add tests
2018-06-25 17:57:05 -04:00
Sam Doran
eaae1318f8
Skip if insertbefore BOF until later (#41767)
If a line match is found in the file and no regexp is specified, insertbefore would improperly try to add a line if set to BOF.

Add tests for this scenario.
2018-06-25 16:24:41 -04:00
Matt Martz
93537425a0
Don't import password lookup from network filters. Fixes #41874 (#41907) 2018-06-25 15:11:45 -05:00
Matt Martz
1a2ef0922f
Use inventory.get_host instead of direct access to inventory.hosts (#41860)
* Use inventory.get_host instead of direct access to inventory.hosts. Fixes #32152

* Prevent potential side effect, by using self._inventory.localhost directly instead of get_host
2018-06-25 15:06:32 -05:00
Matt Martz
d255cf42d7
Fix NameError, value was not available in this context leading to a generic unexpected error. Fixes #33275 (#41856) 2018-06-25 15:04:32 -05:00
Robin Roth
24e94ec3c6 Make zypper work with python3 2018-06-25 15:58:24 -04:00
Jordan Borean
9b7b564d75
Stop displaying kinit pass input on a failure (#41882)
* Stop displaying kinit pass input on a failure

* Fixed up minor logic info and added tests
2018-06-26 05:49:19 +10:00
Nathaniel Case
97ffb4c4d2
New base class for HttpApi plugins (#41915) 2018-06-25 15:48:12 -04:00
Dennis Benkert
28d0a173db [aws] add limit on number of CloudFormation stack events fetched by cloudformation module (#41840)
* Add a module parameter to configure the max fetched AWS CFN stack events
* Add version documentation for new configuration option
* Increase default in order to make sure that enough are fetched by default. This align roughly with the limit of manageable resources in CloudFormation.
2018-06-25 12:39:32 -04:00
Abhijeet Kasurde
4d909c1830 VMware: add new parameter in networks (#41899)
This fix adds a new parameter 'dvswitch_name' in networks argument spec.
When there are multiple distributed portgroup with the same name in the given
environment, it is difficult to pick particular dvpg. By specifying dvswitch value
we can pin point exact distributed portgroup to attach virtual machine to.

Fixes: #41781

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-06-25 12:22:30 -04:00
Martin Krizek
8b5283f547 Template handler name 2018-06-25 12:15:21 -04:00
permitanyany
c309381f19 Add Show Interface Example (#41863)
<!--- Your description here -->

+label: docsite_pr
2018-06-25 08:47:02 -05:00
Kevin Breit
44e9ea30c9 Bugfix for idempotency bug (#41889)
- Comparison was not happening properly as it lacked full data
- Module now creates a full data structure on payload
- Defaults to America/Los_Angeles as that's what Meraki seems to do
2018-06-25 14:46:21 +02:00
Ganesh Nalawade
b84adfd885
Fix ios and vyos cliconf edit_config return type (#41896)
* Fix ios and vyos cliconf edit_config return type

Modify cliconf edit_config api to return a json string with
diff and response received from remote host for ios and vyos.

* Doc change
2018-06-25 15:35:39 +05:30
Paul Neumann
d4b9105c9c cliconf: Fix use of multiple prompts in send_command (#41885)
Upon preparing the commands for sending to the device, cliconf converts
the optional prompt to a byte string. However, since there might be
multiple prompts specified, the conversion has to happen for each prompt
individually. Otherwise, wrong regexes will be compiled in
_handle_prompt from network_cli Connection.
2018-06-25 13:10:32 +05:30
Felix Fontein
348f87d3f4 New module: acme_certificate_revoke (#40995)
* First version (without revocation checking).

* Adding check mode and OCSP revocation verification.

* Fixing ACME v1 behavior.

* Fixed superfluous space.

* Fixing links.

* Working around linter complaints.

* Added docstring.

* More defensive.

* Disabling check mode for now.

* Simplifying module by no longer checking OCSP, and removing check mode vestiges.
2018-06-25 02:09:18 -04:00
Ganesh Nalawade
773c031d33
vyos and ios cliconf plugin refactor (#41846)
* vyos and ios cliconf plugin refactor

*  Refactor vyos cliconf plugin
*  Change vyos module_utils and vyos_config as per refactor
*  Minor changes in ios cliconf plugin

* Fix unit test failure

* Fix sanity issues

* Add get_diff to rpc list
2018-06-25 09:43:37 +05:30
Andrew Gaffney
9c5d40ff15
Merge various stdout callback plugins into 'default' (#41058)
This allows mixing and matching of stdout callback features
2018-06-24 23:00:07 -05:00
Jordan Borean
2e46688bca
win_chocolatey: always return the rc return value (#41883) 2018-06-25 08:23:31 +10:00
David Passante
f30e0b833d cloudstack: new module cs_disk_offering (#41795) 2018-06-23 01:15:26 +02:00
permitanyany
7135c1302a Add 2 EBGP neighbors with template (#41853)
<!--- Your description here -->

+label: docsite_pr
2018-06-22 14:48:00 -05:00
Brian Coca
11dbed1350 fix vars hostname fallback
also made it optimistic, rely on exceptions instead of copmlex if chains
2018-06-22 15:29:40 -04:00
Matt Martz
9a18385fab
Validate that rescue and always have an accompanying block. Fixes #26751 (#41822) 2018-06-22 13:59:15 -05:00
Matt Martz
e9a5c53512
Handle typing of vars_files in Play.get_vars_files. Fixes #14708 (#41801) 2018-06-22 13:58:40 -05:00
Nathaniel Case
dd932c9ace
Make validate_certs togglable for httpapi (#41538)
* Make validate_certs togglable for httpapi

* Add `version_added`
2018-06-22 14:03:48 -04:00
permitanyany
46dbb3e1e8 Show BGP Status In JSON (#41844) 2018-06-22 11:27:34 -05:00
Nathaniel Case
9aa8c652ba
Netconf bytes fixes (#41607)
* Solve some bytes issues on iosxr

* Solve some bytes issues in junos

* Do the correct thing with tostring based on lxml or not
2018-06-22 11:50:44 -04:00
Simon Dodsley
c144adc9de Fix API call to get ActiveCluster information and add (#41744)
connected arrays and volume group counts to default
2018-06-22 10:46:02 -05:00
Sijis Aviles
ba3db90e3a Fix: wildcard excludes in unarchive with tar archives (#40935)
* fix: exclude using wildcards for tar archives

Fixes #37842, #22947

* fix: Remove quote() as it munges the exclude format

* test: Refactor to use single archive structure

A common structure archived by different methods should simplify some of
the feature tests.

* test: Use common archive layout to validate exclude feature

* test: Use the same exclude checks for zip/tar archives
2018-06-22 08:28:14 -07:00