Brian Coca
e0573d3099
make vi the default editor if no EDITOR
...
fixes #15577
10 years ago
Toshio Kuratomi
b8a988e922
bytes when passing to os.path.* and opening the file, text at other times
...
Fixes #15644
10 years ago
Toshio Kuratomi
e386a51cf8
Trnasform file name to bytes before opening it to avoid unicode errors if python tries to encode it implicitly
10 years ago
Brian Coca
5940d3d45b
fixes to vault/copy
...
rm _del_ as it might leak memory
renamed to tmp file cleanup
added exception handling when traversing file list, even if one fails try rest
added cleanup to finally to ensure removal in most cases
10 years ago
Cambell
cdf6e3e4bf
feature/copy-vault-dataloader: Add method get_real_file(file_path) to dataloader
...
- get_real_file will decrypt vault encrypted files and return a path to
a temporary file.
- cleanup_real_file will remove a temporary file created previously with
get_real_file
10 years ago
James Cammarata
f2713f764c
Take previous jinja2 blocks into account in splitter when we see quotes
...
Previously, split_args() was not taking print/block/comment depth into account
when splitting things, meaning that if there was a quote character inside an
un-quoted variable (ie. {{ foo | some_filter(' ') }}), it was incorrectly
splitting on the quotes instead of continuing to append to the previous param.
Fixes #13630
10 years ago
Konstantin Suvorov
1c922135a0
show error context in args splitter exception
10 years ago
Toshio Kuratomi
2ba4428424
Catch ValueError as well because of El Capitan provoking a bug in python2's subprocess
...
Fixes #14895
10 years ago
Matt Clay
5b79ed77e7
Use to_bytes on filenames in filesystem calls.
10 years ago
Brian Coca
e762095497
better task parsing errors
...
fixes #14790
10 years ago
Brian Coca
cc3cb0f65e
fix issues with older yaml lib versions
...
also added missing json import and removed unused ones
10 years ago
Brian Coca
ea5e089056
restore initial json parsing attempt to loader
...
fixes issues with extra vars json strings not being parsed correctly by the yaml parser
10 years ago
Toshio Kuratomi
4657be4eab
Transform pathnames to bytes before passing on to os.path functions
10 years ago
James Cammarata
7c049c3200
Fixing up jsonify and adding unit tests
10 years ago
Toshio Kuratomi
1f2595306a
normalize path components to unicode before combining or operating on them
...
Note that this will break if we deal with non-utf8 paths. Fixing this
way because converting everythig to byte strings instead is a very
invasive task so it should be done as a specific feature to provide
support for non-utf8 paths at some point in the future (if needed).
10 years ago
Toshio Kuratomi
ef8bec18bf
Use a unicode format string so that we don't convert to byte strings
...
Fixes #14349
10 years ago
Matt Martz
38b663471d
Merge pull request #14311 from sivel/unsafe-yaml-constructor
...
Add new 'unsafe' YAML constructor
10 years ago
Brian Coca
0f73fb0d6f
better error messages when failing to decrypt
10 years ago
Jonathan Davila
b220051c14
Added more info to the no action detected error
...
Error fix
10 years ago
Matt Martz
8bc2d3be9c
Add new 'unsafe' YAML constructor
10 years ago
Brian Coca
db375c22af
load now does not modify the incomming data
...
also removed json loader as yaml loader can do both
10 years ago
Brian Coca
c063803a91
raise AnsibleError as an 'expected' exception
...
fixes #14065
10 years ago
Brian Coca
f26adcc7da
avoid shredding empty files, also x/0
...
also cleaned up unused import and exception var
10 years ago
James Cammarata
46e515131e
Allow module args as k=v pairs when using the module: option with local_action
...
This task format is valid in 1.x, but was broken in 2.x:
- local_action:
module: shell echo "hello world"
10 years ago
Toshio Kuratomi
4958180333
use integer division instead of floating point division.
...
Fixes #13855
10 years ago
Eric Feliksik
11ce08b9dd
cleaner implementation and random chunk length.
10 years ago
Eric Feliksik
151e09d129
use unix shred if possible, otherwise fast custom impl; do not shred encrypted file
10 years ago
Eric Feliksik
1e911375e8
add docs, remove unnecessary int() cast
10 years ago
Eric Feliksik
7193d27acc
add os.fsync() so that the shredding data (hopefully) hits the drive
10 years ago
Eric Feliksik
946b82bef7
shred ansible-vault tmp_file. Also when editor is interruped.
10 years ago
Brian Coca
75e94e0cba
allow for non standard hostnames
...
* Changed parse_addresses to throw exceptions instead of passing None
* Switched callers to trap and pass through the original values.
* Added very verbose notice
* Look at deprecating this and possibly validate at plugin instead
fixes #13608
10 years ago
James Cammarata
8716bf8021
All variables in complex args again
...
Also updates the CHANGELOG to note the slight change, where bare variables
in args are no longer allowed to be bare variables
Fixes #13518
10 years ago
James Cammarata
2b36343451
Missed one place we were appending the incorrectly escaped item to raw params
10 years ago
James Cammarata
1799de8528
Preserve original token when appending to _raw_params in parse_kv
...
Fixes #13311
10 years ago
Toshio Kuratomi
a8e015cc22
Add representers so we can output yaml for all the types we read in from yaml
10 years ago
Monty Taylor
d20e67d708
Put in trap for args being None
...
_normalize_old_style_args can return None. If it does, the loop
"for args in args" blows up.
10 years ago
Yannig Perré
2fc7c8b460
More restrictive test against variable name to allow setting variable starting with _.
10 years ago
Yannig Perré
2c54fb1339
Switch parameters validation after parsing in order to be more consistent between old and new style.
10 years ago
Matteo Acerbi
0127d32652
Fix DataLoader's docstring
...
DataLoader.__init__ doesn't take an argument named vault_password
10 years ago
Abhijit Menon-Sen
7caefa5cd9
Fix typo
10 years ago
Brian Coca
00bc74404a
vault noe preserves permissions on edit and rekey and sets a restricitve default umask for all other cases
10 years ago
Toshio Kuratomi
e3e2db1119
Improve the warning message about duplicate yaml dict keys
10 years ago
Toshio Kuratomi
4203850d1a
Break apart a looped dependency to show a warning when parsing playbooks
...
Display a warning when a dict key is overwritten by pyyaml
Fixes #12888
10 years ago
James Cammarata
86de1429e5
Cleaning up FIXMEs
10 years ago
James Cammarata
0bbe9d5bd0
Make hostvars json/yaml serializable in filters
...
Fixes #12615
10 years ago
Toshio Kuratomi
b23a083776
Make vault use a mapping of cipher name to classes instead of formatting the name for safety.
10 years ago
Toshio Kuratomi
baa309309d
Bundle a new version of python-six for compatibility along with some code to make it easy for distributions to override the bunndled copy if they have a new enough version.
10 years ago
Marius Gedminas
98958ec990
Simplify join expression
10 years ago
Marius Gedminas
56184a3d8c
Python 3: avoid %-formatting of byte strings
...
This is needed for Python 3.4 compatibility; Python 3.5 can use
`b'%s\n' bytestring` again.
10 years ago
Toshio Kuratomi
85abd61001
Add some more info to docstring
10 years ago