Commit graph

21874 commits

Author SHA1 Message Date
Rob
b87e1a023d [aws] add support for http2 to AWS ALB (#40372) 2018-07-02 14:31:56 -04:00
Alexander Saprykin
1eea5674ba Fix galaxy client executing queries with invalid http method (#42201)
Fixes: ansible/galaxy#796
2018-07-02 12:37:40 -04:00
jeromecc
daaf711e44 clarify module functionality in docstrings: module creates domains and their @ A record only #35669 (#41872) 2018-07-02 10:36:51 -04:00
Abhijeet Kasurde
087fc0c20c Restore BOOLEANS import in basic.py (#42008)
This import was removed by mistake. This is required for backward
compatibility.

Fixes: #41988

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-02 10:27:16 -04:00
fluxcess
6290a7c595 added description (#42187)
Added description to one of the really basic code examples

+label: docsite_pr
2018-07-02 10:10:27 -04:00
Trishna Guha
981c9f6a79
fix nxos_vxlan_vtep_vni issue (#42183)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-07-02 19:32:29 +05:30
cclauss
14bc625c2c Catch the raised exception so we can report failure (#42177)
[AWS iam_policy] Avoid the _undefined name_ by catching the raised exception into the variable __e__ so it can be reported on the following line.

flake8 testing of https://github.com/ansible/ansible on Python 3.6.3

$ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__
```
./lib/ansible/modules/cloud/amazon/iam_policy.py:305:16: F821 undefined name 'e'
            if e.errno == 2:
               ^
./lib/ansible/modules/cloud/misc/rhevm.py:594:24: F821 undefined name 'e'
            setMsg(str(e))
                       ^
./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)
                                                                                           ^
3    F821 undefined name 'e'
3
```
2018-07-02 08:45:36 -04:00
Nathaniel Case
5850591d14
Base connection class for network-style connections (#41839)
* Create base class for network-style connections

* clean up some differences

* Move NetworkConnectionBase

* Tweak netconf for tests

* Tweak when network_os is checked to avoid failing tests

* Pull back exec_command
2018-07-02 08:41:00 -04:00
Kevin Breit
dd31dcab70 Meraki module utility request() has improved error reporting (#39838)
* request() has improved error reporting
- 5xx errors show same as before
- 3xx and 4xx errors show error body

* Print body for errors greater than 300, but less than 500

* Remove trailing whitespace
2018-07-02 10:42:50 +02:00
cclauss
61d5454737 Catch the raised exception so we can report failure (#42072)
Avoid the _undefined name_ and mirror lines 389 and 459 by catching the raised exception in the variable __exc__ so it can be reported on the following line.

flake8 testing of https://github.com/ansible/ansible on Python 3.6.3

$ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__
```
./lib/ansible/module_utils/network/iosxr/iosxr.py:414:42: F821 undefined name 'exc'
            module.fail_json(msg=to_text(exc))
                                         ^
```
2018-07-02 09:36:10 +05:30
Felix Fontein
52e7946de5 Minimizing information needed for second stage from first stage. (#42167) 2018-07-01 10:06:38 -04:00
Andrew Gaffney
f4efa2c4cc
Provide a fallback value for all options in 'default' callback plugin (#42155)
This is necessary for plugins that subclass 'default' but don't also
include its docs fragment. This is a follow-up to #41058
2018-06-30 21:31:30 -05:00
Sam Doran
fb55038d75 Add warning when using an empty regexp in lineinfile (#42013)
* Revert "Account for empty string regexp in lineinfile (#41451)"

This reverts commit 4b5b4a760c.

* Use context managers for interacting with files

* Store line and regexp parameters in a variable

* Add warning when regexp is an empty string

* Remove '=' from error messages

* Update warning message and add changelog

* Add tests

* Improve warning message

Offer an equivalent regexp that won't trigger the warning.
Update tests to match new warning.

* Add porting guide entry for lineinfile change
2018-06-29 17:15:43 -07:00
Brian Coca
b6f2aad600 ignore ansible.cfg in world writable cwd (#42070)
* ignore ansible.cfg in world writable cwd
 * also added 'warnings' to config
 * updated man page template
2018-06-29 16:46:10 -07:00
Brian Coca
de0e11c0d5 avoid loading vars on unspecified basedir (cwd) (#42067)
* avoid loading vars on unspecified basedir (cwd)
2018-06-29 16:45:38 -07:00
James Cassell
3627aa3391 pamd module regression fix (#42025)
* pamd: typo fix sufficicent->sufficient

* pamd: is_valid is a property, not a method; return a tuple

* pamd: define is_valid for all PamdLine classes

* pamd: use validate() for verbose errors, define generically

* pamd: PamdRule: rule_control is always str, use _control

Fixes https://github.com/ansible/ansible/issues/41179
2018-06-29 16:34:20 -05:00
Olli-Antti Kivilahti
8eacbd0381 elasticsearch_plugin - Show STDERR on module failures. (#41954)
* elasticsearch_plugin - Show STDERR on module failures.

I tried to install a ES plugin without
  become: yes
and found after debugging the module that the module failed ude to permission issues.

The only error message I got was
  Is analysis-icu a valid plugin name?

That was strange considering I followed the example documentation by the letter.

I found out that when this module fails, it hides the real reason for failure.

This patch replaces the generic error with more meaningful diagnostics.

* elasticsearch_plugin - Show STDERR on module failures. Changelog fragment

 samdoran commented 2 days ago

This looks good. Please create a changelog fragment to go along with this change. See fragments for examples.
2018-06-29 17:28:17 -04:00
Tyler Gregory
fabd7823b2 Correct typo in win_domain_computer doc (#42123) 2018-06-29 23:05:07 +02:00
Sloane Hertel
22a6927dbd Fix file module with check_mode - Fixes #42111 (#42115)
* Fix file module check_mode
2018-06-29 11:19:34 -07:00
John R Barker
e9dbebfa57
Fix some broken links (#42079)
* Fix some broken links

* We now only serve via https
* redirects don't work with anchors, so update those links (devel/dev_guide)
2018-06-29 11:12:01 -07:00
Sloane Hertel
44e5886385 Fix setting required options for inventory plugins (#42049)
* Fix setting required options for inventory plugins

* call set_options for yaml and script plugin
2018-06-29 11:48:35 -04:00
Matt Martz
aea396f04b
Add items2dict filter that is the reverse of dict2items (#42071)
* Add items2dict filter that is the reverse of dict2items

* Address feedback about type checking, and add docs for zip/zip_longest
2018-06-29 10:47:07 -05:00
Fabian von Feilitzsch
d75e49693b update module arguments to allow resource_definition to be a string (#40730) 2018-06-29 09:21:47 -05:00
David Soper
5f5fbffe8a UCS Server UUID pool modules and integration tests (#41743)
* UCS Server UUID pool modules and integration tests

* change version added to 2.7

* Doc and result changed updates from review.
2018-06-29 15:49:47 +02:00
David Soper
f8f22f77ed Fix issue with vNIC redundancy templates (#36608)
* Fix bug with redundancy templates and add integration tests for redundancy templates.

* vlan_list absent state support and fix for vlans as strings in vlan_list
2018-06-29 15:48:48 +02:00
John McDonough
bf932a852b Module for UCSM Manager Timezone Management (#36974)
* Module for UCSM Manager Timezone Management

* Module for UCSM Manager Timezone Management

* Module for UCSM Manager Timezone Management

* Addressed PR comments and added integration tests

* fixed mismatched default value between doc and argument_spec

* changed main() to call run_module()

* Change version to 2.7

* updated integration aliases indicating unsupported testing

* updates to DOCUMENTATION
2018-06-29 15:43:52 +02:00
Ganesh Nalawade
88b966e23b
Fix junos_config confirm commit issue (#41527)
* Fix junos_config confirm commit issue

Fixes #40626

* Due to issue in ncclient commit() method for Juniper
  device (ncclient/ncclient#238)
  add a workaround in junos netconf plugin to generate proper
  commit-configuration xml and execute it using ncclient
  generic `rpc()` method.

* Update junos_config doc
2018-06-29 15:09:55 +05:30
Ganesh Nalawade
e41d427d1b
Add run_commands api for ios and vyos cliconf plugin (#42093)
* Add run_commands api for ios and vyos cliconf plugin

*  Add run_commands api to ios and vyos cliconf plugin
*  Refactor ios and vyos module_utils to check return code
   in run_commands

* Fix Ci failures
2018-06-29 15:07:38 +05:30
Fran Fitzpatrick
88764165ad Adds description of the group to documentation (#42080) 2018-06-28 15:00:27 -07:00
Ryan Brown
d76e9008ee [aws] Default state of iam_managed_policy to present (#42069)
This default matches with the other IAM modules, such as iam_role.
2018-06-28 16:03:40 -04:00
Leif Madsen
4a05b6c8ba Fix EC2 example variable naming mismatch (#42048)
Fix EC2 example where variable name mismatched usage.

+label: docsite_pr
2018-06-28 13:05:43 -04:00
LeenSun
5ea414422b Update supervisorctl.py (#42031)
<!--- Your description here -->

+label: docsite_pr
2018-06-28 11:53:07 -04:00
Dave Thelen
fa2366079a Update eos_vlan.py (#41852)
changing show command to work for both transport methods
2018-06-28 13:19:43 +05:30
saichint
bd9b8b422d fix nxos_gir issues (#41809)
* fix nxos_gir issues

* review comments
2018-06-28 10:11:45 +05:30
Luke Short
5024b4e445 Update the minimum Ansible version to 2.4. (#41989) 2018-06-27 15:29:32 -04:00
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