Commit graph

22225 commits

Author SHA1 Message Date
Abhijeet Kasurde
dd73bae51a VMware: handle indexError for snapshot details (#42575)
Fixes: #42539

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-27 00:55:21 -04:00
Adrián Matellanes
c62d9a023a Fix zabbix-template module error version comparison (#39199)
* Fix zabbix-template module error version comparison

* Fix zabbix-template module error version comparison
2018-07-27 00:18:02 -04:00
Vladimir Dobriakov
92ab566527 Make example work: "Import Zabbix Temlate" (#40905)
<!--- Small typo, but it was hard to find, why the ansible module execution failed -->

+label: docsite_pr
2018-07-27 00:12:20 -04:00
Andreas Olsson
ab41fb9cd4 Fix cloudflare_dns proxied change detection (#43096)
Resolves #35190
2018-07-27 09:27:05 +05:30
Abhijeet Kasurde
604fcb55ae
VMware: add support for boot option firmware (#42730)
This fix adds support for the boot option 'firmware'

Fixes: #42541

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-27 09:18:04 +05:30
Toshio Kuratomi
dce0a8d052 Switch to imp.load_module 2018-07-26 20:07:25 -07:00
Toshio Kuratomi
52449cc01a AnsiballZ improvements
Now that we don't need to worry about python-2.4 and 2.5, we can make
some improvements to the way AnsiballZ handles modules.

* Change AnsiballZ wrapper to use import to invoke the module
  We need the module to think of itself as a script because it could be
  coded as:

      main()

  or as:

      if __name__ == '__main__':
          main()

  Or even as:

      if __name__ == '__main__':
          random_function_name()

  A script will invoke all of those.  Prior to this change, we invoked
  a second Python interpreter on the module so that it really was
  a script.  However, this means that we have to run python twice (once
  for the AnsiballZ wrapper and once for the module).  This change makes
  the module think that it is a script (because __name__ in the module ==
  '__main__') but it's actually being invoked by us importing the module
  code.

  There's three ways we've come up to do this.
  * The most elegant is to use zipimporter and tell the import mechanism
    that the module being loaded is __main__:
    * 5959f11c9d/lib/ansible/executor/module_common.py (L175)
    * zipimporter is nice because we do not have to extract the module from
      the zip file and save it to the disk when we do that.  The import
      machinery does it all for us.
    * The drawback is that modules do not have a __file__ which points
      to a real file when they do this.  Modules could be using __file__
      to for a variety of reasons, most of those probably have
      replacements (the most common one is to find a writable directory
      for temporary files.  AnsibleModule.tmpdir should be used instead)
      We can monkeypatch __file__ in fom AnsibleModule initialization
      but that's kind of gross.  There's no way I can see to do this
      from the wrapper.

  * Next, there's imp.load_module():
    * https://github.com/abadger/ansible/blob/340edf7489/lib/ansible/executor/module_common.py#L151
    * imp has the nice property of allowing us to set __name__ to
      __main__ without changing the name of the file itself
    * We also don't have to do anything special to set __file__ for
      backwards compatibility (although the reason for that is the
      drawback):
    * Its drawback is that it requires the file to exist on disk so we
      have to explicitly extract it from the zipfile and save it to
      a temporary file

  * The last choice is to use exec to execute the module:
    * https://github.com/abadger/ansible/blob/f47a4ccc76/lib/ansible/executor/module_common.py#L175
    * The code we would have to maintain for this looks pretty clean.
      In the wrapper we create a ModuleType, set __file__ on it, read
      the module's contents in from the zip file and then exec it.
    * Drawbacks: We still have to explicitly extract the file's contents
      from the zip archive instead of letting python's import mechanism
      handle it.
    * Exec also has hidden performance issues and breaks certain
      assumptions that modules could be making about their own code:
      http://lucumr.pocoo.org/2011/2/1/exec-in-python/

  Our plan is to use imp.load_module() for now, deprecate the use of
  __file__ in modules, and switch to zipimport once the deprecation
  period for __file__ is over (without monkeypatching a fake __file__ in
  via AnsibleModule).

* Rename the name of the AnsiBallZ wrapped module
  This makes it obvious that the wrapped module isn't the module file that
  we distribute.  It's part of trying to mitigate the fact that the module
  is now named __main)).py in tracebacks.

* Shield all wrapper symbols inside of a function
  With the new import code, all symbols in the wrapper become visible in
  the module.  To mitigate the chance of collisions, move most symbols
  into a toplevel function.  The only symbols left in the global namespace
  are now _ANSIBALLZ_WRAPPER and _ansiballz_main.

revised porting guide entry

Integrate code coverage collection into AnsiballZ.

ci_coverage
ci_complete
2018-07-26 20:07:25 -07:00
Richard Schwab
ec20d4b13e Enable zone detection in nsupdate (#41365)
Fixes #41346
2018-07-26 23:06:47 -04:00
Zim Kalinowski
30ef83c1c0 fixing bug in storage account sample (#43308) 2018-07-26 17:20:20 -04:00
Zim Kalinowski
e43d4ac512 fixing mysql server sample (#43300) 2018-07-26 16:07:37 -04:00
Zim Kalinowski
3f9cacf777 fixed postgresql server sample (#43299) 2018-07-26 16:07:07 -04:00
Nilashish Chakraborty
18235af363
Fix baud rate and nxos_logging default case idempotency bug (#43295)
* Fix baud rate and idempotency bug

* Fix Shippable errors

* Combine commands calls

* Fix Shippable errors II
2018-07-26 23:15:25 +05:30
Nathan Hyde
d3230b9172 Correct link to Getting Started with Docker Guide (#42709)
Update link to the docker getting started guide.

+label: docsite_pr
2018-07-26 10:39:01 -05:00
Nathaniel Case
ab40c72a3c
httpapi: Split off and save response text contents (#43305)
* Split off and save response text contents

* login might depend on httpapi
2018-07-26 10:12:34 -04:00
Abhijeet Kasurde
13dd1acbec Fix typo in ignore_unknown_extensions doc
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-26 09:28:33 -04:00
Blair Rampling
7a35e2f8c1 adds naptr record module (#39383)
* adds naptr record module

* fixes pep8

* fixes doc errors
2018-07-26 15:45:03 +05:30
Ganesh Nalawade
5e44189a36
Update junos_netconf module documentation (#43291)
Fixes #42719

* Add module documentation to reflect that when netconf
  port is not mentioned the module by default enables
  netconf on port 830 only.
2018-07-26 10:52:25 +05:30
Dag Wieers
32b5992578 uri: Avoid false traceback in common scenarios (#39526)
* uri: Avoid exception in common scenario

So I was confused by the fact that the **uri** module, when not
returning an acceptable HTTP status code, returns:

    The full traceback is:
      File "/tmp/ansible_UQwiI4/ansible_module_uri.py", line 471, in main
        uresp['location'] = absolute_location(url, uresp['location'])

While the actual error was:

    Status code was 400 and not [201]: HTTP Error 400:

I also wonder why that message ends abruptly. I would have expected
`HTTP Error 400: Bad Request` which would be more useful.

* uri: Avoid false positive tracebacks in fail_json() on PY2
2018-07-25 18:17:44 -07:00
Toshio Kuratomi
6eacfecb73 ANSIBLE_REMOTE_TMP was an implementation of unified temp that was later changed
One of the earlier implementation of unified temp for 2.4 passed the
temp diretory to the remote side using this environment variable.  We
later changed it to be passed via a module parameter but forgot to
remove the environment variable.
2018-07-25 16:57:46 -07:00
Adam Miller
66b1adfc83 fix fedora version dnf fact, default pkg_mgr detection per distro family (#43261)
* fix fedora version dnf fact, default pkg_mgr detection per distro family
* loop over possible dnf/yum paths in case there are multiple canonical sources later in life

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-07-25 16:20:07 -07:00
John Jensen
7ba0d8f60e fix regex parse for total memory in slxos_facts.py (#43258)
* fix regex parse for total memory in slxos_facts.py

* account for one or no spaces per LindsayHill's suggestion
2018-07-25 16:59:23 -04:00
Fabian von Feilitzsch
d27de6acd9 Add from_yaml_all to support multi document yaml strings (#43037)
* Support multi-doc yaml in the from_yaml filter

* Most automatic method of handling multidoc

* Only use safe_load_all

* Implement separate filter

* Update plugin docs and changelog
2018-07-25 16:12:22 -04:00
Julien Champseix
19dc267e4c Allow specifying the output encoding in the template module (#42171)
Allow specifying the source and destination files' encodings in the template module

* Added output_encoding to the template module, default to utf-8
* Added documentation for the new variables
* Leveraged the encoding argument on to_text() and to_bytes() to keep the implementation as simple as possible
* Added integration tests with files in utf-8 and windows-1252 encodings, testing all combinations
* fix bad smell test by excluding windows-1252 files from the utf8 checks
* fix bad smell test by excluding valid files from the smart quote test
2018-07-25 13:10:40 -07:00
Andrew Gaffney
dbff49dee0
Remove dead 'vault_password' play attribute (#41847) 2018-07-25 12:01:10 -05:00
Dag Wieers
9bf22309b3 Clarify uncertain nature of tracebacks on Python 2 (#42513)
* Only add exception/traceback on Python 3

On Python 2 the traceback could be any exception from the stack frame
and likely unrelated to the fail_json call.

On Python 3 the traceback is cleared outside any exception frame, so the
call always returns the most inner traceback (if any), and therefor is
most likely related to the fail_json call.

* Add uncertainty to traceback on Python 2

On Python 2 the last exception in the stack frame is being returned,
this could be unrelated to the actual error, especially if fail_json()
is called outside an except: block.
2018-07-25 11:49:16 -04:00
curry9999
1305fca414 change version_added cobbler_sync (#43248) 2018-07-25 14:38:36 +02:00
saichint
fa5f396a4b nxos_file_copy enhancement (#42424)
* add file_pull option

* typo correction

* fix shippable error

* review comments

* fix for review comments by mwiebe

* possible shippable fix

* remove file_copy from ignore

* more review comments addressed

* review comments

* add localhost for remote scp server in tests

* timeout fix
2018-07-25 17:46:55 +05:30
mjmayer
a488b3a8ed elb_application_lb purge rules option (#43113)
* Add parameter to keep elb rules

Does not purge elb rules. This is usefull if running the elb_application_lb
 role and there is the desire to keep existing rules.

* Change variable name keep_rules to purge_rules

The descriptor purge has been used in the past.

* Changed default for purge_rules

Default is purge_rules. This is how the module has functioned previously. This change maintains
 the previous behavior.

* Add integration test for purge_rules flag

* Change wording of test task

* Fix merge conflcit

* Changed default for purge_rules

Default is purge_rules. This is how the module has functioned previously. This change maintains
 the previous behavior.

* merge conflcit

* Change wording of test task

* Add purge_rules option to test

* Change test description wording

* Expand purge_rules documentation

* Clarifies documentation for purge_rules option
2018-07-25 20:55:34 +10:00
Fran Garcia
577306e74b Fix #42000 : ovirt_host_pm documentation for slot parameter (#42196)
* Fix for #42000: ovirt_host_pm ignores slot parameter

* Fix for #42000: ovirt_host_pm ignores slot parameter

* Remove non-required slot parameter
2018-07-25 05:19:24 -04:00
Jordan Borean
2c9cbae3f9
Removed deprecated Windows items slated for removed in 2.7 (#43231) 2018-07-25 12:02:49 +10:00
tomelrod
5eb47066e3 Documentation change for resizefs (#43224)
* Documentation change for resizefs

Changed documentation to match the default value of resizefs set in the code.
Added a note on the resizefs use on the example utilizing it.

* Remove test now it validates fine
2018-07-25 00:22:24 +02:00
Dag Wieers
939de473c6
Add a 'finished' test for async jobs (#38325)
This provides a more convenient way for testing (async) jobs.

When used with a non-async job it will report a warning so the user is
aware that he may be doing something incorrect.

Since the 'finished' result value is an integer (!), the test is turning
this in a proper boolean.
2018-07-24 23:21:28 +02:00
Dag Wieers
5ecfb0b793 cobbler_system: New module to manage Cobbler systems (#39913)
* cobbler_system: New module to manage Cobbler systems

This module is useful to provision new systems using Cobbler and Ansible.

* cobbler_system: warn on invalid properties
2018-07-24 15:50:20 -04:00
Andrew Gaffney
42346937b1
Display task banner before item status (#42892)
This is a follow-up to #41058
2018-07-24 12:25:28 -05:00
Brian Coca
917b6b0d09 import_playbook is not usable from inside a play
(cherry picked from commit 55dddf530ad094810929823f80c4546e97a69ac7)
2018-07-24 13:25:12 -04:00
Nathaniel Case
a7097f6735
Try to enable more exotic auth methods in httpapi (#43212)
* Try to enable more exotic auth methods in httpapi

* Auth tokens won't always come back.

* Reconcile #43147 with this PR
2018-07-24 13:22:40 -04:00
Brian Coca
ac1f05478e Allow to specifically customize console's color 2018-07-24 13:21:58 -04:00
Xyon
3bb9f689e9 Fix spelling; summery -> summary (#43213)
Fix the incorrect spelling of "summary".
2018-07-24 22:10:48 +05:30
Rémy Léone
3113c68053 Fix author name in the documentation 2018-07-24 12:01:37 -04:00
Gregory Hellings
6f007c35c1 Improved the documentation of known_hosts
The documentation for the key parameter was lacking in specificity and
also lacking in testing. These parts are both remedied herein.

Fixes #43157
2018-07-24 09:25:12 -04:00
Brian Coca
0718a53b07 also get checksum on 'any' if it is a file
fixes #42785
2018-07-24 08:59:52 -04:00
Brian Coca
cdc762dd9e
don't assume all delegation subkeys exist (#43032)
* don't assume all delegation subkeys exist

fixes #43026

* add tests
2018-07-24 08:54:58 -04:00
Deepak Agrawal
bf544c2200
Add support for commit label in iosxr_config (#42931)
* Add support for commit label in iosxr_config

* sanity pep8 etc fixes
2018-07-24 17:16:26 +05:30
Abhijeet Kasurde
4f1746ee1d
vault: check dir value before passing (#43184)
This fix checks if dirname is not equal to '' before proceeding
to create actual directory with name.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-24 16:27:17 +05:30
Trishna Guha
dd6ef3355f
get_device_info nxos zero or more whitespace regex (#43178)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-07-24 10:55:37 +05:30
Andreas Olsson
c6854fde29 Fix cloudflare_dns JSON response error handling (#42894)
* The JSONDecodeError exception only exists in Python 3.

* Without a properly parsed JSON response there is no more error
  processing to be done, no matter the http response code.

Relates to #38178
2018-07-24 09:51:44 +05:30
Lindsay Hill
42a9fb1337 Fix broken IPv6 regex (#43175) 2018-07-24 09:13:24 +05:30
uwila
c0048007a9 Detect failed sysvinit module (#43127)
* Detect failed sysvinit module

- This checks the stderr instead of the rc to detect whether the
  sysvinit module was successful or not, as even when failing, the
  rc would be 0.
- It immediatly became obvious that the debug info when failing
  was far too little to properly debug the role. To improve this,
  I also added the rc, stderr and stdout to the debug output.

* Revert stderr check to rc check, rename out->stdout, err->stderr
2018-07-23 19:58:42 -04:00
Jordan Borean
d5d29f4cfa
ssh - skip connection reset if controlpath does not exist (#43062) 2018-07-24 08:20:54 +10:00
Jordan Borean
04431216e7
win_user: use different method to validate credentials that does not rely on SMB/RPC (#43059)
* win_user: use different method to validate credentials that does not rely on SMB/RPC

* Use Add-Type as SetLastError on .net reflection not working on 2012 R2
2018-07-24 08:16:42 +10:00
Jordan Borean
48ad90ac8e
powershell: support recursive requires statements (#43143) 2018-07-24 08:16:16 +10:00
Jordan Borean
93c05074ee
win_chocolatey: refactor module to fix bugs and add new features (#43013)
* win_chocolatey: refactor module to fix bugs and add new features

* Fix some typos and only emit install warning not in check mode

* Fixes when testing out installing chocolatey from a server

* Added changelog fragment
2018-07-24 07:52:13 +10:00
Jarryd Tilbrook
460f858640 Enable check_mode in command module (#40428)
* Enable check_mode in command module

This only works if supplying creates or removes since it needs
something to base the heuristic off. If none are supplied it will just
skip as usual.
Fixes #15828

* Add documentation for new check_mode behavior
2018-07-23 14:06:41 -07:00
Charles
7fedda4c1d move the TLS detection block of win_uri before creating WebRequest (#43168)
* move the TLS detection block of win_url before creating WebRequest

* fix typo security_protocols
2018-07-24 07:02:05 +10:00
Nathaniel Case
8a0967554f
Actually fix eos_facts feature detection (#43155) 2018-07-23 14:51:44 -04:00
Trishna Guha
1d5f881f5c
Add text output along with structured output in nxos_facts (#42886)
* nxos_facts to use default output instead of structured output

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

* fix shippable error

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

* nxos_facts refactor

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

* Add structured output back

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-07-23 22:45:55 +05:30
Mo Balaa
3c0a3a1de1 Add debug messasge to aws_ec2 inventory plugin (#43112) 2018-07-23 12:55:28 -04:00
Jonathan Lozada D
d48415ed57 Fixed typo in gitlab_group (#41349)
Changed 'requried' to 'required'
2018-07-23 22:20:36 +05:30
Deric Crago
5522e9e934 VMware: fixed network['vlan'] str / int mismatch (#42984)
Typecast network vlan into string.
2018-07-23 21:53:24 +05:30
Matt Martz
35b4b1923d Allow adhoc to execute includes and imports 2018-07-23 11:59:12 -04:00
Julien PRIGENT
151419b87a ec2.py: Set source_dest_check default value to None (#42863)
* ec2.py:
  * source_dest_check default value is now None, updated docs
  * Refactor restart_instances and startstop_instances -> Two new functions to prevent repetition: check_source_dest_attr and check_termination_protection
2018-07-23 11:57:30 -04:00
Seuf
9faadce0b2 Add new grafana dashboard lookup plugin (#41319) 2018-07-23 11:11:42 -04:00
Adam Miller
562ff66a98 Fix pkg_mgr_name fact finding for Fedora (#40922)
* Properly handle default package manager vs apt

For distros where apt might be installed but is not the default
package manager for the distro, properly identify the default distro
package manager during fact finding and re-use fact finding from
DistributionFactCollector and instead of reimplementing small
portions of it in PkgMgrFactCollector

Add unit test to always check the apt + Fedora combination to test
the new code.

Fixes #34014

Signed-off-by: Adam Miller <admiller@redhat.com>

* remove q debugging output I accidentally left behind

Signed-off-by: Adam Miller <admiller@redhat.com>

* add os_family to the conditional so we're only hitting that code path when needed

Signed-off-by: Adam Miller <admiller@redhat.com>

* setup for a _check* pattern for general os_family group pkg_mgr checking

Signed-off-by: Adam Miller <admiller@redhat.com>

* use Mock.patch decorator for os.path.exists in TestPkgMgrFactsAptFedora

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-07-23 10:56:09 -04:00
Eric Coutu
ab3475e3f9 Explicitly pass HTTP method to fetch_url 2018-07-23 07:42:19 -07:00
Matt Martz
8d933928d2 Only assume GET if no data, otherwise POST (#43133)
* Only assume GET if no data, otherwise POST. Fixes #42876 #43091 #42750
2018-07-23 07:30:10 -07:00
Will Thames
0b77262288 Add merge_type parameter to k8s module (#42219)
Allows patching of custom Kubernetes resources that
don't support strategic merge patching

Check that openshift module supports content_type param
(requires version newer than 0.6.0)
2018-07-22 21:05:25 -07:00
Yunge Zhu
40fbee6369 Fix azure_rm_keyvaultkey/azure_rm_keyvaultsecret bugs (#41683)
* fix keyvault tests

* missing keyvault requirement

* fix keyvault auth bug

* apply fix in secret

* fix lint

* enable keyvault key and secret tests

* add azure service principal object_id lookup plugin

* fix lint

* add dependency in integration test

* fix bug

* put azure sp lookup plugin into test

* fix lint

* move lookup plugin

* repath lookup plugin

* repath lookup plugin

* repath files

* put az sp lookup plugin to lookup_plugins folder
2018-07-23 11:49:30 +08:00
Deepak Agrawal
20769de560
Don't close persistent connection socket on command timeout (#43071)
* Don't close persistent connection socket on command timeout

* handle exception in client of ansible-connection instead removing socket removal
2018-07-23 07:07:06 +05:30
Nathaniel Case
8c620a17d4
Let called functions use method keyword (#43086)
Hopefully we can live without `method_` instead
2018-07-22 15:26:44 -04:00
Jordan Borean
64f5f9c2f9
win_acl: fix recent bug and add basic tests (#43054) 2018-07-23 05:16:42 +10:00
Dusan Matejka
d43b2b54d5 Fixed incompatible unicode and int comparison in zabbix_host module when using proxy option (#43097) 2018-07-22 07:19:21 -04:00
Joe Abbey
a9b077f763 Stop throwing TypeErrors (#43036) 2018-07-22 02:31:46 -04:00
Abhijeet Kasurde
b02e0c07d8
dnsimple: refactor dnsimple module (#42548)
* Update dnsimple-python minimum version to 1.0.0 as it supports API v2 and API v1 is deprecated.
* Update examples.
* Update documentation.

Fixes: #42495

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-21 08:58:39 +05:30
Chris Smolen
bb35973e37 nxos_logging: add example using aggregate (#41052)
* add example using aggregate
+label: docsite_pr
+label: issue ansible/community#311
* Update nxos_logging.py
2018-07-20 15:51:13 -05:00
Yanis Guenane
b1c60eaa83 Vultr: Introducing vr_startup_script_facts module (#43004)
This commit introduces a new module called vr_startup_script_facts.

This module aims to return the list of startup scripts avaiable
avaiable in Vultr.

Sample available here:

```
"vultr_startup_script_facts": [
  {
    "date_created": "2018-07-19 08:52:55",
    "date_modified": "2018-07-19 08:52:55",
    "id": 327140,
    "name": "myteststartupscript",
    "script": "#!/bin/bash\necho Hello World > /root/hello",
    "type": "boot"
  }
]
```
2018-07-20 20:32:32 +02:00
abirami-n
1152f86ba1 Fixes #41549 (#41551)
* Fix_module_correction
2018-07-20 09:19:20 -07:00
Sandra McCann
87f004c503 Merge branch 'devel' of github.com:ansible/ansible into devel 2018-07-20 11:47:51 -04:00
Daniel Schneller
40b1ecf38a Add src parameter to elasticsearch_plugin (#39915)
* Add src parameter to elasticsearch_plugin

Previously specifying a URL or a file name (which is supported by the
Elasticsearch plugin tooling) would not work correctly with Ansible, because the
detection of the current installation state did not handle this well.

This commit adds a new "src" parameter for the module, which can be specified in
addition to the plugin name. It will be used to retrieve the plugin from
a custom location while keeping the final plugin name available to determine if
it is already present or not.

The url parameter remains for ES 1.x compatiblity.

* Fix sanity test errors

* Add version_added for src option

* Increase first added version to 2.7
2018-07-20 11:40:11 -04:00
Barry Peddycord III
dc42b43cd1 NCLU Module: Improve performance by not operating on empty lines (#43024)
* Update nclu.py

Stop module from running `net` on empty commands.

* Update nclu.py

Updated the copyright date

* Update nclu.py

Returned metadata version to 1.1

* Update nclu.py

Fix indentation to be a multiple of 4.

* Create changelog fragment
2018-07-20 11:38:29 -04:00
Thierry Bouvet
5d23406926 Fix ssl_version default value. (#42955)
* Fix ssl_version default value.

* Add changelog
2018-07-20 11:32:04 -04:00
Sandra McCann
2e93eab920 pr 42271 - fixed merge conflicts 2018-07-20 11:22:30 -04:00
Nathaniel Case
dba975470d
Eos subnet overlap fix (#43023)
* Detect overlapping subnet & provide better errors
2018-07-20 11:02:21 -04:00
Alexander Gubin
e129616ba6 sysvinit: Fix for false changed messages (#42956) 2018-07-20 10:57:58 -04:00
Ryan Brown
b6f8de9204 [aws] Enable SQS events for lambda_event module (#43019)
* Enable SQS events for `lambda_event` module

* Handle SQS event type properly

* PEP8
2018-07-20 10:52:21 -04:00
Julien PRIGENT
3272188170 elasticache_parameter_group.py: add parameter group compatibility with redis4.0 (#43041) 2018-07-20 09:52:03 -04:00
Ryan Brown
07927edfac
[AWS] Fix SSM Parameter Store module when description is missing (#43020) 2018-07-20 09:32:13 -04:00
Andrey Laguta
2e62e36590 Fix multiple var files combining (followup to #36357) 2018-07-20 09:29:20 -04:00
Abhijeet Kasurde
cadbd6ea9c
VMWare: update documentation for linked_clone (#42881)
linked_clone requires snapshot_src parameter. This fix makes them required_together
and update documentation. Also, testcase is added.

Fixes: #42349

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-20 10:34:26 +05:30
Ganesh Nalawade
97d4e53131
Support setting persistent command timeout per task basis (#42847)
* Support setting persistent command timeout per task basis

Fixes #42200

*  Add variable `ansible_command_timeout` to `persistent_command_timeout`
   option for `network_cli` and `netconf` connection plugin so that the
   command_timeout can be set per task basis while using `connection=network_cli`
   or `connection=netconf`
   eg:
   ```
   - name: run copy command
     ios_command:
       commands:
       - show version
     vars:
      ansible_command_timeout: 40
   ```

* Modify `ansible-connection` to read command_timeout value from
  connection plugin options.

* Add `ansible_command_timeout` to `persistent_command_timeout`
  option in `persistent` to support `connection=local` so that
  it is backward compatibilty

* To support `connection=local` pass the timeout value as variables
  from persistent connection to `ansible-connection` instead of sending
  it in playcontext

* Fix CI failure

* Fix review comment
2018-07-20 10:04:53 +05:30
Tim Rupp
867dedc787
Updates F5 module utils (#43047)
New functions and fixes/refactorings for existing functions for
the 2.7 work
2018-07-19 18:39:12 -07:00
Rémy Léone
267c7667f6 Fix archived machine bu (#43017) 2018-07-19 14:03:34 -04:00
Pilou
06f5e49dfb inventory plugins: add test about config API usage (#41888)
* Check get_option method works with inventory plugins

This use case is already tested by some cloud inventoty plugin but
these tests are slow and aren't always executed, hence this new quick
test.

* AnsiblePlugin: Fix typo in docstring
2018-07-19 10:45:45 -07:00
Martin Szulecki
2653bd3f50 Fix docker_image archive features to work with Python 3
Without binary mode, ansible shows a "write() argument must be str,
not bytes" error when using Python 3.
2018-07-19 12:30:07 -04:00
Sumit Jaiswal
8759d97071 infoblox list requirements as infoblox_client and should be infoblox-client (#42993)
* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client

* change infoblox_client to infobblox-client
2018-07-19 12:19:46 -04:00
Brian Coca
9217fbb7dd
better error messasge (#42770)
* better error messasge
2018-07-19 12:13:09 -04:00
Matej Vadnjal
7c318d4e30 ios_user module - implement sshkey option (#38782)
* ios_user module - add sshkey support

* ios_user - Add version_added to sshkey option

* ios_user - pep8 indentation fixes in unit tests

* ios_user - use b64decode method that works on python 2 and 3
2018-07-19 10:28:52 -04:00
Sam Doran
0ca61e9d87
Only report change when home directory is different on FreeBSD (#42865)
* Only report change when home directory is different

Add tests with home: parameter

Have to skip macOS for now since there is a bug when specifying the home directory path for an existing user that results in a module failure. That needs to be fixed in a separate PR.
2018-07-19 10:07:00 -04:00
Will Thames
786613f426 Handle FieldLevelEncryptionId in cloudfront_distribution (#41770)
Ensure that FieldLevelEncryptionId is properly handled - passing it if
set, and keeping it if returned by GetDistribution

Update cloudfront_distribution tests to remove references to
test_identifier so test suite actually works

Fixes #40724
2018-07-19 08:27:13 -04:00
Roberto Barreda
f0f335d2bd parametrize allow_reassignment in ec2_eni (#41982)
* parametrize allow_reassignment

* fix documentation

* fix version_added
2018-07-19 08:27:04 -04:00
yaakov kuperman
61b0981341 [AWS] check mode for ec2_elb and elb_instance (#42694)
what ELBs an instance will be deregistered from prior to actually
executing
2018-07-19 08:13:16 -04:00