Commit Graph

137 Commits (279098bd034701acfb7ff5d6f03061b90780e10f)

Author SHA1 Message Date
cavassin 10f5af82f9 Prevent UnicodeEncodeError
Prevents UnicodeEncodeError: 'ascii' codec can't encode character, while printing shell commands output
2013-12-05 13:17:57 -02:00
James Tanner e8b54dd073 Fixes #4852 properly evaluate log_path writability 2013-11-18 10:40:49 -05:00
James Tanner 40886c42b5 Fixes #4561 Compare task name without role prefix for start-at-task 2013-10-25 16:09:43 -04:00
Michael DeHaan e131de4de0 Added "debug: var=variableName" capability. 2013-10-14 21:01:38 -04:00
Michael DeHaan 43df00550d Merge pull request #3827 from mscherer/disable_callbacks
add a way for callback to disable itself
2013-10-12 07:03:06 -07:00
Michael DeHaan 9637f620d7 Deprecation warnings of several flavors, nice and purple and can be disabled
in ansible.cfg.
2013-10-11 18:37:39 -04:00
Andrey Shorin 35457b67f5 Pass host to runner_on_file_diff callback 2013-10-07 08:55:01 -04:00
James Martin d5f20e6b21 Optionally display Skipping [host] messages. 2013-09-26 10:03:23 -04:00
James Cammarata d5b96abd80 Added support for -vvvv to enable ssh connection debugging
This patch also checks specifically for a return code of 255, which
indicates an unknown SSH error of some kind. When that happens, ansible
will now recommend running with -vvvv (if not enabled) or show the
output from 'ssh -vvv' (when it is enabled)
2013-09-19 05:58:54 -05:00
Hiroaki Nakamura 2357194b39 Add failed_when module variable.
Implementation note: Ternery operator trick for python prior to 2.5 is used.
(test and [when_true_value] or [when_false_value])[0]
http://stackoverflow.com/questions/394809/ternary-conditional-operator-in-python#comment1466794_394887
2013-09-10 08:34:01 +09:00
Michael Scherer 12bf9a8b69 add a way for callback to disable itself
The idea is that some plugin would not be called in some
specific case, and the callback should decide by itself.

Having a way to globally disable it is much cleaner than
disabling every method one by one on the plugin side.

My use case is for fedora-infrastructure that cannot be run
from git checkout since it try to connect to the message bus,
but another case would be to bootstrap infrastructure, or to
run the code on a test servers without having all the callback
infrastructure setup.
2013-08-14 22:32:28 +02:00
Michael DeHaan baffa8df72 These fields are booleans. 2013-08-10 18:16:01 -04:00
Michael DeHaan 3dbe65def2 PEP8 indent fix 2013-08-03 14:54:24 -04:00
James Cammarata 82c806979b Only use LOG_LOCK in log_flock if a runner is not specified
Fixes issue #3466 - When ansible can't authenticate against a host,
and your answer is no, ansible crash.
2013-08-03 13:28:19 -04:00
Michael DeHaan 0f26439234 Remove variable per pyflakes 2013-07-20 12:52:17 -04:00
Michael DeHaan 2cb7c30834 Improve interlaced output prevention when asking for host key approval. 2013-07-04 18:17:45 -04:00
Michael DeHaan 132c89e681 Merge branch 'callbackinit' of git://github.com/sergevanginderachter/ansible into devel 2013-06-18 20:52:43 -04:00
Scott Sturdivant b10b676158 Print the default value if one is provided. 2013-06-17 14:15:31 -06:00
Serge van Ginderachter 2a7f9df109 add support for callback_plugins/ relative to playbook 2013-06-12 23:54:00 +02:00
WAKAYAMA Shirou 66247042a5 fix utf-8 named task failed with --step. 2013-06-03 22:45:02 +09:00
Michael DeHaan 4840e59b90 Allow cowsay to be removed mid playbook run. 2013-06-01 17:06:40 -04:00
Serge van Ginderachter dd9919342b hide magic variables used bin/ansible output
'verbose_override' and 'verbose_always'
2013-05-27 14:42:55 +02:00
Serge van Ginderachter 94028852d9 Make debug module always verbose in playbooks
Created a new flag 'verbose_always' handled by
on_ok callback, similar to the 'verbose_override'
flag used by the setup module.
2013-05-25 00:27:23 +02:00
Michael DeHaan cd57d59913 If ansible is configured to use a log file but cannot write to it, exit, but don't traceback. 2013-05-19 20:05:04 -04:00
Brian Coca 8dd72d2828 changed lockfile to be opened in write mode (solaris for one doesn't like
exclusive locks on read)
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
2013-05-15 16:56:20 -04:00
Michael DeHaan 2a091a3505 Remove duplicate import. 2013-05-11 17:26:47 -04:00
Michael DeHaan ea8302e68d Indentation. 2013-05-11 17:24:40 -04:00
James Cammarata 2440861b1b BUGFIX - --start-at-task= works only with --step
From issue #2820, --start-at-task does not actually run tasks
unless --step is specified. This appears to be because skip_task
is being evaluated as True in PlayBook._run_task(). This patch
ensures skip_task is set to False in the callback.
2013-05-05 11:05:32 -05:00
Michael DeHaan e90023281d Slightly refine log output to include username in addition to pid. 2013-04-28 20:57:32 -04:00
Matt Coddington 3b8f69bac8 add pid to log 2013-04-27 13:00:02 -04:00
Michael DeHaan bcac289667 Cows don't need to display brackets around strings. 2013-04-27 11:50:53 -04:00
Michael DeHaan b8fdcff524 Merge branch 'nocows' of git://github.com/jpmens/ansible into devel
Conflicts:
	lib/ansible/callbacks.py
	lib/ansible/constants.py
2013-04-27 11:34:39 -04:00
Michael DeHaan aa55268514 Adds a logfile for ansible playbooks that can be set by the environment or configuration file. 2013-04-27 10:24:26 -04:00
Michael DeHaan 515fbd5a17 Restructure output to prevent rare cases of interlaced I/O in multiprocessing paths. 2013-04-27 09:46:48 -04:00
Jan-Piet Mens dfd885a012 Make ANSIBLE_NOCOWS configurable
nocows = 1 in ansible.cfg
	or old environment variable ANSIBLE_NOCOWS=1
add to ansible.cfg example
2013-04-23 16:43:23 +02:00
Michael DeHaan 53ac0bbec2 Instantiate callback plugins only once so we can set play/task objects on them and they'll stick. 2013-04-20 09:09:35 -04:00
Seth Vidal 690738ea32 implement --start-at-task option to hop to a specific task before starting running them 2013-04-09 01:53:40 -04:00
Michael DeHaan 00252353b9 Decided I liked the asterisks 2013-04-06 18:58:55 -04:00
Michael DeHaan bc0be456da Modify output banners to have constant length and use dashes instead
of "-" to be less visually heavy (unless cowsay is installed of course)
2013-04-06 18:52:30 -04:00
Michael DeHaan e9d11173cd Remove obsolete comment 2013-04-06 18:38:31 -04:00
Seth Vidal a7a083d882 when --step isn't specified make sure to print the banner 2013-03-11 09:48:32 -04:00
Seth Vidal 7687c2caf8 add --step option to ansible-playbooks to let people step through a playbook
one by one - asking for confirmation along the way.

also allows to 'continue' after a certain point
2013-03-11 00:39:05 -04:00
Michael DeHaan c92bfb7234 Merge branch 'madcow2' of git://github.com/bcoca/ansible into devel 2013-03-01 16:23:41 -05:00
Jimmy Tang 81a34c2d1d Cowsay on OSX macports 2013-03-01 16:51:13 +00:00
Stephen Fromm fa07604d43 Fix CliRunnerCallbacks.on_file_diff in callbacks.py
When running ansible -C, I get a traceback that ends with
    AttributeError: Values instance has no attribute 'diff'
This fixes on_file_diff to behave similar to
PlaybookRunnerCallbacks.on_file_diff().
2013-02-27 13:26:29 -08:00
Brian Coca e9907e9c8a added random cow pick through ANSIBLE_COW_SELECTION env var
Signed-off-by: Brian Coca <bcoca@tablethotels.com>
2013-02-26 22:41:01 -05:00
Stoned Elipot 10e9f1fc1e Implement --diff for the copy module. 2013-02-25 23:32:52 +01:00
Michael DeHaan c4779d95b8 Removing unused import, 'make pyflakes' is now clean. 2013-02-17 19:49:50 -05:00
Blair Zajac fa8e653011 Simplify and correct comparisons with None. 2013-02-16 13:32:48 -05:00
Michael DeHaan 72a05ae2a0 Move diff code more into runner code. 2013-02-09 23:24:03 -05:00