Commit Graph

333 Commits (fafc35911adc4db00cf0313c508afe4387165d4d)

Author SHA1 Message Date
James Cammarata 0fa5100a2c Merge branch 'fix-7596' of https://github.com/kilburn/ansible into kilburn-fix-7596 2014-06-03 10:26:25 -05:00
Jack Neely 2fda9bc743 template.py: Handle purposely raised exceptions in lookup()
If a lookup plugin is run by the lookup() template method it should pass
along any AnsibleError (or child exception classes) rather than just eat
them.  These exceptions are purposely raised by the plugin.
2014-05-30 16:41:20 -04:00
Marc Pujol d0f82e94e8 Ensure there are no duplicates in the merged/intersected lists 2014-05-30 15:47:18 +02:00
Marc Pujol f892cc798c Merge and intersect lists without using sets.
Using sets for these operations is dangerous because sets cannot contain
certain object types (such as lists) and their iteration order is
undefined.

Fixes #7596
2014-05-30 09:07:57 +02:00
James Cammarata 92f16b3d6f Merge pull request #7539 from jimi-c/issue_7503_freebsd_su_fixes
Fixes for su on freebsd
2014-05-25 15:09:58 -05:00
Abhijit Menon-Sen f6792b724a Don't double (or triple) up common error messages
process_common_errors() was called thrice, each time appending to the
existing error message, and leading to confusing repetition in the
message that was finally displayed.

Fixes #7498
2014-05-23 21:05:42 +05:30
James Cammarata 1e672a0fec Fixes for su on freebsd
Addresses multiple issues when using su on freebsd including
* su prompt differs between platforms, so turned that check into a
  regex comparison instead of a simple string comparison
* not using '-c' after su causes problems, so added that for all
  platforms
* fixed quoting issues due to multiple uses of '-c' introduced by
  the above fix

Fixes #7503
Fixes #7507
2014-05-23 10:06:09 -05:00
James Cammarata 7faecd54b0 Merge pull request #7388 from jimi-c/issue_7384_vars_files_include
Pass vars_files on to included playbooks too
2014-05-14 14:52:33 -05:00
James Cammarata a9311a5dcb Merge branch 'file_new_dirs_perms' of https://github.com/bcoca/ansible into bcoca-file_new_dirs_perms 2014-05-14 13:53:08 -05:00
James Cammarata 85bd6810bb Pass vars_files on to included playbooks too
Fixes #7384
2014-05-14 08:37:47 -05:00
Brian Coca 8a84b22d76 bumped to 1.7 2014-05-06 23:43:07 -04:00
James Cammarata 8e45fa9b63 Moving display-related functions to new module in utils 2014-04-30 15:33:46 -05:00
James Cammarata 6069ff6e9e Adding a new system_warnings config option to supress warnings 2014-04-30 14:44:10 -05:00
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
Brian Coca c5d5481ebb added doc noting the change in behaviour 2014-04-27 09:37:44 -04: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