Commit Graph

319 Commits (f8ca24b0469f14b1f71f956a2733fc8b4c889e77)

Author SHA1 Message Date
James Cammarata 4cadcccc48 Catch pycrypto warning about gmp and show a nice warning on stderr 2014-04-29 14:28:14 -05:00
James Cammarata 1576e8d611 Adding missing options to the file documentation fragment 2014-04-28 15:31:24 -05:00
James Cammarata b9d8b3b911 Merge pull request #7132 from jimi-c/issue_6601_hide_vault_yaml
Hide YAML content on syntax errors when a vault password is specified
2014-04-24 00:28:12 -05:00
James Cammarata 460794d697 Merge pull request #7140 from jimi-c/issue_6962_traceback_callbacks_unicode
Fix handling of non-JSON lines in responses
2014-04-23 19:53:42 -05:00
James Cammarata 5e598c5337 Fix handling of non-JSON lines in responses
Garbage lines with ' = ' in them were causing parsing errors,
where key=val lines should not have spaces around the equals.

Fixes #6962
2014-04-23 15:17:31 -05:00
James Cammarata 93b5769d94 Hide YAML content on syntax errors when a vault password is specified
Fixes #6601
2014-04-23 09:23:07 -05:00
James Cammarata 75e0b7a5cf Make sure umask is set restrictively before creating any vault files 2014-04-18 13:38:59 -05:00
James Cammarata 2cc4ac2e75 Catch traceback caused by permissions errors during a local md5 sum
Fixes #6948
2014-04-14 12:41:21 -05:00
willthames 509561f658 Moved AWS modules over to common module fragments
Created common module doc fragment, and applied to all
modules that use ec2_connect or connect_to_aws as
they definitely share the common doc fragments
2014-04-09 21:19:12 +10:00
James Tanner 2d33cd1b5d Fixes #6894 add missing file and remove debug line 2014-04-08 13:22:23 -04:00
James Tanner 68cd7258b6 Fixes #6894 create docs fragment for files 2014-04-08 13:20:15 -04: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
Michael DeHaan 1fa19e29e8 Use common file argument system previously implemented by @sivel for rax modules on the file modules as well (copy/file/template).
Application to other cloud providers would make very good sense.
2014-04-03 16:52:39 -04:00
Matt Martz 7b5f89ec7c Use PluginLoader for module docs fragments 2014-04-03 16:52:39 -04:00
Matt Martz bb6f7a267a Add support for shared module documentation fragments 2014-04-03 16:52:39 -04:00
James Cammarata ee0a0b492b Allow isprintable() util function to work with unicode
Fixes #6842
2014-04-03 15:29:51 -05:00
James Cammarata 6f34a6336f Differentiate decryption failures from empty data files in ansible-vault
Fixes #6822
2014-04-02 15:52:08 -05:00
James Cammarata a4df906fc9 Fixes to safe_eval 2014-04-01 16:23:22 -05:00
Cristian Ciupitu 1eaf85b89f Micro-optimization: replace s.find(x)!=-1 with x in s
timeit shows a speedup of ~3x on Python 2.7.5 x86_64.
It also makes the code a bit shorter.
2014-03-27 20:35:20 +02:00
James Tanner 2a976ac313 Fixes #5059 Ignore lookup failures when templating a task name 2014-03-26 11:28:43 -04:00
jctanner 7b8d1c0ffd Merge pull request #6580 from ramondelafuente/fix-vault-editor-call
Changed call to EDITOR to allow for parameters
2014-03-25 15:48:59 -04:00
Ramon de la Fuente c79c001bfb Changed call to EDITOR to allow for parameters
The EDITOR environment variable is used to create and edit files in the vault.
But if the EDITOR variable contains parameters, subprocess.call() breaks.

This fixes the EDITOR environment variable to be safely split into a list.
It adds a dependency on shlex.
2014-03-25 20:29:03 +01:00
James Cammarata 8c7828d469 Tweaking error message resulting from undefined template variables
Fixes #5114
2014-03-25 11:56:55 -05:00
Michael DeHaan c42dbf80a2 Merge pull request #6586 from sivel/probline-logic-fix
Fix logic in process_common_errors for unbalanced quotes
2014-03-19 17:45:49 -04:00
James Tanner b8f627d1d5 Prevent rewriting the encrypted file if decryption fails 2014-03-19 16:31:03 -04:00
James Tanner e71857fbdf Addresses #6579 Only strip vault passwords if given 2014-03-19 16:08:35 -04:00
James Tanner 8c2e1e2baa Addresses #6579 Disallow vault passwords with newline characters by stripping them in utils 2014-03-19 15:56:14 -04:00
James Cammarata a9000e7f3a Making the error messages for bad key/dir permissions more understandable
Fixes #6254
2014-03-19 14:09:03 -05:00
Matt Martz 2aaecc5afa Fix logic in process_common_errors for unbalanced quotes 2014-03-19 13:49:31 -05:00
Michael DeHaan 94e3350b38 Catch a unquoted line error. Fixes #6532 2014-03-17 17:15:42 -04:00
James Tanner ad70e9bcd6 Fixes #6227 skip non-unicode strings and catch decode errors silently in template_from_string 2014-03-17 16:54:25 -04:00
James Tanner b14c658532 Fix concatenation for with_file 2014-03-17 10:38:22 -04:00
Michael DeHaan fd0ff6f174 Merge pull request #5711 from sivel/plugin-realpath
Use realpath for plugin directories instead of abspath
2014-03-16 15:42:47 -05:00
Cristian Ciupitu 0749112286 Micro-optimization: replace s.find(x)!=-1 with x in s
timeit shows a speedup of ~3x on Python 2.7.5 x86_64.
It also makes the code a bit shorter.
2014-03-16 13:10:28 -04:00
Michael DeHaan d1753046e0 Revert "Correctly catch template errors without returning invalid data"
This reverts commit 3cd7d47b7e.
2014-03-13 07:46:19 -04:00
James Tanner 0e38f5dfdc Check for hash availability during vault operations 2014-03-12 09:38:29 -04:00
James Tanner 6740a1f342 Wrap crypto.hash imports with try/except 2014-03-10 19:44:08 -04:00
Michael DeHaan 2fa6110961 Update the message about pycrypto to include that python-devel must be installed. 2014-03-10 17:23:37 -04:00
James Tanner 0d6f6ad282 Implement new default cipher class AES256 2014-03-10 16:15:44 -05:00
Matt Martz 4b400ca5e9 Only used stripped data for testing if the file is json, but used unstripped when actually parsing. Fixes #6348 2014-03-10 13:43:34 -05:00
James Cammarata 3cd7d47b7e Correctly catch template errors without returning invalid data
Fixes #6329
2014-03-07 14:36:54 -06:00
Michael DeHaan e486dbab04 Use the loaded variable since we have it assigned, not just for error detection. 2014-03-06 22:15:21 -05:00
Michael DeHaan 3f07ec3d73 Fixup JSON error reporting in previous commits. 2014-03-06 22:07:35 -05:00
Michael DeHaan 79799f6819 Allow any file that can be in YAML to also be in JSON. This is primarily done to support non-visual editors better. 2014-03-06 21:42:51 -05:00
Michael DeHaan 94a7fb60fe Allow escaped comments in inventory files. 2014-03-05 20:10:25 -05:00
Richard C Isaacson b41d8106ff Revert "Merge pull request #6287 from risaacson/fix_hash_in_var"
This reverts commit a808287451, reversing
changes made to 6129ea7566.
2014-03-05 14:49:30 -06:00
Richard C Isaacson 38abd5e20e Break this out into a reusable function and document regex shortcomings. 2014-03-05 10:50:58 -06:00
Michael DeHaan 46ec8759d5 Remove the legacy templating code, which was guarded by deprecation warnings in the previous two releases, and undocumented for a long time. use {{ foo }} to access variables instead of ${foo} or $foo. 2014-02-28 18:38:45 -05:00
Richard C Isaacson 9c8bbe2904 column must always be less than len(probline)
Fixes related to GH-5773.
2014-02-26 16:28:34 -06:00
Richard C Isaacson 585766201d When looking for double colon len(line) is longer then 1.
Addresses GH-5116.

It comes up that when parsing json that if you are missing the last double quote on the last variable and the next line is just '}' we will get an out of range error. In this instance we will also then make sure that the line is long enough to have two colons.
2014-02-26 14:25:56 -06:00