Commit graph

18201 commits

Author SHA1 Message Date
Toshio Kuratomi
fdcb419c8d Revert "Removed a force conditional (#28851)" (#32282)
This reverts commit 07acc579db.

On closer examination of this code, the conditional that had force in it
was not a parent of this one.  So handling of force is needed i both
branches.

See the recent comments on #23391
(cherry picked from commit 2e12a5f8c2)
2017-10-28 07:29:54 -07:00
Benjamin Schweizer
1e318f6224 Enable TLS1.1 and TLS1.2 for win_package (#32184)
(cherry picked from commit f2023a84a6)
2017-10-27 12:04:31 +10:00
Toshio Kuratomi
c495103996 New release v2.4.2.0-0.1.beta1 2017-10-26 17:00:44 -07:00
awkspace
124b3dce50 Fix ec2_lc failing to create multi-volume configurations (#32191) 2017-10-27 09:08:57 +10:00
Sloane Hertel
2a42800c44 An availability zone will be selected if none is provided. Set az to an empty string if it's None to avoid traceback. (#32216) 2017-10-27 09:07:19 +10:00
Ryan Brown
a0c123a86e [cloud] Bugfix for aws_s3 empty directory creation (#32198)
* [cloud] Bugfix for aws_s3 empty directory creation

Backport of #32169

* Only make DeleteObject call if there are objects to delete

* Remove pauses from integration tests
2017-10-26 15:04:00 -04:00
Sam Doran
bb7977c5b4 Return all elements in a more robust way
If a trailing ':' is set or not, always return all secrets from a path.

Update examples.

(cherry picked from commit 6a6ea663ea)
2017-10-26 14:50:26 -04:00
Sam Doran
4a8ffe56a9 Enable ECHO in prompt module (#32083)
* Enable ECHO in prompt module

Fixes #14160

* Set flags to make it possible to edit echoed input as well as hide control charcters

Only do this if a time limit is not set.

* Consolidate settings

(cherry picked from commit 104934c095)
2017-10-26 12:39:53 -04:00
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