Nathaniel Case
e4e913b331
Override params from environment variables, if set.
...
Fix a typo while I'm in the area.
Handle having None set in module.params more intelligently
2016-03-30 17:28:30 -04:00
Brian Coca
fdb56e4bad
avoid bad path entries
2016-03-23 09:30:48 -07:00
Toshio Kuratomi
917da92e2b
Get rid of extra trailing space in log messages
2016-03-23 08:01:21 -07:00
Matthew Gamble
197e590d7c
Small comment improvement in AnsibleModule class
2016-03-23 19:22:18 +11:00
James Cammarata
0e68c6d6fe
Cleaning up use of literal_eval in basic.py AnsibleModule.safe_eval
2016-03-17 02:02:15 -04:00
Brian Coca
62ac5c047e
clarified message
2016-03-04 14:44:03 -05:00
Brian Coca
8867d73420
reject extraneous data passed to mode
...
strictly permissions are allowed, file type info should not be passed in
alternate fixes #14771
2016-03-04 14:42:29 -05:00
James Cammarata
9acb5aa176
Changing location of reduce import to not use six.moves
2016-03-01 17:06:46 -05:00
James Cammarata
b559d0e6ee
Adding py3 stub for reduce from six.moves
2016-03-01 16:55:01 -05:00
James Cammarata
e011f52557
Expanding unit tests for module_utils/basic.py
2016-03-01 13:53:13 -05:00
Brian Coca
bc41f46fec
pushed non-atomic to option of last resort
...
try to copy into place first
2016-02-15 12:08:07 -05:00
Pascal Grange
5d49f4e629
Fix related to #13981
...
When working around "bad systems that insist on not allowing
updates in an atomic manner", we should not run previous exception
management code that tries to perform atomic move in case of
exception since the dirty non atomic move has already been
performed.
2016-02-15 10:18:44 +01:00
Toshio Kuratomi
6276585882
Module params should default to str in most cases.
2016-02-10 15:22:42 -08:00
Brian Coca
f50b381dba
Merge pull request #13678 from Etherdaemon/fix_datetime_objects
...
fix for datetime exception in ecs_tasks
2016-02-09 17:07:28 -05:00
Toshio Kuratomi
1aaf5a399c
Merge pull request #14317 from resmo/feature/fail_on_missing_params
...
module_utils/basic: add generic method for checking for missing param…
2016-02-08 10:33:48 -08:00
Toshio Kuratomi
d1c2d16706
Allow setting run_command environment overrides for the life of an AnsibleModule
2016-02-07 12:46:04 -08:00
Brian Coca
ad37a91514
really only want to prevent None typep here
...
false is sometimes needed
2016-02-05 14:33:10 -05:00
Brian Coca
5679b5414c
avoid errors from possible None/False args
2016-02-04 19:39:56 -05:00
Rene Moser
11522b22c3
module_utils/basic: add generic method for checking for missing params when argspec can not be used.
2016-02-04 22:54:03 +01:00
Brian Coca
89c57666c3
fixed py3 compatibility
2016-02-04 13:14:56 -05:00
Brian Coca
70ac47ae61
allow atomic_move to not be atomic ...
...
just 'cause people build bad systems that insist on not allowing
updates in an atomic manner and force us to do them in a very
unsafe way that has race conditions and can lead to many issues.
if using this option you should really be opening a bug report with
the system that only allows for this type of update.
and now i shower though i doubt i'll feel clean
2016-02-04 13:05:24 -05:00
Brian Coca
6a62ad6c4b
hide internal params once used
2016-02-01 15:17:23 -05:00
James Cammarata
0c237c4531
Merge pull request #14191 from paulcalabro/devel
...
Added hyphen (-) as a valid character for permissions
2016-01-29 00:55:53 -05:00
Paul Calabro
901d349f45
Adding a hyphen in the perms pattern section, since doing something like
...
go=- is a quick way to strip all permissions for non-owners.
2016-01-28 13:05:10 -07:00
Toshio Kuratomi
3cf59d30f7
For synchronize, fix sudo to execute on the remote end of the connection
...
* In 2.0.0.x become was reversed for synchronize. It was happening on
the local machine instead of the remote machine. This restores the
ansible-1.9.x behaviour of doing become on the remote machine.
However, there's aspects of this that are hacky (no hackier than
ansible-1.9 but not using 2.0 features). The big problem is that it
does not understand any become method except sudo. I'm willing to use
a partial fix now because we don't want people to get used to the
reversed semantics in their playbooks.
* synchronize copying to the wrong host when inventory_hostname is
localhost
* Fix problem with unicode arguments (first seen as a bug on synchronize)
Fixes #14041
Fixes #13825
2016-01-25 19:33:31 -08:00
Toshio Kuratomi
a68d90a71a
rework run_command's env setting to not change os.environ for the rest of the module.
...
New param to run_command to modify the environment for just this invocation.
Documentation and comment adjustments.
2016-01-20 12:03:32 -08:00
Brian Coca
a56c0bc27b
module invocation info depends on verbosity
...
since we were removing it on display, this saves us even transmiting it back
2016-01-13 18:06:55 -05:00
Brian Coca
5760f0effb
dont error out on new internal vars
2016-01-12 13:17:02 -05:00
Brian Coca
477d632118
now file mode diff shows octal values
2016-01-11 19:47:47 -05:00
Brian Coca
6f2f7a79b3
add support for diff in file settings
...
this allows modules to report on what specifically changed when using
common file functions
2016-01-01 21:53:19 -05:00
Etherdaemon
0b92abaf67
Proposed fix for ansible/ansible-modules-extras#1348 due to datetime.datetime type not being matched
2015-12-27 21:36:02 +10:00
Brian Coca
9a118ce213
Merge pull request #13648 from bcoca/fix_invocation_and_moderrors
...
better module error handling
2015-12-23 10:42:40 -05:00
Michael Scherer
42b9a206ad
Fix last commit, make it python3 compatible (and py24)
2015-12-23 13:24:11 +01:00
Brian Coca
957b376f9e
better module error handling
...
* now module errors clearly state msg=MODULE FAILURE
* module's stdout and stderr go into module_stdout and module_stderr keys
which only appear during parsing failure
* invocation module_args are deleted from results provided by action
plugin as errors can keep us from overwriting and then disclosing info that
was meant to be kept hidden due to no_log
* fixed invocation module_args set by basic.py as it was creating different
keys as the invocation in action plugin base.
* results now merge
2015-12-22 23:01:56 -05:00
Brian Coca
010839aedc
fix no_log disclosure when using aliases
2015-12-22 17:15:58 -05:00
Brian Coca
474772c81c
Merge pull request #13639 from emonty/bool-conversion
...
Also convert ints to bool for type=bool
2015-12-22 10:21:18 -05:00
Monty Taylor
c60749c922
Also convert ints to bool for type=bool
2015-12-22 09:14:12 -06:00
Toshio Kuratomi
d32a885e98
Make return invocation information so that our sanitized copy will take precedence over what the executor knows.
2015-12-19 11:24:59 -08:00
Toshio Kuratomi
c8fd599e14
Merge pull request #13373 from no2a/boolean
...
BOOLEAN should contain boolean literals
2015-12-04 12:17:12 -08:00
Toshio Kuratomi
9b81c35d06
Don't compare or merge str with unicode
...
Fixes #13387
2015-12-02 20:53:50 -08:00
Arata Notsu
6d6d4f0c8e
BOOLEAN should contain boolean literals
...
It is natural that an argument_spec with choises=BOOLEAN accepts
boolean literal (True, False) though the current implementation
allows only string or int.
2015-12-01 23:51:39 +09:00
Toshio Kuratomi
e2ddc2f6ab
Call the function :-)
...
Fixes #13330
2015-11-30 12:34:20 -08:00
James Cammarata
0e447e3f41
Merge branch 'devel' of https://github.com/mathieumd/ansible into mathieumd-devel
2015-10-21 13:59:51 -04:00
Toshio Kuratomi
6e5055e786
Update the use of no_log values to cover everything that heuristic_log_sanitize does.
...
Fixes #12792
2015-10-21 08:15:46 -07:00
Toshio Kuratomi
c2d188baff
Hide values in json returns which were given in parameters marked no_log.
2015-10-20 12:42:36 -07:00
Mathieu
260a3e5ce7
Fixes #11055 - Set locale via LC_ALL
2015-10-19 21:25:30 +02:00
Brian Coca
c57200925f
made syslog import optional as intel's edison custom compiles python w/o it
2015-10-14 09:12:02 -04:00
Toshio Kuratomi
15d7f53846
AnsibleModules.log() fix for python3
...
Also add unittests for AnsibleModules.log()
Fixes #12586
2015-10-12 13:30:27 -07:00
Brian Coca
1a56a5c442
created debug method, renamed debug attribute to _debug
2015-10-01 10:17:41 -04:00
Marius Gedminas
cc1e1648f5
Tweak comment style
2015-09-30 18:46:50 +03:00