Commit Graph

86 Commits (6341e75e336f694e1e0f52cee56413b58551681c)

Author SHA1 Message Date
Michael DeHaan 031ba43d22 minor code cleanup 2012-07-15 11:09:15 -04:00
Michael DeHaan 867b2437cc consolidate output code in callbacks.py, from utils, remove extra functions 2012-07-15 10:12:49 -04:00
Michael DeHaan 68a9adc1be Indentation cleanup (partial) 2012-07-15 09:32:47 -04:00
Michael DeHaan 706cfd9ade Misc cleanup -- moved function out of utils, removed debug statement. 2012-07-15 08:50:23 -04:00
Michael DeHaan 19a2fc00dc Clean up imports in utils, add nicer recursion depth limit check. 2012-07-15 08:46:58 -04:00
John Kleint 375a1eaf43 Use iterative MD5 hashing. 2012-07-09 13:27:47 -04:00
Dave Hatton 55694db7c3 switch to hashlib.md5 or md5 instead of OS md5 commands 2012-07-09 08:52:00 +01:00
Michael DeHaan 8220d57690 Clean up md5 functions + make the fetch module stay happy if the remote file does not exist. 2012-07-07 08:47:32 -04:00
Michael DeHaan b551eba6d4 Comment uncommented methods in utils 2012-07-07 08:47:32 -04:00
Daniel Hokka Zakrisson 9882dd56f6 Allow variables in variables in templates 2012-07-03 16:42:00 +02:00
Michael DeHaan a5dd280149 Fix up the output of the raw module when run within /usr/bin/ansible 2012-06-29 18:48:37 -04:00
Michael DeHaan efac68b636 Remove the -D module debug flag, which no longer is functional due to sudo pty requirements, and replace with -v/--verbose.
This flag will show playbook output from non-failing commands.  -v is also added to /usr/bin/ansible, but not  yet used.

I also gutted some internals code dealing with 'invocations' which allowed the callback to know what module invoked
it.  This is not something 0.5 does or needed, so callbacks have been simplified.
2012-06-19 21:57:43 -04:00
Daniel Hokka Zakrisson 9f93839d13 Create a Jinja2 environment allowing includes 2012-06-17 22:18:08 +02:00
Daniel Hokka Zakrisson 13b814a33c Run templating function until the text doesn't change
This allows variables to contain other variables.
2012-06-16 12:51:19 +02:00
Michael DeHaan c0a5d91592 Merge pull request #475 from nafeger/devel
Better error messaging in utils
2012-06-14 12:15:36 -07:00
Nathan A. Feger 9feb26ab28 Better error messaging in utils
When a command responds with json that is unparseable, dump that unpareseable response instead of swallowing it.
2012-06-14 13:17:38 -05:00
Michael DeHaan bd893b765b Merge pull request #459 from dhozac/with_items-variable
Allow a variable in with_items
2012-06-13 19:18:51 -07:00
Matt Goodall c1b38f62c8 Search multiple paths for modules.
Minimal change to allow a list of paths (separated by the typical path
separator) to be searched in sequence for the named module.
2012-06-10 16:22:59 +01:00
Daniel Hokka Zakrisson a05da2d312 Allow with_items to specify a variable 2012-06-09 21:59:22 +02:00
Michael DeHaan 0972b761de Leverage cowsay if installed. 2012-05-30 19:44:00 -04:00
Michael DeHaan b9b53d1941 Playbook refactoring -- work in progress. 2012-05-26 00:37:34 -04:00
Matt Goodall 639763c138 Allow "=" in k-v values. 2012-05-23 00:58:05 +01:00
Seth Vidal 96ef6482c5 add --private-key option and related infrastructure to make paramiko work
with a private key file - not just an agent or pw
2012-05-14 16:14:38 -04:00
Daniel Néri f8b17ef8d3 For utils.template_from_file, change 'no_engine' default to True
This now follows the other template functions, and implicitly also
fixes that playbook handler includes were still processed by Jinja2.
2012-05-13 20:42:11 +02:00
Daniel Néri 4b0480dd9d Set 'hostvars' before performing variable replacements 2012-05-13 20:36:08 +02:00
Jeroen Hoekx dc60f2d844 Allow camelCase variables in varreplace. 2012-05-11 14:14:53 +02:00
Jeroen Hoekx 3cbc229990 Support list indexing in varReplace. 2012-05-10 19:25:28 +02:00
Jeroen Hoekx 74e21e6154 Fixup unicode varReplace templating.
The original patches should have conflicted?
53bde0bf517d1302c80f80180f85995efa36a00e vs efde61e53729964f3e740dcbb9c52f889186719d
2012-05-10 10:11:14 +02:00
Michael DeHaan cb6f0f4284 Merge pull request #346 from jhoekx/improve-varreplace
Support nested variables in varReplace
2012-05-09 17:25:07 -07:00
Jeroen Hoekx 2bbc05185e Make no_engine the default templating action. 2012-05-09 16:15:43 +02:00
Jeroen Hoekx 82144fd543 Support nested variables in varReplace. 2012-05-09 16:15:43 +02:00
Jeroen Hoekx 98f93fcc07 Preserve trailing newline after templating.
Jinja seems to eat trailing whitespace. A lot of tools complain about this: iptables-restore, iscsid...
2012-05-09 10:31:32 +02:00
Michael DeHaan d149c1823a Merge pull request #339 from mgwilliams/feature-unicode
Allow unicode (utf8) in templates
2012-05-09 17:16:59 -07:00
Matthew Williams 39a92f9cd6 allow unicode (utf8) characters in jinja templates 2012-05-08 16:03:51 -07:00
John Kleint 710d085def Fix non-sudo execution, add --sudo-user to ansible-playbook. 2012-05-07 19:58:16 -04:00
Michael DeHaan b300aac551 Include files are no longer to be considered Jinja2 templates, but individual THINGS
in included files can still be templated just like top level playbooks.  Resolves
some issues about statements being evaluated before facts were available
2012-05-02 00:28:19 -04:00
Jeroen Hoekx 029fe1273c Modify /usr/bin/ansible and playbooks to use the new async API. 2012-05-01 18:38:26 -04:00
Michael DeHaan 36e454c52f Because paramiko using a pty can't distinguish stderr and stdout, remove handling that
treated -D as a way to show stderr, and make sure modules don't include things on stderr.
Update docs and test module script to come into line.
2012-04-27 01:25:38 -04:00
Michael DeHaan 40f5469869 minor personal style preference on 'not' 2012-04-26 20:42:20 -04:00
Reed Murphy abf524405a shlex.split() tries to read from stdin if passed None 2012-04-27 11:25:43 +10:00
Seth Vidal fa2aebc8a6 fix for issue #230 - handle template taking 3 args 2012-04-25 11:59:19 -04:00
Michael DeHaan c00699d0ef Merge branch 'integration'
Conflicts:
	lib/ansible/playbook.py
	lib/ansible/runner.py
	library/apt
2012-04-23 21:05:06 -04:00
Michael DeHaan 533c2c6126 Make it possible to use facts from hosts in templates for other hosts.
It works like this:

{{ hostvars['127.0.0.1']['ansible_eth0']['ipv4']['address'] }}
2012-04-21 12:45:37 -04:00
Michael DeHaan 35fdf6636b Allow --user for playbooks, no need for port setting as can specify in inventory file now. 2012-04-16 22:15:55 -04:00
Rafal Lewczuk a87c77958c clean exec bits from lib/ansible/*.py, ignore Eclipse/PyDev files 2012-04-14 21:35:51 +02:00
Michael DeHaan c3cad50075 Update manpages, fix missing variable assignment 2012-04-13 19:33:19 -04:00
Michael DeHaan f2465e0571 Add support for specifying sudo passwords to both ansible & playbook. Nopasswd sudo is no longer required. 2012-04-13 19:06:11 -04:00
Michael DeHaan 6b50078881 Add defaults to command help to avoid a certain class of user questions. 2012-04-12 21:30:49 -04:00
Michael DeHaan 6129574290 Include default value for connection in help. 2012-04-12 21:20:37 -04:00
Stephen Fromm 0675f2511b Merge branch 'master' into localconnection
Merge the SortedOptParser bits and debug attribute commits into
localconnection.

Conflicts:
	bin/ansible
	lib/ansible/playbook.py
	lib/ansible/runner.py
	lib/ansible/utils.py
2012-04-12 11:18:35 -07:00