Commit Graph

186 Commits (5aab75e71afb67cbf79e643226c0d4f303d7cfe9)

Author SHA1 Message Date
Ralph Bean d25ee940c4 Close zeromq context and socket. 2012-09-28 08:22:53 -04:00
Daniel Hokka Zakrisson 4b29c2cf74 Revert pull request #1091
Automatic quoting of variables in only_if breaks existing playbooks
where entire statements are put in a variable, and other cases. See
issue #1120 for details.
2012-09-28 13:58:23 +02:00
Daniel Hokka Zakrisson 66d0acfde3 Remove assemble action plugin, fix daisychaining 2012-09-27 18:30:08 +02:00
Aleksej Romanov 0db5ccfecb Don't use ssh-agent if password is specified. 2012-09-27 14:57:06 +07:00
Michael DeHaan 69612ba16d The very first start of 'fireball mode', which uses ansible in SSH mode to deploy a ephemeral zeromq daemon (entirely optional) that is will die after
it is no longer used.  No key signing will be required.  At this point, development use only -- NOT complete.
2012-09-26 23:51:59 -04:00
Daniel Hokka Zakrisson d181a64315 Use repr on replacements for only_if 2012-09-25 20:14:58 -04:00
Michael DeHaan df147ab921 Merge pull request #1089 from tbielawa/runner_pause
Add 'pause' action plugin and support plugins skipping the host loop.
2012-09-25 17:11:54 -07:00
Michael DeHaan f8a9541405 add __init__ to action plugins 2012-09-25 08:24:35 -04:00
Michael DeHaan 730b617186 Add init, though it's not really used. 2012-09-25 08:21:59 -04:00
Tim Bielawa 58a4d2f7b4 Add 'pause' action plugin and support plugins skipping the host loop. 2012-09-25 01:13:35 -04:00
Michael DeHaan 734db4ffe9 Merge pull request #1080 from dagwieers/prompt-only_if
Add an only_if option to vars_prompt to make prompts conditional
2012-09-24 17:42:17 -07:00
Dag Wieers 4e9a970616 Add an only_if option to vars_prompt to make prompts conditional
Sometimes you may want to allow variables through host_vars or inventory, but prompt for a value if it is not set or if the value does not conform to something specific. This option allows you to specify when you want to offer a prompt.

This patch also moves check_conditional to utils, and adds an is_unset() function which is nicer to read:

    only_if: "not is_set('${var}')"

vs

    only_if: "is_unset('${var}')"
2012-09-24 23:55:54 +02:00
Daniel Hokka Zakrisson 34f7e6ffa0 Pass module arguments as argument instead of keeping it in runner 2012-09-23 23:38:26 +02:00
Michael DeHaan f5f17e98ff Merge pull request #1065 from dhozac/varreplace-include
Allow including files through variables
2012-09-23 10:20:26 -07:00
Daniel Hokka Zakrisson 8d97bb4f8e Add an ansible_ssh_host inventory variable 2012-09-22 00:57:55 +02:00
Daniel Hokka Zakrisson cc948f339c Allow including files through variables
$FILE{file} will be replaced with the contents of "file"
$PIPE{cat file} will be replaced with the output of "cat file"
2012-09-19 17:57:17 +02:00
Michael DeHaan b8c4bb9e6e Revert "Allow including files through variables"
This reverts commit bf47bb4753.

Conflicts:

	lib/ansible/utils.py
	test/TestUtils.py
2012-09-19 10:31:23 -04:00
Daniel Hokka Zakrisson bf47bb4753 Allow including files through variables
$FILE{file} will be replaced with the contents of "file"
$PIPE{cat file} will be replaced with the output of "cat file"
2012-09-17 16:03:59 +02:00
Timothy Appnel 9d5a79f586 Made groups.groupname and group_names variables accessible in playbooks.
Also modified code that feeds the groups data structure to templates so
that it resolves groups inside of groups to hostnames.
2012-09-10 10:42:26 -04:00
Timothy Appnel 20fc6a29d3 Made groups.groupname and group_names variables accessible in playbooks. 2012-09-07 18:07:52 -04:00
willthames f456d999a9 Fix templates for non root sudo_user
When using template module, if a restrictive umask is set, the
sudo_user won't be able to read the /tmp/ansible-dir/source file
after it is copied across following _transfer_str

I wonder if this behaviour shouldn't be abstracted somehow (as
this correction also happens after put_file in the copy module too)
2012-09-07 16:35:53 +10:00
Michael DeHaan dc14681530 rename isset to is_set 2012-09-06 20:55:27 -04:00
Michael DeHaan 8621539341 Merge branch 'only_if-isset' of https://github.com/dhozac/ansible into devel 2012-09-06 20:55:11 -04:00
Michael DeHaan 8a09e1281b Fixup modularized template module 2012-09-06 19:04:27 -04:00
Michael DeHaan 633e513a65 Modular server-side actions (squash merge) 2012-09-06 18:57:04 -04:00
Michael DeHaan 6fb1884a03 Add __init__'s to git 2012-09-06 18:43:28 -04:00
Daniel Hokka Zakrisson 14db2fa376 Add an isset("$var") function to only_if 2012-09-05 23:18:47 +02:00
Daniel Hokka Zakrisson 7a201dbb2e Keep result pristine for ignore_errors 2012-09-04 22:40:07 +02:00
Michael DeHaan 3de4e45741 Move plugin directories 2012-08-21 20:32:21 -04:00
Michael DeHaan bf92a9e4e0 Store invocation differently from an API perspective, but hide in callbacks 2012-08-20 20:41:53 -04:00
Grzegorz Nosek 73b0dd4ac0 Enable UTF-8 commands via the raw module
Paramiko does not allow Unicode strings as parameters, so encode
the command to UTF-8.

Test case:

ansible localhost -m raw -a 'echo ą'

(also tested on local and ssh transports without problems)
2012-08-20 18:26:21 -04:00
Michael DeHaan 3cbf885079 Change the order the setup cache is used to update things, such that the example/playbooks/conditional_part1.yml file
works as advertised
2012-08-18 19:49:49 -04:00
Michael DeHaan 7fd4051857 make connection types pluggable 2012-08-18 10:52:24 -04:00
Michael DeHaan e13c33bb86 Moved Runner's ReturnData class to a seperate file. 2012-08-18 09:30:33 -04:00
Michael DeHaan f07e55c568 Adds 'delegate_to' as a task option which can be used to signal load balancers and outage windows. 2012-08-18 08:46:51 -04:00
Michael DeHaan fe923b9394 Adaptation of fix in #891 to avoid cut on only one md5 call. 2012-08-16 22:45:43 -04:00
Michael DeHaan eee2d1afd0 If ANSIBLE_KEEP_REMOTE_FILES=1 is set as an environment file, remote files will not be deleted, which is useful only for development debugging purposes. 2012-08-16 21:34:55 -04:00
Michael DeHaan de221e6b4b Add vars to host_vars to prevent some suprises 2012-08-14 20:35:01 -04:00
Michael DeHaan 9851066f4d Adding ability to set ssh args from config file 2012-08-14 20:13:02 -04:00
Michael DeHaan deec50fc3c Default -u (user) and "user:" in playbooks to the current user. 2012-08-11 17:33:34 -04:00
Michael DeHaan 3587ffdef3 Allow /bin/ansible to use --limit 2012-08-11 14:05:24 -04:00
Dietmar Schinnerl ac44c36e4f Removed unnecessary string replacements since parse_json already filters garbage lines 2012-08-11 16:57:04 +02:00
Dietmar Schinnerl fbdddc7c74 Added utils.last_non_blank_line 2012-08-11 16:14:19 +02:00
Dietmar Schinnerl 993bb5c6f1 Added stub implementation of filters 2012-08-11 15:55:14 +02:00
Dietmar Schinnerl 6a18075640 Issue #848: Closing stdin after we read from stdout 2012-08-11 15:13:07 +02:00
Michael DeHaan c7888dd642 Given user report that EL5 sudo does not support '--', remove it, and things seem to still work fine.
let me know if this breaks any other boxes.
2012-08-10 00:15:23 -04:00
Michael DeHaan 02ba5a48e0 Merge branch 'cleanup-imports' of https://github.com/jdavisp3/ansible into devel 2012-08-10 00:05:04 -04:00
Michael DeHaan a7415e5409 Merge pull request #836 from sfromm/rawfixes
Fixes for raw module usage and failure to open_session()
2012-08-10 17:01:47 -07:00
Sebastien Bocahu a3ff6b1958 Fix unneeded bashism
Signed-off-by: Sebastien Bocahu <sebastien@ispfr.net>
2012-08-10 15:57:51 +02:00
Stephen Fromm 569d377183 Wrap paramiko open_session() call in try/except
Ran across non-unix host where the call to paramiko's open_session() in
exec_command() would throw a EOFError exception.  This change wraps the
block in a try/except.
2012-08-09 21:47:09 -07:00