Commit Graph

291 Commits (547c0d81408864e267184536fbdf04f281576f26)

Author SHA1 Message Date
James Cammarata b4f9631e4c Revert "remove complex_args_hack as it was only needed for Baby JSON"
This reverts commit a6029264b8.

Fixes #9400
2014-10-22 11:00:24 -05:00
James Cammarata 4c47c2273a Use convert_bare instead of string formatting for raw vars in debug action plugin 2014-10-22 11:00:24 -05:00
Toshio Kuratomi feb9ed1de8 Fix template module incorrectly handling mode when dest is a directory
Fixes #9350
2014-10-21 00:22:24 -04:00
Toshio Kuratomi a6029264b8 remove complex_args_hack as it was only needed for Baby JSON 2014-10-08 13:26:25 -04:00
James Cammarata 19703617b8 Fix action_plugins for modules not respecting check mode
Fixes #9140
2014-09-25 11:11:52 -05:00
James Cammarata 4e9c061b35 Also make sure the dest param is expanded locally before recalculating 2014-09-23 15:36:24 -05:00
James Cammarata e47f6137e5 Push the expanduser call on the source down to slurp rather than fetch
Also moves the calculation of the destination file name until after
the slurp of the file contents, since the source as returned by slurp
may now be different, so we want to use that expanded path locally.

Fixes #8942
2014-09-23 15:32:07 -05:00
James Cammarata b376e208c7 Adding "follow" param for file/copy options
Also modifies the template action plugin to use this new param
when executing the file/copy modules for templating so that links
are preserved correctly.

Fixes #8998
2014-09-16 12:05:55 -05:00
James Cammarata cdf938f2c2 Ensure remote files are chmod'd properly for su/su_user too
Fixes #8594
2014-09-15 13:15:46 -05:00
James Cammarata 0c4a7492bf Ensure checkmode is honored for templates that haven't changed
Fixes #8998
2014-09-15 11:37:53 -05:00
James Cammarata a571fd4efe Convert boolean strings from set_fact to proper boolean values
Also adds integration tests for booleanification of strings

Fixes #8629
2014-09-10 09:56:39 -05:00
Serge van Ginderachter 3c06833302 group_by: make sure new group has bigger priority than all group 2014-08-19 16:34:30 +02:00
James Cammarata 379e31883c Fix check mode issues with copy module
Fixes #8639
2014-08-18 16:02:45 -05:00
James Cammarata ee18c557ec Load group_vars for new groups loaded via add_host
Fixes #8605
2014-08-14 13:18:26 -05:00
Michael DeHaan 8c4161d4a1 Merge branch 'retf_py' of git://github.com/berendt/ansible into devel
Conflicts:
	lib/ansible/inventory/vars_plugins/group_vars.py
	plugins/callbacks/mail.py
2014-08-08 12:17:37 -04:00
James Cammarata a45c3b84f3 Avoid templating raw lookup strings 2014-08-06 13:25:14 -05:00
James Cammarata 9c1a89ff4e Merge branch 'patch-1' of https://github.com/debfx/ansible into debfx-patch-1 2014-07-31 11:41:21 -05:00
Michael DeHaan 645ab7baff Merge pull request #7950 from mesk41in/devel
Fix unsupported regexp parameter in assemble
2014-07-28 12:01:12 -04:00
someda 1b1d5d0d3d fix an issue that copying directory will fail when trying to change file attributes and the target file already exists on remote
- the issue was introduced by the commit 84759faa09
2014-07-24 14:03:36 +09:00
Benno Joy ac85d8444b fix for unarchive 8257 2014-07-23 14:50:16 +00:00
James Cammarata 84759faa09 Security fixes:
* Strip lookup calls out of inventory variables and clean unsafe data
  returned from lookup plugins (CVE-2014-4966)
* Make sure vars don't insert extra parameters into module args and prevent
  duplicate params from superseding previous params (CVE-2014-4967)
2014-07-21 11:20:49 -05:00
Serge van Ginderachter 4e9a253bef Load existing group_vars file for new group_by group
if it was not loaded yet, which happens if that group
didn't exist yet in the inventory.

fixes #8159
2014-07-16 21:16:27 +02:00
Felix Geyer 0ebd19e97b Fix regression: Sanitize sudo success_key from stdout
Commit 7e3dd10 caused a regression with sanitizing the sudo success_key from stdout.
There is no newline in front of SUDO-SUCCESS when using sudo.
This change adapts the regex to make the line break optional.

Tested on Ubuntu 14.04.
2014-07-16 18:14:35 +02:00
James Cammarata b8ac094eaa Tweak to only show msg on assert failure if set 2014-07-08 14:05:24 -05:00
James Cammarata 16332b8488 Merge branch 'assert-with-msg' of https://github.com/darkk/ansible into darkk-assert-with-msg 2014-07-08 13:56:08 -05:00
Leonid Evdokimov d94395f48c assert: add optional `msg` argument
Sample playbook when it may be useful:
```
- uri: return_content=yes url={{ api_base }}/action/{{ inventory_hostname }}
  register: output
- assert:
    msg: '{{ output.json | to_nice_json }}'
    that:
      - output.json.foo != "bar"
      - output.json.boo == 42
```
2014-07-07 19:05:17 +04:00
James Cammarata ff04b2b532 Allow empty yaml vars files
Fixes #7843
2014-07-04 23:10:32 -05:00
mesk41in 488aec3936 Fix unsupported regexp parameter in assemble 2014-06-27 13:54:59 +04:00
Paul Sokolovsky f8bf9cdeec Handle TemplateNotFound to render more helpful error message.
At the point the exception is handled, it is likely due to error loading
a sub-template included from main template. Besides file not found, it
can be caused also by include path failing Jinja2 checks. Now, when
rendering the exception from Jinja, it will include exception name. This
will give basic context or *what* the error is.

Fixes #7103
Fixes #7105
2014-06-23 15:02:58 -05:00
Chris Church 615f70e3f4 Fix missing space in script action plugin. 2014-06-19 21:54:21 -05:00
Chris Church 243cd877ae Add integration tests for fetch/slurp, make powershell fetch/slurp work as close as possible to existing fetch/slurp modules. 2014-06-19 14:25:28 -05:00
Chris Church 21ba529fbe Fixes/notes related to slashes in remote paths. 2014-06-19 14:24:14 -05:00
Chris Church f7af29680b Add default license boilerplate, refactor common powershell code, fixes for raw/script modules. 2014-06-19 14:24:13 -05:00
Chris Church 5dcaa30476 Add shell_plugins to abstract shell-specific functions out of runner, add winrm connection plugin, add initial Windows modules. 2014-06-19 14:24:12 -05:00
James Cammarata 188ab7b952 Check groupnames for None as well as an empty string in add_host
Fixes #7585
2014-05-29 11:01:11 -05:00
WAKAYAMA shirou 56880b76bb fix UnicodeEncode error when using pause module with unicode prompt. 2014-05-22 00:21:14 +09:00
James Cammarata 38c2c60849 Do not base synchronize source on the inventory directory
Fixes #7366
2014-05-12 12:02:38 -05:00
James Cammarata 77a47dbb2d Merge pull request #7304 from jimi-c/issue_7296_synchronize_relative_path
Make sure dwim'd relative path ends in a "/" if the original does
2014-05-07 12:58:04 -05:00
Chris Church f9c74d6e57 Add integration tests for group_by module. Fixed bug introduced by ansible/ansible#7273 while also fixing issue described in ansible/ansible#6953 2014-05-06 22:30:37 -04:00
James Cammarata 4d118d1c72 Make sure dwim'd relative path ends in a "/" if the original does
Fixes #7296
2014-05-06 13:54:41 -05:00
James Cammarata fd03cc04e6 Merge branch 'devel' of https://github.com/denisphillips/ansible into denisphillips-devel 2014-05-05 09:22:01 -05:00
Veeti Paananen d6f4d9b76d Fix error handling on missing dest with unarchive
fixes #7107
2014-05-04 18:22:00 +03:00
Denis Phillips cd0134d290 Used module_args passed to function instead of from runner 2014-05-04 08:49:12 -04:00
Christian Berendt 6676720ce5 fixed typos found by RETF rules in PY files
rules are avaialble at https://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser/Typos
2014-05-03 18:40:05 +02:00
Jeffrey 'jf' Lim 0bf1a27393 Fix "no_log=True" option for copy module (fixes #7193) 2014-04-30 02:24:16 +08:00
Cédric RICARD b8b0865ec0 Missing 'base64' import 2014-04-25 00:11:27 +02:00
James Cammarata 38b49476f8 Merge branch 'raw-script-su-support' of https://github.com/sivel/ansible into sivel-raw-script-su-support 2014-04-23 10:02:13 -05:00
James Cammarata 40b958e348 Don't turn complex args back into a k=v string for the synchronize module
Fixes #6951
2014-04-14 16:35:16 -05:00
James Tanner 5a65dc3b6a Fixes #6820 fix erroneous missing vault password error when using the template module 2014-04-04 13:06:35 -04:00
James Cammarata 82b24c162e Adding delimiter fixes to action_plugin + fixing local assembling with a delimiter
Also added a new integration test for assemble using local assembly
with a delimiter.
2014-04-03 16:32:35 -05:00