Commit Graph

29666 Commits (ecb38fdf73a0beb89e9505157a2ea20c96f666d7)
 

Author SHA1 Message Date
James Cammarata ecb38fdf73 New release v2.3.1.0-1 9 years ago
James Cammarata 87578049a0 Updating CHANGELOG for final release 9 years ago
James Cammarata fb636cb6f0 New release v2.3.1.0-0.2.rc2 9 years ago
James Cammarata f67a59bce6 Also check the iterator for failed host status in linear strategy
When only looking at the failed state of the TaskResult, certain failures
cause the linear strategy to fail out sooner than it should and not execute
the always portion of blocks.

Fixes #24301

(cherry picked from commit f217dae938)
9 years ago
jhawkesworth 8d0ea29df0 Added win_copy recursive integration test with trailing path separator. (#24523)
This is a reproducer for https://github.com/ansible/ansible/issues/23559

Tests will fail until https://github.com/ansible/ansible/pull/23581 is merged

Note that I believe another commit is also needed for this to work,
specifically the change from: https://github.com/ansible/ansible/pull/23326
(cherry picked from commit b46c098581)
9 years ago
Dag Wieers 1a8d6fb4cb win_copy: Fix recursive copy (#23581)
This fixes #23559.

This should be backported to v2.3 branch too.
(cherry picked from commit 9cd6f1bf91)
9 years ago
Brian Coca 598b34a326 updated changelog with backported fixes 9 years ago
Abhijeet Kasurde bffa355c6c Include error exception in AnsibleError
- Use to_native instead of str

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit f9b836a901)
9 years ago
jctanner a5e6639739 sysctl: switch basestring to string_types (#24277)
(cherry picked from commit 08a3ea2221)
9 years ago
pdasilva daf2b5e5fb Changed assemble_from_fragments to use os.path.join (#24909)
Fixes #19437
(cherry picked from commit f8e47e2204)
9 years ago
Anton Kasimov 3ad37b320f Bugfix for setting user groups on OpenBSD
(cherry picked from commit 2e392f47c8)
9 years ago
kgottholm 1cd78b91d9 Letsencrypt fix (#24906)
* Replaced deprecated cmp with custom condition

References  #24756

* Fix PEP 08 indention

(cherry picked from commit 16d522cf2c)
9 years ago
pdasilva 74f6c46e46 Converted the response from _get_url_data using to_native (#24901)
Updated the exception message to no longer use e.message.
Fixes #24526
(cherry picked from commit 45e4b8f97a)
9 years ago
Trishna Guha 97da8e161b Remove deprecation for username/password eos_user, nxos_user and Doc update (#24880) (#24893)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 9fb9c00092)
9 years ago
Phil Huang e5f4d2b9c2 Fixed wrong variable in cumulus network module (#23950)
Signed-off-by: Phil Huang <phil_huang@edge-core.com>(cherry picked from commit 98a8b967d2)
9 years ago
mattwwarren b99f4892d7 remove self from function outside of class (#24017)
* remove self from function outside of class

* fix indentation

(cherry picked from commit 45ac28ba04)
9 years ago
Matt Martz 7849e595b1 Base changes required to allow winrm to work on py3 (#24744)
(cherry picked from commit e7d8ebf080)
9 years ago
Matt Martz 4542e83fa0 Convert some more base64 strings to text for winrm, to support async and become (#24796)
(cherry picked from commit 1eed6c5b3d)
9 years ago
Matt Davis c7b3e420b7 add segfault detection to TQM
* prevents indefinite hangs when a worker segfaults
(cherry picked from commit 569377e951)
9 years ago
Dylan Silva ac8cb2a106 Downgraded more modules from Curated to Community (#24751) (#24784) 9 years ago
Trishna Guha af417120e1 Fix transport getting set to None when not set explicitly (#24769) (#24773)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit feafae70b5)
9 years ago
Ganesh Nalawade 3b82490c6f Save commit_timeout as string in junos_config (#24761) (#24764)
Fix converts commit_timeout to string as
Elementree.SubElement requires text as string.

Fixes #24611

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 2f955e7da8)
9 years ago
Adam DeConinck c5067cff6b Fix for ansible/ansible-modules-core#1568
When checksums of local and remote files match, and when follow = True,
determine if remote destination is a symlink. If so, de-reference it and
pass the link target to the file module as 'dest'.

This change fixes an edge case in file copy behavior when:

- 'dest' is a symlink to some other file ('realdest')
- follow = True
- the checksums of the source file, 'src', and the symlink target, 'realdest',
  match.

Because the checksums match, the copy module is skipped and the file module
is invoked directly with 'dest' = the symlink, and 'src' = the source of the
copy module, whether that source is present on the target machine or not.

When 'src' doesn't exist on the target machine, this leads to an error that
looks like this because it can't change the target of the symlink:

TASK [copy] ********************************************************************
fatal: [192.168.56.101]: FAILED! => {"changed": false, "checksum": "f572d396fae9206628714fb2ce00f72e94f2258f", "failed": true, "gid": 1000, "group": "ajdecon", "mode": "0777", "msg": "src file does not exist, use \"force=yes\" if you really want to create the link: /tmp/issue1568/dest_dir/source", "owner": "ajdecon", "path": "/tmp/issue1568/dest_dir/dest", "size": 8, "src": "source", "state": "link", "uid": 1000}

When the path 'src' *does* exist on the target machine, the file module makes
this the symlink "dest -> src" instead of "dest -> realdest"... even if the
checksum of 'src' on the target machine is different from the checksum of 'src'
on the machine where Ansible is running.

(cherry picked from commit 2f74f6738d)
9 years ago
James Cammarata 180ce9ffe6 Avoid default serialization of classes in dump_attrs
For playbook base objects, when dumping attributes via dump_attrs() an
attribute like loop_control is a class. Using the default serialization
for these is slow and consumes a lot of memory. Since LoopControl is also
based on the Base class, we can use serialize() instead and save a lot of
resources.

This also adds a from_attrs() complimentary method to nicely turn the
dumped attrs back into proper field attributes.

Fixes #23579

(cherry picked from commit 78478e80ea)
9 years ago
Matt Clay 3a6fd9448e Limit sphinx version on python 2.6. (#24678)
* Limit sphinx version on python 2.6.
* Fix issues identified by rstcheck.

(cherry picked from commit 9178e176b5)
9 years ago
James Cammarata 7e605f4e84 Use delegated vars for the delegated host name
In _process_pending_results (strategy/__init__.py), we were using the delegate_to
field directly from the original task, which was not being templated correctly.
As an alternate to #23599, this patch instead pulls the host name out of the delegated
vars passed back in the task result dictionary to avoid having to re-template things.

Fixes #23599
Fixes #20508

(cherry picked from commit e5cd675b38)
9 years ago
Brian Coca f7318ec891 updated changelog with bugfix 9 years ago
Abhijeet Kasurde 4506da6a6f Fix UnboundLocalError in basic.py
* Fix for UnboundLocalError while accessing deprecations
  in result
* Add Unit test

Fixes #24592

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 764b4b20ec)
9 years ago
Mohammed Naser a43374ed32 Set facts type to dict
With newer versions of ansible, module arguments are assumed to
be strings unless otherwise specified.  Our 'facts' argument is
expected to be a dictionary, so tell ansible that.

Without this, the argument will arrive as a string and be written
to the facter file inside string quotes.  Facter will produce the
following error:

  undefined method `each' for #<String:0x000000016ee640>

This was originally fixed and found in the Ansible Puppet role which
is maintained by the OpenStack infrastructure team.

8d0f0bfd0a
9 years ago
Ganesh Nalawade cc18296cc5 Fix timeout issue in ansible-connection (#24556) (#24579)
Fixes #24520 ansible-connection needs
to wait on timeout value of play-context
instead of ssh default timeout
(cherry picked from commit 5ec7f40196)
9 years ago
Eric Beahan d94ac763b6 removing folded style formatting for synopsis (#22746)
(cherry picked from commit e539726543)
9 years ago
Toshio Kuratomi 40ea76cf5a Add bugfixes to changelog 9 years ago
Toshio Kuratomi cdd6ab000b Fix template not showing a diff with a directory
Template can take a directory as the destination.  When that's the case,
we need to diff between the source and the file inside of the directory.
That happened when the directory was specified with a trailing slash but
not when it was specified on its own.  This change fixes that.

Fixes #24413

(cherry picked from commit 548cacdf6a)
9 years ago
Toshio Kuratomi 58438762a1 Fix import of shlex_quote
the backport here 1f3f4cf702 forgot that
in ansible-2.3, the six library in ansible.module_utils is only 1.4.
1.4 doesn't have shlex_quote.  Importing it from ansible.compat works
for ansible-2.3.
9 years ago
Toshio Kuratomi 41e3027fda Fix pam_limits writing text to a file opened in binary mode
Fixes #24392

(cherry picked from commit 16325f6f15)
9 years ago
Dylan Silva 6f92ca058a Downgrading module from core to community (#24463) (#24512) 9 years ago
Brian Coca 5a47644dc6 added bugfix to changelog 9 years ago
Brian Coca 1f3f4cf702 deal with null/none connections
fixes #23621
pushed 'connection resolution' to play_context
override fieldattribute getter

(cherry picked from commit c50cf22d52)
9 years ago
Matt Davis 5f0be9dcd0 slightly increase win_async_wrapper fire and forget sleeptime
* should fix Shippable timeouts when AWS CPU credits are low- right on the bubble of failure w/ 5s execution
(cherry picked from commit ead23783be)
9 years ago
James Cammarata 5a3f52d988 New release v2.3.1.0-0.1.rc1 9 years ago
John R Barker 15f635f7c3 Reference correct variable and key for role expiry (#23397) (#24405)
Previously, this module could throw the following error message:
    NameError: global name 'current_roles_attrs' is not defined

The referencing key should also match the name of the column, which is
rolvaliduntil, not rol_valid_until
(cherry picked from commit c5adf08c40)
9 years ago
John R Barker b87ffb2082 Check if api_key and app_key before proceeding (#24336) (#24403)
Fix adds check if app_key and api_key provided by
user is correct or not. If this combination is wrong
then fail with appropriate error message given by
Datadog server

Fixes https://github.com/ansible/ansible/issues/24325

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit e342b281d8)
9 years ago
Matt Davis 787303284f fix spurious warnings with ansible_winrm_kinit_X args (#24380)
* added to pywinrm arg whitelist
* clarified error text on kinit_mode error
* fixes #23822
(cherry picked from commit 98ff93b2db)
9 years ago
James Cammarata a1886911fc Fixing security issue with lookup returns not tainting the jinja2 environment
CVE-2017-7481

Lookup returns wrap the result in unsafe, however when used through the
standard templar engine, this does not result in the jinja2 environment being
marked as unsafe as a whole. This means the lookup result looses the unsafe
protection and may become simple unicode strings, which can result in bad
things being re-templated.

This also adds a global lookup param and cfg options for lookups to allow
unsafe returns, so users can force the previous (insecure) behavior.

(cherry picked from commit 72dfb1570d22ac519350a8c09e76c458789120ed)
9 years ago
Martin Kopta ab399146b4 fixed yum.parse_check_update regex (#24331)
Output of `yum check-update` can contain lines with long package names and long
repository label names, which will be broken into multiple lines, which need to
be sanitized. The solution to this has been fixed and refactored in 2.3 in form
of parse_check_update(), but it still contains subtle bug, which makes such
multi-lines invisible to later logic (such packages aren't included in
parse_check_update()) output. The problem is caused by using '\1' in re.sub(),
instead of proper r'\1', which literally puts unicode symbol \1 into resulting
output.
(cherry picked from commit c4ad0f86c7)
9 years ago
Adrian Likins 572c07ddb3 Fix vaulted vars templating
Use the default repr of AnsibleVaultEncryptedUnicode.data instead
of a custom one, since jinja templating ends up using the repr()
results.

Fixes #23846, #24175

(cherry picked from commit 7fe2064162)
9 years ago
Toshio Kuratomi 2cab2118a1 Give user whatever information we have from ssh-keyscan
ssh-keyscan isn't very verbose about errors.  Give the user whatever
information we have available even if it isn't much.  At least they will
know how we were running ssh-keyscan and why there's an error now.

Fixes #19440

(cherry picked from commit 4bf8071889)
9 years ago
Dane Summers f57d7bb016 Fixes #23285 (#24291)
Makes subversion module --check fail when modified files are in
repository.
(cherry picked from commit 4bd04c299b)
9 years ago
Joris (J.J.M.) Weijters 4a7230aa3c adjusted descriptions in DOCUMENTATION, and fixed type in RETURN
(cherry picked from commit 2a7ce1059d)
9 years ago
Matt Martz 228553f931 Switch last remaining decode to to_text (#24269) 9 years ago