Commit Graph

104 Commits (5cac2a763baf754cdf6676c76daad3356025f3f8)

Author SHA1 Message Date
Stoned Elipot 1ed54b9b3a when: condition support for tasks include 2013-04-07 00:43:39 +02:00
Michael DeHaan fffb1a0a9d Loose tasks not in roles get executed after roles. 2013-04-06 18:36:25 -04:00
Michael DeHaan f044fc344b When using roles, or other includes, the path to DWIM inside is the path of the task include
file.
2013-04-06 18:32:36 -04:00
Michael DeHaan 5c4ed72571 Demo of parameterized roles! 2013-04-06 12:51:17 -04:00
Michael DeHaan f308194b9a Added examples of how roles work! 2013-04-06 12:35:35 -04:00
Michael DeHaan 892484812e Much requested feature -- allows relative imports of content within roles or relative to any task or handler include (../templates for template ../files for copy) 2013-04-06 12:13:04 -04:00
Michael DeHaan 95f30f0def Complete streamlining of vars handling in playbooks and how those are templated to avoid
repeat template calls at playbook intialization time.
2013-04-06 10:45:09 -04:00
Michael DeHaan 1dfe60a6ea Allow any parameter in a play to be set by --extra-vars through cleaner use of data structure
templating.
2013-04-06 10:09:16 -04:00
Junegunn Choi 20a48c6bdf terminate immediately on a failure 2013-03-28 15:17:01 +09:00
Michael DeHaan 783a12cc0e Resolve merge commit. 2013-03-25 22:32:01 -04:00
milan 80dbab3cf0 check type of task explicitly 2013-03-14 13:06:55 +01:00
Michael DeHaan 9cf66f4376 Fixes from 'make pep8'. Partial, more to come. 2013-02-17 19:40:38 -05:00
Michael DeHaan c8878998d1 update some of many copyright dates but we can just do this when editing each file, not super high priority 2013-02-16 15:32:01 -05:00
Daniel Hokka Zakrisson 57e51f7fdf Clean up some extra_vars redundancy 2013-02-11 23:25:50 +01:00
Daniel Hokka Zakrisson a025cfcb33 Add on_import_for_host callback from non-list case 2013-02-03 23:37:29 +01:00
Daniel Hokka Zakrisson a79373f6b2 Make template_ds the only templater
Instead of having to remember when to use which one, rename template_ds
to template and move the last bit of code from template to varReplace
(which gets used for all string replacements, in the end).

This means that you can template any data type without worrying about
whether it's a string or not, and the right thing will happen.
2013-02-03 14:01:54 +01:00
Daniel Hokka Zakrisson f7e286cf34 Fix error format for invalid vars_files 2013-01-31 20:25:28 +01:00
Seth Vidal f649777072 - make extra-vars override all other vars and facts in playbooks 2013-01-30 11:56:04 -05:00
Michael DeHaan 0030a2bd09 Allow handler files to be empty lists. 2013-01-27 10:40:29 -05:00
Daniel Hokka Zakrisson 94a1c221bc Update variable precedence section with current rules 2013-01-22 16:56:04 +01:00
Rodney Quillo 395093e0bf Move default arguments to the end of the function call. 2013-01-19 08:34:47 +08:00
Rodney Quillo 7ae100611c Adding default on vars_prompt 2013-01-18 19:00:57 +08:00
Daniel Hokka Zakrisson caee51e90e Allow only_if/when_* on task includes and apply it on all tasks within 2013-01-04 00:15:13 +01:00
Daniel Hokka Zakrisson 07b215d4fa Check for non-accepted arguments combined with task includes
Throw an appropriate error for it.
2013-01-03 23:36:42 +01:00
Daniel Hokka Zakrisson 68f736e8d7 Make inventory variables available to vars_files 2013-01-03 23:16:38 +01:00
Daniel Hokka Zakrisson a1877b2213 Allow infinite depth task includes 2013-01-03 23:01:04 +01:00
Nandor Sivok f31fbdff1f moving int() conversion to the play init 2012-12-14 18:05:08 +01:00
Nandor Sivok e91db5fcdc fixes #1767 parsing serial from extra_vars 2012-12-14 13:21:58 +01:00
Daniel Hokka Zakrisson ebd31af940 Don't prompt for vars in extra-vars
Fixes #1622.
2012-11-26 22:07:57 +01:00
Daniel Hokka Zakrisson 94fc3006e9 Make variables local to the play
Fixes #1677.
2012-11-26 22:07:57 +01:00
Daniel Hokka Zakrisson d1c285b70b Port may be an integer when parsed from the play 2012-11-21 17:20:03 +01:00
Daniel Hokka Zakrisson 3ce63d845e remote_port is None by default 2012-11-21 14:10:10 +01:00
Dag Wieers 8458f53014 Allow the remote port to be templated
This was requested on the mailinglist and seems useful.
2012-11-20 18:53:40 +01:00
Daniel Hokka Zakrisson 0be1f11ed5 Use all available vars for hosts:, user: and sudo_user: 2012-11-13 12:20:07 +01:00
Daniel Hokka Zakrisson 383dc30560 Rename varReplaceWithItems to template_ds 2012-11-09 15:43:29 +01:00
Daniel Hokka Zakrisson e05e514861 Create a plugin loader system 2012-11-02 01:24:14 +01:00
Daniel Hokka Zakrisson c519d5dac0 Add a template lookup plugin
Requires that inject be passed to run
2012-10-31 16:57:10 +01:00
Daniel Hokka Zakrisson 37d9acc097 Make lookup API extensible and allow basedir to be passed
This allows using with_fileglob in play context, e.g.
- include: $item
  with_fileglob: tasks/*.yml
as well as prepares for other data to be passed.
2012-10-31 16:55:38 +01:00
Michael DeHaan c0747b7baa pep8 fixes 2012-10-30 20:42:07 -04:00
Daniel Hokka Zakrisson e72fdccd87 Allow vars_files sequences without a default 2012-10-28 16:35:22 +01:00
Michael DeHaan 6ba30170dd Make group_vars and host_vars available to usr/bin/ansible, and make vars_plugins exist 2012-10-26 19:55:59 -04:00
Daniel Hokka Zakrisson 2f05e95d8a Use lookup plugins for task include with_* 2012-10-25 15:13:34 +02:00
Michael DeHaan 109632e3bc Revert "Vars specified via CLI have the highest priority."
Reverting as this as reported allows some variables to clobber each other.
We'll work on a different fix.

This reverts commit c5469f6367.
2012-10-21 16:42:15 -04:00
Aleksej Romanov c5469f6367 Vars specified via CLI have the highest priority. 2012-10-16 04:34:54 +07:00
Daniel Hokka Zakrisson b8b34b5110 Keep processing the rest of the vars_files even if one has vars 2012-10-11 23:52:01 +02:00
Daniel Hokka Zakrisson 564a212b3c Only gather facts once per node per playbook run
Unless gather_facts: True is on the play
2012-10-02 15:30:19 +02:00
Daniel Hokka Zakrisson 48c5d696d2 Remove debug print statement 2012-10-01 17:23:21 +02:00
Daniel Hokka Zakrisson a83aa1071b Give each task its own module_vars
Otherwise each task will overwrite the previous' items, among
other things.
2012-10-01 17:17:39 +02:00
Michael DeHaan d0eba79760 Template out sudo_user so you can pass in variables using --extra-vars 2012-09-30 20:11:51 -04:00
Daniel Hokka Zakrisson 8a8ffa2342 Allow task includes to work with with_items 2012-09-30 13:40:52 +02:00