Commit Graph

139 Commits (80bebc1806c036553cc39d2c072b132265f6f5fa)

Author SHA1 Message Date
Michael DeHaan 44e32cc45e Some formatting fixes so docs will build, etc. 2013-05-29 18:43:23 -04:00
Michael DeHaan 159ba7d68a Merge pull request #2956 from akerl/unicodefix
ignore unicode errors in stdout
2013-05-24 19:46:25 -07:00
Dale Sedivec 611d56dc4c Plug-ins loaded from top-level plug-in directory
PluginLoader._get_paths, as of 391fb98e, was only finding plug-ins that
were in a subdirectory of one of the basedirs (i.e. in a category
directory).  For example, action_plugins/foo.py would never be loaded,
but action_plugins/bar/foo.py would work.

This makes it so that "uncategorized" plug-ins in the top level of a
directory such as action_plugins will be loaded, though plug-ins in a
"category" subdirectory will still be preferred.  For example,
action_plugins/bar/foo.py would be preferred over action_plugins/foo.py.
2013-05-24 17:05:28 -05:00
Michael DeHaan 753ebea186 Prefer categorized modules to uncategorized, such that if someone does an install on top of old content
the categorized modules will win over the 1.1 uncategorized modules, as the packages may not automatically
clean up the old content.
2013-05-19 20:09:44 -04: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
Michael DeHaan 496f06c3c9 Pass variables to lookup function for those that want to use them. 2013-05-19 19:26:30 -04:00
Les Aker 1179d1bbd8 corrected indentation 2013-05-19 12:25:19 -04:00
Les Aker 2adc335481 ignore unicode errors in stdout 2013-05-19 11:57:08 -04:00
Michael DeHaan f2a8c0d612 Fix listification inside of with_items so it runs more intelligently. 2013-05-13 21:31:45 -04:00
Michael DeHaan 9f47d13306 Misc identation. 2013-05-11 17:24:12 -04:00
Michael DeHaan 0a1657080b Indentation fix 2013-05-11 17:23:45 -04:00
Michael DeHaan 3fdf15fa8a template code fixes for 'make pep8' 2013-05-11 17:22:56 -04:00
Matt Coddington 542eeeb5d6 add option to ignore $legacy variable style substitution 2013-05-11 14:06:01 -04:00
Stoned Elipot df3c4849e9 Also load Jinja2 extensions when processing template from string 2013-04-28 20:52:01 -04:00
Michael DeHaan 68f711d5ae teach plugin loader to find modules in subdirectories 2013-04-28 15:22:46 -04:00
Michael DeHaan 391fb98ee2 Allow modules to be categorized, and also sort them when generating the documentation. 2013-04-28 15:03:45 -04:00
Michael DeHaan 224e20ca60 complex_arg templating should be smarter. Make it so! 2013-04-25 21:11:17 -04:00
Jeroen Hoekx ac7a632711 Remove leftover debug statement in template code. 2013-04-25 08:47:38 +02:00
Michael DeHaan 6fdfbb1a34 Improve variable smushing so it only has to be done in one place. This is related to shlex.split being called
on untemplated variables in some rare cases.
2013-04-24 22:00:40 -04:00
Michael DeHaan be947e5266 Resolve merge conflict 2013-04-22 23:57:20 -04:00
Michael DeHaan e12f91799c Allow args: var to be used to pass a variable in bare, and also templated versions should also DWIM. 2013-04-22 22:17:55 -04:00
Michael DeHaan 6c778acd91 Smush the braces in various places (hey, that rhymes) to avoid undo key=value splitting surprises
in new template system.
2013-04-22 22:05:06 -04:00
Michael DeHaan d7623d1f91 Added a 'set_up' and 'tear_down' which are like tasks, but execute before and after roles. 2013-04-20 16:07:06 -04:00
Michael DeHaan e6bf01a6b0 Make plugin loader path operations more efficient. 2013-04-20 12:31:14 -04:00
Michael DeHaan 817b0cdc80 Instantiate filter plugins only once to save some efficiency. 2013-04-20 09:51:20 -04: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
Bernhard Weitzhofer fb0a99e5d8 Fix if-statement that always evaluates True 2013-04-17 19:40:06 +02:00
Michael DeHaan 7c6341718e Merge branch 'combine_vars' of git://github.com/laggyluke/ansible into exp
Conflicts:
	lib/ansible/inventory/vars_plugins/group_vars.py
	lib/ansible/runner/__init__.py
	lib/ansible/utils/__init__.py
	test/TestPlayBook.py
2013-04-16 20:06:06 -04:00
Michael DeHaan b54e955595 Remove a debug statement. 2013-04-16 19:09:12 -04:00
Michael DeHaan 86d47bce5f Make more lookup plugins tolerant of new variable system, with a little better 'do what I mean' logic to resolving
what happens if you get a string back as a template result.
2013-04-16 19:07:19 -04:00
Michael DeHaan c0f8af5202 Make more lookup plugins happy with newstyle variables. Not quite done, but this fixes up with_items/with_nested/file/fileglob. 2013-04-16 18:50:30 -04:00
Michael DeHaan 7a2d493e67 Teach lookup plugins that if they can't evaluate something they can wait and do it later. 2013-04-12 18:44:40 -04:00
Michael DeHaan 3f3b2a9448 Smush Jinja2 braces in playbooks so unresolved variables get parsed nicely 2013-04-12 18:38:48 -04:00
Michael DeHaan 793a3d3f76 More 1.2 templating development; for legacy when_string constructs don't quote the 'in' operator 2013-04-12 13:29:49 -04:00
Michael DeHaan b8c5a58b7f Avoid running through the legacy template code if no dollar signs are in strings. 2013-04-12 10:33:55 -04:00
Michael DeHaan a05361f515 This is a fix on top of the 'airplane variable upgrade' commits that fixes legacy when_string so it evaluates correctly in the new eval construct. 2013-04-11 17:20:40 -04:00
Michael DeHaan 4e79bd0872 Remove unneccessary construction of Jinja2 environment object. 2013-04-11 12:59:33 -04:00
Michael DeHaan 2f5c1d3788 Merge pull request #2629 from stoned/fix-jinja2-filters-init
Fix Jinja2 filter plugins initialization
2013-04-11 09:57:04 -07:00
Michael DeHaan 695acc2de0 Make lookup plugins accessible in templates 2013-04-10 19:19:01 -04:00
Michael DeHaan 5b2035edd9 Changes for 'make pep8' 2013-04-10 19:12:10 -04:00
Michael DeHaan 81a926547c Some continued work on new-style templates and associated test code changes. Legacy template functions
are marked with "legacy_" for possible future removal.
2013-04-10 19:09:57 -04:00
Michael DeHaan f0b21dcc0f allow references to names of variables in with_items without needing to surround them with Jinja2 '{{' delimeters 2013-04-10 18:42:54 -04:00
Michael DeHaan 9ac25bb8f6 Minor formatting 2013-04-10 18:19:31 -04:00
Michael DeHaan d7206d84bb Allows Jinja2 that starts a YAML line to not cause a syntax error.
Technically this isn't quite valid YAML when this happens, so we make it valid.  This means that if a future commander
API allows save/load it should make sure it does similar processing.
2013-04-10 18:07:19 -04:00
Michael DeHaan b09ef21ec9 Add code to flag legacy templating like $foo.{bar} as deprecated in favor of Jinja2 {{ foo.bar }} so we
can remove the legacy system at a later date.
2013-04-10 17:52:35 -04:00
Michael DeHaan 804056a563 Use Jinja2 strict undefined in string templating to allow the default filter to be used. 2013-04-10 16:45:53 -04:00
Michael DeHaan 998230a84a Allow $foo and {{ bar }} to be used on the same line in playbooks. 2013-04-10 16:40:49 -04:00
Michael DeHaan 29209c4913 Style fixes so "make pep8" is clean. 2013-04-10 16:37:49 -04:00
Michael DeHaan 0113951580 Enable usage of when_set within new eval system. 2013-04-10 16:26:59 -04:00
Michael DeHaan a83e10d77d Use safe_eval vs eval. 2013-04-10 16:17:24 -04:00