Commit graph

18193 commits

Author SHA1 Message Date
Marc Mercer
10d6e1be90 Cast target port to an int in elb_target_group. Fixes #32098 (#32202)
(cherry picked from commit 17a008654a)
2017-10-26 09:35:43 -07:00
Dave Thelen
2340c7ac6e eos_user: sends user secret first on user creation fixes #31680 (#32162)
* fix command order

* add integration test

* test cleanup

* remove redudant commands

(cherry picked from commit 602a618e60)
2017-10-26 07:43:19 -07:00
Trishna Guha
6d4d2d88b4 fix nxos_igmp_snooping (#31688)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 529b7a7b78)
2017-10-26 07:38:23 -07:00
Kedar K
70c3aefdaf - Fix to return error message back to the module. (#31035)
(cherry picked from commit 916e6be888)
2017-10-26 07:38:23 -07:00
rahushen
a69f93f4f5 Fixes #31056 (#31057)
(cherry picked from commit 046d430a26)
2017-10-26 07:38:23 -07:00
rahushen
f2e8339467 Fix nxos_banner removal idempotence issue in N1 images (#31259)
* Fix nxos_banner removal idempotence issue in N1 images

* handle pep8 error

(cherry picked from commit 025386c56b)
2017-10-26 07:38:23 -07:00
Prasad Katti
a59eede7a2 [cloud] add boto3 requirement to cloudformation module docs (#31135) 2017-10-26 07:37:47 -07:00
tedder
f29285b4b5 Exclude stack policy when running in check mode.
Fixes #31931
2017-10-26 07:37:47 -07:00
Samprita Hegde
cd854c1d2b [cloud] Support changeset_name parameter on CloudFormation stack create (#31436) 2017-10-26 07:37:47 -07:00
otteydw
52f58e4bbd Add a validate example to blockinfile. (#32088)
(cherry picked from commit d2cb676c4c)
2017-10-26 07:32:34 -07:00
Sebastien Boyron
d5df56d4fc [fix] issue #30516 : take care about autoremove in upgrade function
(cherry picked from commit af3e8950d6)
2017-10-26 07:32:33 -07:00
Morgan Kesler
8e97f33b88 Remove toLower on source (#31983)
Having this here breaks any source URLs that require case sensitivity.
(cherry picked from commit ed342e8ce3)
2017-10-26 07:32:33 -07:00
Brian Coca
2f71772a28 fix inventory loading for ansible-doc
fixes #31995

(cherry picked from commit 90e8071d48)
2017-10-26 07:32:33 -07:00
Sam Doran
2f30de35ba Add ansible_distribution_major_version to macOS (#31708)
(cherry picked from commit 4dce9dc796)
2017-10-26 07:32:33 -07:00
Martin Krizek
66b5e6bf7d ini inventory: document value parsing workaround
Fixes #31656

(cherry picked from commit 4bd16216fe)
2017-10-26 07:32:33 -07:00
Brian Coca
d651bcbc06 validate that existing dest is valid directory
(cherry picked from commit 83dec70ad8)
2017-10-26 07:32:33 -07:00
Brian Coca
c73543ef8d dont add all group vars to implicit on create
they already get added in vars manager on use.
fixes #31420

(cherry picked from commit 383170e9e1)
2017-10-26 07:32:33 -07:00
Peter Sprygada
bd624837fa inserts enable cmd hash with auth_pass used (#32107)
eapi transport was not passing the auth_pass to the remote device with
it was provided.  this fix will now insert the correct command hash into
the jsonrpc request.

fixes #30802
(cherry picked from commit 1af72afdef)
2017-10-26 07:32:33 -07:00
Adam Miller
e7d8685643 firewalld: don't reference undefined variable in error case (#31949)
* firewalld: don't reference undefined variable in error case

Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>

* firewalld: don't set exception as var and not use it

Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
(cherry picked from commit 5b7d161b10)
2017-10-26 07:32:33 -07:00
Adrian Likins
e50a51751b Fix service_mgr fact collection (#32086)
The platform/distro/etc facts were being passed in
correctly, but service_mgr.py was looking up the
wrong names ('system' vs 'ansible_system') resulting
in service_mgr falling back to default 'service' result.

Fixes #30753, #31095
(cherry picked from commit 6203e899f0)
2017-10-26 07:32:33 -07:00
Brian Coca
fa2a18a740 make sure patterns are strings
fixes #31978

(cherry picked from commit ab8bacdf5e)
2017-10-26 07:32:33 -07:00
Brian Coca
265652212d Avoid default inventory proccessing for pull (#32135)
* Avoid default inventory proccessing for pull

- now pull's own special inventory processing should work correctly
- also removed ineffective set_defaults

fixes #31449

* use class property instead

* only do localhost for adhoc

(cherry picked from commit aad5d1432583c4aa4105b774f38c80498e85de59)

(cherry picked from commit ca71a50459)
2017-10-26 07:32:33 -07:00
Brian Coca
0e13202f3e use configured ansible_shell_executable
refine args/shell/executable hanlding

(cherry picked from commit f2ade09dce)
2017-10-26 07:32:33 -07:00
Jerry Chong
47aa292c3b Fix exception upon display.warn() (#31876)
Fixes #31875
(cherry picked from commit 567e989581)
2017-10-26 07:32:33 -07:00
Brian Coca
2b862381db warn on bad keys in group
(cherry picked from commit 1bf09a7d84)
2017-10-26 07:32:33 -07:00
Brian Coca
b61bfc87b8 better cleanup on task results display (#27175)
* better cleanup on task results display

callbacks get 'clean' copy of result objects
moved cleanup into result object itself
removed now redundant callback cleanup
moved no_log tests

* moved import as per feedback

(cherry picked from commit 01b6c7c9c6)
2017-10-26 07:32:33 -07:00
Brian Coca
11313699ab py2/py3 safer shas on hostvars (#31788)
* py2/py3 safer shas on hostvars

* plain bytes

(cherry picked from commit 68f177d381)
2017-10-26 07:32:33 -07:00
Brian Coca
8c7ab621c9 move to use ansible logging
(cherry picked from commit 07f1e7540b)
2017-10-26 07:32:33 -07:00
Fabian von Feilitzsch
dafc90c146 Update k8s_common.py
(cherry picked from commit b058b8e653)
2017-10-26 07:32:33 -07:00
Fabian von Feilitzsch
20173ab441 use to_str instead of json.dumps when serializing k8s object for logging
(cherry picked from commit 20d2a83e13)
2017-10-26 07:32:33 -07:00
François Scala
5b1d502c58 Fix urlparse import for Python3 (#31240)
* Fix urlparse import for Python3 in

* contrib/inventory/consul_io.py
* contrib/inventory/rudder.py
* contrib/inventory/windows_azure.py
* lib/ansible/module_utils/known_hosts.py
* lib/ansible/modules/cloud/centurylink/clc_firewall_policy.py
* lib/ansible/modules/cloud/docker/_docker.py
* lib/ansible/modules/cloud/ovirt/ovirt_disk.py
* lib/ansible/plugins/action/ce_template.py

(cherry picked from commit aade5234a9)
2017-10-26 07:32:33 -07:00
sethp-nr
a78c39df87 wait_for: treat broken connections as "unready" (#28839)
* wait_for: treat broken connections as "unready"

We have observed the following condition while waiting for hosts:

```
Traceback (most recent call last):
  File "/var/folders/f8/23xp00654plcv2b2tcc028680000gn/T/ansible_8hxm4_/ansible_module_wait_for.py", line 585, in <module>
    main()
  File "/var/folders/f8/23xp00654plcv2b2tcc028680000gn/T/ansible_8hxm4_/ansible_module_wait_for.py", line 535, in main
    s.shutdown(socket.SHUT_RDWR)
  File "/usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 57] Socket is not connected
```

This appears to happen while the host is still starting; we believe something is
accepting our connection but immediately resetting it. In these cases, we'd
prefer to continue waiting instead of immediately failing the play.

This patch has been applied locally for some time, and we have seen no adverse
effects.

* wait_for: fixup change

We were missing an import and a space after the `#`

(cherry picked from commit 402b095841)
2017-10-26 07:32:33 -07:00
Brian Coca
09437909e6 remove hosts from removed when rescuing
fixes #31707

(cherry picked from commit 618627febd)
2017-10-26 07:32:33 -07:00
Brian Coca
01110d75ea fix html formatting
(cherry picked from commit c0fc797a06)
2017-10-26 07:32:32 -07:00
Toshio Kuratomi
f8fa79818c Revert "Prefer the stdlib SSLContext over urllib3 context"
This reverts commit f48af16ddc.

Meant to push to 2.4.2
2017-10-24 07:32:33 -07:00
Toshio Kuratomi
f48af16ddc Prefer the stdlib SSLContext over urllib3 context
We do not go through the effort of finding the right PROTOCOL setting if
we have SSLContext in the stdlib.  So we do not want to hit the code
that uses PROTOCOL to set the urllib3-provided ssl context when
SSLContext is available.  Also, the urllib3 implementation appears to
have a bug in some recent versions.  Preferring the stdlib version will
work around that for those with Python-2.7.9+ as well.

Fixes #26235
Fixes #25402
Fixes #31998

(cherry picked from commit 725ae96e1b)
2017-10-24 07:31:12 -07:00
Martin Krizek
7a23162ae4 hostname: fix for a new version of rhel (#31839)
Fixes #31811
(cherry picked from commit efec43dd1e)
2017-10-18 14:24:17 -07:00
Ilya Margolin
13adf5dc16 Fix -M/--module-path option for ansible-doc and ansible-console (#31744)
Fixes #31743
(cherry picked from commit 9bc60cd05e)
2017-10-18 14:20:05 -07:00
Brian Coca
d7e3665f3f fix closure issues
fixes #31786

(cherry picked from commit a26a2841ff)
2017-10-18 14:16:42 -07:00
Abhijeet Kasurde
7e6554b9ff Correct usage for shutil.rmtree (#31541)
* Correct usage for shutil.rmtree

Fix adds correct usage of shutil.rmtree in git module

Fixes: #31225

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Include archive tests so they get run

* Use new include syntax

* Cleanup syntax on git tests

- use multi-line YAML
- remove unneeded {{ }} around vars in conditionals
- remove unneeded quotes
- add task file name to task names for easier troubleshooting when things fail

* Make archive tests work for RHEL/CentOS 6

The older versions of Jinja2 in RHEL/CentOS 6 required assertion tasks using the map filter to be skipped.

The older version of git required gzip compression to be skipped on RHEL/CentOS 6.

* Account for ansible_distribution_major_version missing

(cherry picked from commit a047fe0e4c)
2017-10-18 14:14:24 -07:00
Jordan Borean
466baba040 win_regedit: fix extra info coming into stdout (#31813)
(cherry picked from commit 888de842b3)
2017-10-18 14:09:18 -07:00
Zubair Lutfullah Kakakhel
5f8a126d35 vmware_vm_facts: Add error check for config.vm (#31629)
Add a simple check to see if vm.config exists before looking for
vm.config.hardware
(cherry picked from commit 4034630625)
2017-10-18 14:07:14 -07:00
Sam Doran
0afc3ae3ed Ensure valid_plugin_bin is defined
Fixes #31824

(cherry picked from commit 2c8382eb87)
2017-10-18 14:05:23 -07:00
John R Barker
df85dc55fb Document backup_path (#31844)
Fix a few consistency issues at the same time
(cherry picked from commit 598084fbc8)
2017-10-18 14:03:27 -07:00
Brian Coca
d36c582787 add all group vars back to implicit localhost
fixes #31857
reverts #31425

(cherry picked from commit 7fe6a8dab7)
2017-10-18 13:58:29 -07:00
James Cammarata
0aa1442c91 Fix static determination for include_tasks
An incorrect removal of a conditional resulted in include_tasks falling
through to the old static detection mechanism incorrectly. This restores
the previous conditional check.

Fixes #31593

(cherry picked from commit 3ef4f7e847)
2017-10-11 17:31:13 -07:00
Jacob Floyd
b1038b7903 Fix Inventory Plugin Loading (#31605)
This change makes the PluginLoader use DEFAULT_INVENTORY_PLUGIN_PATH setting.
Inventory Plugins were only being loaded the 'inventory_plugins' folder of the current directory,
as well as the ansible-provided inventory plugins (e.g. `/path/to/site-packages/ansible/plugins/inventory`).
(cherry picked from commit 0371d0deda)
2017-10-11 17:28:46 -07:00
Ganesh Nalawade
e001fb7c14 Fix rollback in junos_config (#31424) (#31563)
* Fix rollback in junos_config (#31424)

* Fix rollback in junos_config

Fixes #30778

*  Call `load_configuration` with rollback id in case
   the id is given as input
*  Pass rollback id to `get_diff()` to fetch diff from device

* Fix unit test

(cherry picked from commit 88da95bb77)

* Update changelog
2017-10-11 15:28:42 +05:30
Brian Coca
daa2810410 fix paths to actually be config file relative (#31533)
* fix paths to actually be config file relative

also allow to unfrack paths for 'not cwd'
only use -i 'localhost,' for adhoc in pull
(cherry picked from commit 3886f80e44)
2017-10-10 19:17:39 -07:00
Matt Davis
c1254a8108 improve become/runas error messaging on bogus/missing username (#31551)
(cherry picked from commit a4ceb4c35f)
2017-10-10 16:54:35 -07:00