Commit Graph

1191 Commits (a79373f6b278f61c5c2fb8c46b84147d56d02c96)

Author SHA1 Message Date
Dag Wieers f11ab4383a Make ignored/skipped different from changed
Since a skipped/ignored action is _very_ different from actual changes to a system, it always bothered me that  it was not easily distinguishable when skimming the output. This change makes ignore/skip a different color, and I chose cyan. Contemplated using dark-gray/blue, but prefered something that is readable with most terminal colors.
13 years ago
Dag Wieers 7acc0a632b Make fatal errors red 13 years ago
Dag Wieers 20c1a67711 Abort a play at the start when no hosts matches, or no hosts are remaining
This change makes a distinction between no_hosts_matched and no_hosts_remaining.

In both cases we do not start facts-gathering, or run any tasks.

In the case that there are no more hosts remaining, we abort running tasks and abort the playbook.

I also cleaned up the leftovers from the previous patchsets, as these are no longer required.

This closes #1187.

Example playbook:

```yaml
---
- hosts: emptygroup
  tasks:
  - action: command date
  - action: command false

- hosts: all
  gather_facts: False
  tasks:
  - action: command ls
  - action: command false
  - action: command true

- hosts: all
  tasks:
  - action: command true
  - action: command false

- hosts: all
  tasks:
  - action: command pwd
```
13 years ago
Daniel Hokka Zakrisson 564a212b3c Only gather facts once per node per playbook run
Unless gather_facts: True is on the play
13 years ago
Jan-Piet Mens 5f04ef8b4c Feature: file info on templates accessible to Jinja2 templates
add ansible_managed
13 years ago
Michael DeHaan 14f7c85ce7 Include a space and a colon after prompts, so you don't have to put them in yourself. Consistent with documented behavior in examples/playbooks/prompts.yml 13 years ago
Michael DeHaan b90eccc4f8 Merge pull request #1186 from dhozac/varreplacewi-nonstr
Allow non-string types in with_items variables
13 years ago
Michael DeHaan 5683277e4a Be smarter about when to abort a playbook -- if it's early, we just didn't match any hosts, so keep on, hosts might be dynamic. 13 years ago
Daniel Hokka Zakrisson 48c5d696d2 Remove debug print statement 13 years ago
Daniel Hokka Zakrisson a83aa1071b Give each task its own module_vars
Otherwise each task will overwrite the previous' items, among
other things.
13 years ago
Daniel Hokka Zakrisson 695b4bcb46 Allow non-string types in with_items variables 13 years ago
Michael DeHaan a2f76c1c69 If all hosts in a play fail, fail the whole playbook and don't bother printing out every remaining task. 13 years ago
Michael DeHaan 19b78cedc8 Abort a play when there are no more hosts in it. 13 years ago
Michael DeHaan 5846c1b8c4 Merge pull request #1125 from dagwieers/setup-retain
Make sure we retain facts between playbooks
13 years ago
Michael DeHaan d0eba79760 Template out sudo_user so you can pass in variables using --extra-vars 13 years ago
Michael DeHaan 8e9344eef7 add an error when user tries to async something that can't be asynced 13 years ago
Stephen Fromm cf3e368d15 Add message reporting skipped action in cli callback 13 years ago
Michael DeHaan e756ee3741 Merge pull request #1159 from dhozac/include-with_items
Allow task includes to work with with_items
13 years ago
Daniel Hokka Zakrisson 8a8ffa2342 Allow task includes to work with with_items 13 years ago
Daniel Hokka Zakrisson dfee6e19ca Replace lists with a comma-separated join 13 years ago
Daniel Hokka Zakrisson 62db667760 Fix typo in $FILE() 13 years ago
Michael DeHaan 2d7691500e Merge pull request #1139 from lorin/config-precedence
ANSIBLE_CONFIG take precedence over ./ansible.cfg
13 years ago
Michael DeHaan 1fd5de21d2 Merge pull request #1149 from dhozac/non-greedy-filepipe
Complete the change from $FILE{} to $FILE()
13 years ago
Michael DeHaan 8b55217df0 Merge pull request #1148 from dhozac/multiline-only_if
Allow multiline strings to work okay in only_if
13 years ago
Daniel Hokka Zakrisson 2d81a1fa77 Complete the change from $FILE{} to $FILE()
Otherwise, parsing e.g. '$FILE(myfile)'.find("stuff") will include
everything up to the last ) as the filename.
13 years ago
Daniel Hokka Zakrisson be9d7df6c4 Allow multiline strings to work okay in only_if
Fixes issue #1137
13 years ago
Daniel Hokka Zakrisson e655e2f051 Raise AnsibleError if $FILE() or $PIPE() fail 13 years ago
Lorin Hochstein aa5ef9561d ANSIBLE_CONFIG take precedence over ./ansible.cfg 13 years ago
Michael DeHaan 9377c3f525 Merge pull request #1130 from commandtab/templates-trim-blocks
Setting trim_blocks to True
13 years ago
Michael DeHaan 08a77135f3 Merge pull request #1126 from dagwieers/choices-fix
Fix to make sure only strings are being joined
13 years ago
Collin Allen 7c600ae0d3 Setting trim_blocks to True 13 years ago
Dag Wieers 27b2ae8ddc Fix to make sure only strings are being joined
Since BOOLEANS also contains integers, joining the list returns an error. Easy to test by giving a wrong value to a boolean argument:

    service name=httpd enabled=True

Since True is not in the allowed BOOLEANS, it will cause the error, which in its turn bails out because it joins strings and integers.
We may want to remove the integers from the choices since '0' and '1' are already in the list as strings. Personally I would expect only strings as arguments, not sure where these could be integers ??
13 years ago
Dag Wieers c84e76e31d Make sure we retain facts between playbooks
This is mandatory if we want to make facts-modules (like network_facts, ilo_facts and esx_facts) work.
13 years ago
Ralph Bean d25ee940c4 Close zeromq context and socket. 13 years ago
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.
13 years ago
Michael DeHaan 618a519ee3 Merge branch 'varreplace-lessre' of git://github.com/dhozac/ansible into devel 13 years ago
Dag Wieers e7af005408 Revert only_if for variables and templating prompt
Since the condition was not templated, it wasn't working.
Only variables in local scope were used, which made this not very practical
13 years ago
Daniel Hokka Zakrisson 9e4fac5ebd Create a string parser for varReplace instead of using re
This fixes a few issues,
- ${foo}${bar} would be parsed as a variable named foo}${bar,
  which wouldn't be easily fixed without breaking ${foo.${bar}}
- allows escaping . in variable parts so e.g.
  ${hostvars.{test.example.com}.foo} works

This is slower than using re. 3 million templating calls take about
about twice as long to complete with this compared to the regexp,
from ~65 seconds to ~115 seconds on my laptop.
13 years ago
Michael DeHaan 6506e17eff Merge pull request #1109 from dhozac/fix-varReplace-repr
Fix only_if statements referencing non-string types
13 years ago
Michael DeHaan 6c6f2b46b4 Merge pull request #1110 from dhozac/rm-assemble-ap
Remove assemble action plugin, fix daisychaining
13 years ago
Michael DeHaan ee5246fc36 Merge pull request #1113 from jpmens/file_pipe
Strip trailing white space from $FILE()/$PIPE()
13 years ago
Jan-Piet Mens 42620d2f19 Strip trailing white space from $FILE()/$PIPE() 13 years ago
Daniel Hokka Zakrisson b55ef665ba Fix only_if statements referencing non-string types
This fixes e.g. only_if: ${task.changed} which would always
evaluate to true due to it having been replaced by a string for its
boolean value. Also adds a test case to ensure it doesn't get
missed again.
13 years ago
Daniel Hokka Zakrisson 66d0acfde3 Remove assemble action plugin, fix daisychaining 13 years ago
Aleksej Romanov 0db5ccfecb Don't use ssh-agent if password is specified. 13 years ago
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.
13 years ago
Michael DeHaan c63189f650 Make output be cleaner on multi-line failed commands and parse errors. 13 years ago
Michael DeHaan 07101085ca Merge pull request #1093 from brainpage/make_local_action_consistant
2 improvements to delegate_to
13 years ago
Daniel Hokka Zakrisson 84f98534ae Make varReplace recursive instead of iterative 13 years ago
Daniel Hokka Zakrisson d181a64315 Use repr on replacements for only_if 13 years ago
Michael DeHaan 489844f960 Merge pull request #1095 from pas256/devel
Getting negative host pattern matching to work with external inventory
13 years ago
Michael DeHaan df147ab921 Merge pull request #1089 from tbielawa/runner_pause
Add 'pause' action plugin and support plugins skipping the host loop.
13 years ago
Peter Sankauskas 8a4e969b93 Getting negative host pattern matching to work with external inventory
(same as commit 4caf85e37b, but for
excluded hosts as well as subsets)
13 years ago
Jonathan Palley faed650bb1 allow vars in delegate_to 13 years ago
Jonathan Palley 620accf117 make delegate_to localhost act like local_action 13 years ago
Michael DeHaan f8a9541405 add __init__ to action plugins 13 years ago
Michael DeHaan 730b617186 Add init, though it's not really used. 13 years ago
Michael DeHaan 8e71b26264 Fix up 'changed' playbook output patch 13 years ago
Dag Wieers 6b6e3c64c8 Fix a typo in the prompt code
This is unfortunately related to not being able to reuse the same code that was tested.
13 years ago
Tim Bielawa 58a4d2f7b4 Add 'pause' action plugin and support plugins skipping the host loop. 13 years ago
Michael Lambert 5dab2efcdf Fixed obvious bug with missing self parameter to is_executable method 13 years ago
Michael Lambert 29ac1a8efc Replace os.access with stat calls for determining the executability of a given path. 13 years ago
Michael DeHaan 734db4ffe9 Merge pull request #1080 from dagwieers/prompt-only_if
Add an only_if option to vars_prompt to make prompts conditional
13 years ago
Michael DeHaan 9778eaf4f9 Merge branch 'module_args-argument' of git://github.com/dhozac/ansible into devel 13 years ago
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}')"
13 years ago
Michael DeHaan b355dca7dd Merge pull request #1081 from dsummersl/changelabel
Modified 'ok' to 'changed' when a change has occured
13 years ago
Dag Wieers 069feb5d9c Template the variable prompt to customize the message
We have a password-prompt for a configurable login name. Since we require to ask the password for this specific login, it is important to indicate what password needs to be prov ided on the prompt. So the prompt needs to be templated. That's what this patch does.
13 years ago
Dane Summers 04c535b1e9 Modified 'ok' to 'changed' when a change has occured 13 years ago
Daniel Hokka Zakrisson 34f7e6ffa0 Pass module arguments as argument instead of keeping it in runner 13 years ago
Michael DeHaan 3939f7a812 Merge pull request #1076 from SleeplessAnnoyedNerd/Issue-1075
[Issue #1075] Fixing setup module fails if PATH is not set on target hos...
13 years ago
Michael DeHaan f5f17e98ff Merge pull request #1065 from dhozac/varreplace-include
Allow including files through variables
13 years ago
Dietmar Schinnerl 78b7a3a115 [Issue #1075] Fixing setup module fails if PATH is not set on target host 13 years ago
Daniel Hokka Zakrisson 8d97bb4f8e Add an ansible_ssh_host inventory variable 13 years ago
Michael DeHaan 4ded8cb3b3 Change $FILE{} and $PIPE{} to $FILE() and $PIPE() 13 years ago
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"
13 years ago
Michael DeHaan b8c4bb9e6e Revert "Allow including files through variables"
This reverts commit bf47bb4753.

Conflicts:

	lib/ansible/utils.py
	test/TestUtils.py
13 years ago
Michael DeHaan b2af95e4a6 Change $FILE{} and $PIPE{} to $FILE() and $PIPE() 13 years ago
Michael DeHaan b25b9fd840 Merge pull request #1058 from jkleint/devel
Support iteration over command output in with_items.
13 years ago
Michael DeHaan 544a8e44d7 Merge pull request #1053 from dhozac/varreplace-include
Allow including files through variables
13 years ago
John Kleint 2a002f5c0b Support iteration over command output in with_items.
When the output of a command is stored in a register, this will create a
stdout_lines field in the result object that contains stdout split into a list
of lines.  This list can then be iterated over using with_items.
13 years ago
Daniel Hokka Zakrisson dd11b01350 Keep delegate_to so all auxiliary logic based on that works 13 years ago
Daniel Hokka Zakrisson 5bb0f6908b Allow transport on tasks, and use it for local_action 13 years ago
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"
13 years ago
Michael DeHaan 58ad934283 Merge pull request #1024 from tima/groups-pb
Made $groups and $group_names variables accessible in with_items
13 years ago
Michael DeHaan 1829d519b5 Merge pull request #1030 from lorin/import-playbook-pathfix
Support import of playbooks in other directories
13 years ago
Michael DeHaan d7f83471ae Merge pull request #1032 from mavimo/patch-2
Add support for ./ansible.cfg file
13 years ago
John Kleint 1f8696f5c1 Fix inventory.get_hosts when hosts is a list. 13 years ago
Marco Vito Moscaritolo 0cdd081b53 Add support for ./ansible.cfg file
Ansible support configuration in:
```
~/.ansible.cfg
/etc/ansible/ansible.cfg
```

this patch add current user (usefull where user have some different projects) with the oreder:
```
./ansible.cfg
~/.ansible.cfg
/etc/ansible/ansible.cfg
```
13 years ago
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.
13 years ago
Lorin Hochstein b9e100a506 Support import of playbooks in other directories
Previously, importing a playbook in a different directory didn't
work because all of the relative paths were resolved relative to
the top-level playbook.

This patch resolves relative paths on a per-play level instead of
relative to the directory of the top-level playbook.

Also removes the dirname argument from the Play._get_vars method
since this argument wasn't used in the metho dbody.
13 years ago
Michael DeHaan e795fa1ec2 Merge pull request #1014 from marktheunissen/journald
Fix regex that allows passwords to get into syslog, use journal if available.
13 years ago
Timothy Appnel 20fc6a29d3 Made groups.groupname and group_names variables accessible in playbooks. 13 years ago
Lorin Hochstein eabbaaec46 Have ansible respect private_key_file option
The ansible command-line tool was ignoring the private_key_file option.
13 years ago
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)
13 years ago
Mark Theunissen c25ead382c Adapt module common code to use the systemd journal if it's available 13 years ago
Michael DeHaan dc14681530 rename isset to is_set 13 years ago
Michael DeHaan 8621539341 Merge branch 'only_if-isset' of https://github.com/dhozac/ansible into devel 13 years ago
Michael DeHaan ba97ad13e3 Merge pull request #1010 from tima/yaml-jinja
Added to_yaml and from_yaml filters to Jinja environment.
13 years ago
Michael DeHaan 8a09e1281b Fixup modularized template module 13 years ago
Michael DeHaan 633e513a65 Modular server-side actions (squash merge) 13 years ago
Michael DeHaan 975c323e39 Release version bump 13 years ago
Michael DeHaan 2bf9a92bb6 Don't load plugins starting with "_". 13 years ago
Michael DeHaan 6fb1884a03 Add __init__'s to git 13 years ago
Timothy Appnel 23cd7ad08a Added to_yaml and from_yaml filters to Jinja environment. 13 years ago
Anastasis Andronidis 02510ec2ff --version is now taking the correct head 13 years ago
Daniel Hokka Zakrisson 14db2fa376 Add an isset("$var") function to only_if 13 years ago
Michael DeHaan f41d3b9bd2 Fix skipped callback 13 years ago
Michael DeHaan 96f257cea1 Fix invocation-output-supression code to still provide invocation data to the callbacks. 13 years ago
Michael DeHaan 2843e31e09 Don't add 'n/a' because if running from source there will be no git 13 years ago
Michael DeHaan 0c386b0514 Merge pull request #993 from andronat/repo-as-submodule
Fixed a parsing HEAD problem, when ansible is checked out as a submodule
13 years ago
Anastasis Andronidis ba707f56c1 except now returns a 'n/a' version. Some changes in comments 13 years ago
Michael DeHaan aa704a6111 backuplocal => backup_local for API standardization reasons 13 years ago
Michael DeHaan b97e2a6f5a Merge branch 'backup-common' of https://github.com/dhozac/ansible into devel 13 years ago
Daniel Hokka Zakrisson 7a201dbb2e Keep result pristine for ignore_errors 13 years ago
Anastasis Andronidis 63b4f8dd80 small typo 13 years ago
Anastasis Andronidis 44a28838db Fault handling for YAML file and gitdir value. 13 years ago
Daniel Hokka Zakrisson dfcb9d3c2d Move backup to module_common 13 years ago
Anastasis Andronidis 6c8171f6f9 Appended repo_path 13 years ago
Anastasis Andronidis 4e94db3d78 Fixed a parsing HEAD problem, when ansible is checked out as a submodule
Fixed a parsing HEAD problem, when ansible is checked out as a
submodule in git
13 years ago
Michael DeHaan c04f00e3a6 Fix async callback 13 years ago
Jan-Piet Mens a37c6ea936 Jinja2 filter from_json added, to_json renamed 13 years ago
Michael DeHaan f140332ff6 Make it possible in the inventory file to have spaces in host variables 13 years ago
Stephen Fromm 6742e9c3f4 Add option required=(True|False) to get_bin_path and update modules
Added required as optional argument to get_bin_path(). It defaults to
false.  Updated following modules to use required=True when calling
get_bin_path():  apt_repository, easy_install, group, pip,
supervisorctl, and user.
Also removed _find_supervisorctl() from supervisorctl module and updated
_is_running() to not need it.
13 years ago
Stephen Fromm 4e7b67a45a Add option to pass list of dirs to get_bin_path in module_common.py
The optional list is prepended to PATH.
Fix get_bin_path() to use os.path.join().
13 years ago
Stephen Fromm 4c62e495eb Add method get_bin_path to module_common.py
This is meant to assist all the modules that look for the full path of
an executable.  If it is found and is X_OK, returns the full path.
Otherwise, it returns None.
13 years ago
Daniel Hokka Zakrisson 2d448f2a34 Invoke cowsay without going through the shell 13 years ago
Michael DeHaan 00c4c5c4a1 If tags "all" is used, don't choke. 13 years ago
Michael DeHaan 7ec0afbebc Merge pull request #956 from tima/jinja-json-filter
Add tojson filter to jinja environment used by the template module.
13 years ago
Timothy Appnel d306c8debc Add tojson filter to jinja environment used by the template module. 13 years ago
Michael DeHaan 4caf85e37b Fix --limit for external inventory scripts, slight variant on fix from pull #949 13 years ago
Michael DeHaan 4002cfbdcd Minor string tweak. 13 years ago
Mark Theunissen 2755602dcb Check to make sure that tags passed as parameters actually exist 13 years ago
Daniel Hokka Zakrisson 89a31b0a2a Allow variable expansion for vars that evaluate to false 13 years ago
Michael DeHaan 98483f5252 Merge pull request #942 from dagwieers/color-capability
Check for terminal capabilities if curses is available
13 years ago
Michael DeHaan cb18b3eb26 Merge branch 'devel' of github.com:ansible/ansible into devel 13 years ago
Dag Wieërs 47f3be3de0 Check for terminal capabilities if curses is available
Normally curses is part of the standard library, but this was not
always the case in the past.

The ANSIBLE_COLOR environment variable and the tty-check have
priority over the curses method (as they are both faster than
the curses test).
13 years ago
Ludovic Claude b0a4a9e188 Issue #935: filter out __init__ module from the list of callbacks 13 years ago
Derek Carter de306922b1 scope error with utils.py branch_path 13 years ago
Michael DeHaan 91a9d0d499 Merge pull request #930 from elventear/version_fix
Fix git version when some head files are missing.
13 years ago
Pepe Barbe 5c4a523148 fix _gitinfo function to avoid ansible crashing in cases where the branch file is missing (e.g. after a gc) 13 years ago
Michael DeHaan 2833f48ed3 Make a particular error about an invalid include statement a bit clearer. 13 years ago
Michael DeHaan 3de4e45741 Move plugin directories 13 years ago
Michael DeHaan bf92a9e4e0 Store invocation differently from an API perspective, but hide in callbacks 13 years ago
Dave Peticolas 4b4bcdedc1 Fix off-by-one serial count (causing infinite loop for serial == 1). 13 years ago
Grzegorz Nosek 94f56614e7 Fix UTF-8 output when using executable inventory files
The 'hostname' variable is then unicode, which breaks interpolating
stdout etc. contents into the output strings (they are bytes and cannot
be converted to Unicode using ASCII codec)
13 years ago
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)
13 years ago
Grzegorz Nosek 2aef0335cb Handle UTF-8 in templates
This is required to run commands containing non-ASCII characters, e.g.:

ansible localhost -m shell -a 'echo ą'
13 years ago
Tim Bielawa 4121109665 Local actions, they're like aliases for actions with localhost
delegates.

Closes #905
13 years ago
Michael DeHaan 6e79555621 remove stray imports 14 years ago
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
14 years ago
Michael DeHaan 3017dc92d9 make callbacks modular 14 years ago
Michael DeHaan 7fd4051857 make connection types pluggable 14 years ago
Michael DeHaan 898d7676f7 Adds the 'serial' keyword to a playbook which controls how many hosts can be running through a playbook at a single time.
The default is 0, which means all hosts.  If set to 1, each host would run a playbook all the way through before moving
on the next host.  Fact gathering is still parallel, regardless of the serial setting.
14 years ago
Michael DeHaan e13c33bb86 Moved Runner's ReturnData class to a seperate file. 14 years ago
Michael DeHaan f07e55c568 Adds 'delegate_to' as a task option which can be used to signal load balancers and outage windows. 14 years ago
Pepe Barbe e4a2de4f82 Syntax changes necessary to make test-module work with Python 2.4 14 years ago
Michael DeHaan fe923b9394 Adaptation of fix in #891 to avoid cut on only one md5 call. 14 years ago
Michael DeHaan 5bb5082ed9 Fix failed to parse message handling 14 years ago
Michael DeHaan 0579b8b4e6 The command module was not reporting on errors like the other modules when the module failed
to parse or return other valid output.  This is a slight improvement.
14 years ago
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. 14 years ago
Michael DeHaan de221e6b4b Add vars to host_vars to prevent some suprises 14 years ago
Michael DeHaan 9851066f4d Adding ability to set ssh args from config file 14 years ago
Michael DeHaan 6de8c27085 Load parent groups when processing group_vars 14 years ago
Michael DeHaan 7d50a5c2b7 Merge pull request #865 from jdavisp3/vars-file
Always load group_vars and host_vars.
14 years ago
willthames c01040ca72 Further fixes for constants following config introduction
Added an ANSIBLE_CONFIG variable to poteentially override
~/.ansible.cfg
Used os.path.expanduser against all paths that might be read in to allow
~ to be used in config files. I'd have preferred it if os.path.expanduser
took None as an argument but it doesn't.

If remote_port *is* set in the ansible config file, then it will be
interpreted as a string (at which point ssh.connect fails with an
obscure message). Most other numeric variables are handled by
the OptionsParser which takes a type variable when setting up the option -
but remote_port is not an option, so never cast to int.

It might be worth adding a type field to get_config that defaults to a string.
That could be e.g. file or int, which then casts it correctly.
14 years ago
Dave Peticolas b42e835aab Always load group_vars and host_vars. 14 years ago
Michael DeHaan 7ab0d60b1a update config code 14 years ago
Michael DeHaan 62fbbf7653 config file support 14 years ago
Michael DeHaan 00c28e2810 formatting 14 years ago
Michael DeHaan 1e4d45af1e Add module common code to allow it to be easier to indicate whether arguments are mutually exclusive, required in conjunction, or whether one of a list of arguments is required. This simplifies writing Python modules. 14 years ago
Michael DeHaan deec50fc3c Default -u (user) and "user:" in playbooks to the current user. 14 years ago
Michael DeHaan 3587ffdef3 Allow /bin/ansible to use --limit 14 years ago
Michael DeHaan 9041adddaa Add support for ranged patterns like webservers[0-49] for hitting the first 50 webservers. 14 years ago
Michael DeHaan 72faf8eb0a fix indents 14 years ago
Michael DeHaan 301edb5b52 use StringIO for output concatenation, minor other tweaks to previous commit 14 years ago
Michael DeHaan 3cc564c127 Merge branch 'devel' of https://github.com/SleeplessAnnoyedNerd/ansible into devel 14 years ago
Michael DeHaan d1ad1d2508 remove stray print 14 years ago
Michael DeHaan 259f2dc4de Various retooling of the internal code behind inventory pattern matching in support of pending support
for host ranges.
14 years ago
Dietmar Schinnerl ac44c36e4f Removed unnecessary string replacements since parse_json already filters garbage lines 14 years ago
Dietmar Schinnerl 6b622beb4d Added filtering of non-JSON lines. 14 years ago
Dietmar Schinnerl fbdddc7c74 Added utils.last_non_blank_line 14 years ago
Dietmar Schinnerl 993bb5c6f1 Added stub implementation of filters 14 years ago
Dietmar Schinnerl bfed87df80 Removed leading blanks 14 years ago
Dietmar Schinnerl 6a18075640 Issue #848: Closing stdin after we read from stdout 14 years ago
Michael DeHaan 1c81ddf8d4 add the limit option, which can be used to further confine the patterns selected by "hosts:" in ansible-playbooks
to an additional pattern (a subset) specified on the command line.  For instance, a playbook could be reusable
and target "webservers" and "dbservers", but you want to test only in the stage environment, or a few boxes at a time.
14 years ago
Michael DeHaan 05a128c2be Add ability to store and access module results later on in the play. See examples/playbooks/register_logic for details. 14 years ago
Michael DeHaan 6c5761a79e Store the ${last_result} for each host to make it usable in only_if conditionals and such. 14 years ago
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.
14 years ago
Michael DeHaan 02ba5a48e0 Merge branch 'cleanup-imports' of https://github.com/jdavisp3/ansible into devel 14 years ago
Michael DeHaan a7415e5409 Merge pull request #836 from sfromm/rawfixes
Fixes for raw module usage and failure to open_session()
14 years ago
Sebastien Bocahu a3ff6b1958 Fix unneeded bashism
Signed-off-by: Sebastien Bocahu <sebastien@ispfr.net>
14 years ago
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.
14 years ago
Stephen Fromm f9bdfde614 Fixes for runner and raw module
runner should not try to create or remove tmp paths when using the raw
module.
14 years ago
Dave Peticolas 08272dc25d Remove unused imports. 14 years ago
Michael DeHaan 05d6e74cce Merge branch 'vars_prompt_encrypt' of https://github.com/cocoy/ansible into devel 14 years ago
Michael DeHaan 07f459f3b2 Allow user to be passed in via --extra-vars 14 years ago
Michael DeHaan 98a5565106 Fixing up parameterized task includes such that variables can be easily handed to them. 14 years ago
Sundar Raman 2f754f0284 (Re #829) Fix for sudo_cmd not defined 14 years ago
Rodney Quillo d1f821361d vars_prompt encrypt from mgw 14 years ago
Tim Bielawa bf7e83bea6 Update man pages and the message for an exception. 14 years ago
Michael DeHaan 093bbd1c82 Slight version format tweaks 14 years ago
Michael DeHaan e654f881a8 Merge pull request #812 from willthames/gitversion
Added commit time information to the --version output
14 years ago
willthames 208f2b66ed Added commit time information to the --version output
Now prints date of commit (and timezone offset of commit)
Hopefully resolves #783
14 years ago
Michael DeHaan 40ff3eb106 Catch socket errors so if you control-c a playbook it does not traceback 14 years ago
Michael DeHaan 85ba71a7fe Split -vv from -vvv 14 years ago
Michael DeHaan cac4effd8f Add module arguments remote modules to -vvv output 14 years ago
Michael DeHaan 846186e2fc Add -vvv support for debugging activity 14 years ago
Michael DeHaan c82f06258c Only run yum,apt through the with_items loop if there is a list of items. Just a cosmetic fix on return values
for the most part.
14 years ago
Michael DeHaan 2f6d6ccb5a Nicer errors from modules if arguments are not fed key=value 14 years ago
Michael DeHaan 183fce6d99 Detect SFTP disablement in paramiko + changelog updates 14 years ago
Michael DeHaan 51083e48e9 remove duplicate code path as few will have git python installed 14 years ago
Michael DeHaan fde329fb9e Merge branch 'gitversion' of https://github.com/willthames/ansible into devel 14 years ago
Will Thames 9a50ed9b7b Added git information to version string
Running ansible --version now outputs git information when the
repo lives in .git in the root of the ansible source (coping with the case
where the git info is elsewhere is left as an exercise).

This uses gitpython where installed, otherwise it interrogates the files
in the .git directory to get the same information.

The gitpython path could be removed, but then people might ask 'why did
you do it like this when gitpython exists'
14 years ago
Michael DeHaan 176bf3cbb5 Save extra chmod step if sudoing to root 14 years ago
Will Thames 414eceb138 chmod needs more specific arguments to work with sudo_user
Basically if umask is set to something like 0007 then chmod +r and chmod +x
are not the same as chmod a+r and chmod a+x

Using os.path.basename rather than source.split should make ansible more
portable (and even if never ported, more readable)
14 years ago
Tim Bielawa 3937707117 Add 'polite' YAML syntax validation and hinting. Closes #798 14 years ago
Michael DeHaan faed4b5a33 whitespace + remove deprecated YAML parser (migration script lives in examples/scripts and warning was added
in 0.6 release)
14 years ago
Michael DeHaan fd265b40b7 Release bump 14 years ago
Michael DeHaan 08c1f96e4b Fix some subtle behavior of how the get_url module chains into the file module, plus blend the results of daisy chain
operations in the correct order, so the file module results overlay the original module results, not the other way
around (which keeps any failure msg's intact)
14 years ago
Michael DeHaan ce01c3f7e7 Allow unicode transfer by not base64 encoding. Also: faster 14 years ago
Michael DeHaan 227dfc17f3 fix tree output 14 years ago
Michael DeHaan 05df6464ef Make module args as unicode more or less not choke. 14 years ago
Michael DeHaan b76efa39be Fix some templating issues, needs testing with anti-unicode safeguard around shlex.split 14 years ago
Seth Vidal f924c96370 remove the tab I found
DIE TAB DIE
pep8
14 years ago
Michael DeHaan c192d8a2b2 Revert "Apply templating to module arguments in playbook"
Breaks copy module by introducing unicodeness, among other things

This reverts commit 4fedb17e38.
14 years ago
Michael DeHaan 38ed7ca7df Merge pull request #759 from lorin/error-feedback
If task action is invalid, output the name in error message
14 years ago
Lorin Hochstein aed6ee7f74 Report only name in task error, all on one line 14 years ago
Lorin Hochstein fa9fe9d246 If task action is invalid, output the name and action. 14 years ago
Michael DeHaan fe87a16a3e Make yum module use one-pass with with_items 14 years ago
Will Thames 4fedb17e38 Apply templating to module arguments in playbook
Module arguments should have variable substitution applied
Also, replacing task.action with the templated task.name seems wrong
14 years ago
Will Thames d43d81a9a4 Raise exception when sudo user does not exist
sudo can fail before getting to the password prompt if a user does not exist
<pre>
[will@tangerine ansible (sudo_missing_user)]$ sudo -u bobbins echo hello
sudo: unknown user: bobbins
sudo: unable to initialize policy plugin
</pre>
Fix raises a distinct exception when that occurs
14 years ago
Michael DeHaan 25acfa8170 Join with_items for the apt module, yum pending, and various fixes to the yum module to support aliases 14 years ago
Michael DeHaan 86ec639176 add error handling if you try to load files in the wrong data format 14 years ago
Michael DeHaan 08c5fe875b yell if input data for host or group vars are not hashes 14 years ago
Michael DeHaan ed14312ad6 reinstate invalid argument checks where possible, daisy chainee/chained modules turn it off 14 years ago
Petros Moisiadis 2ac4acbf97 fixes for tests 14 years ago
Petros Moisiadis 5f4bf813b1 added an 'ignore_errors' option to tasks
Failed tasks with ignore_errors=True, allow the remaining tasks in the
play to be executed as if no failure happened. A failure notice is still
written to the output as well as an '...ignoring' message.
14 years ago
Michael DeHaan f60517aa33 temporarily disable failing check on some things 14 years ago
Ahmad Khayyat 6728b6cdda Allow = symbols in variable values in host inventory 14 years ago
Michael DeHaan 8700de964c Teach the common module code to warn users about typo'd arguments and also set everything to None automatically such
that code doesn't have to do a lot of params.get('foo', None) everywhere.
14 years ago
Timothy Appnel b30f4688cd concatenating stdout and stderr in runner/__init__'s _low_level_exec_command. 14 years ago
u348095 7e279f972e Use sudo_user as an argument in the sudo command 14 years ago
Michael DeHaan 8e60ad986a Do not log login_password params to DB module 14 years ago
Michael DeHaan da44fb1e43 Fixes #731 by reinstating variables for inventory scripts 14 years ago
Michael DeHaan ff82f0a168 Further service module tweaks 14 years ago
Peter Sankauskas 0188889aea Making inventory pattern matching handle group names 14 years ago
Michael DeHaan d0f0315c9d Merge pull request #723 from skvidal/devel
fix trace-creating error in apt module - also make the default setting a...
14 years ago
Seth Vidal 21a35bde00 new patch - adds a 'boolean' function to the module_common class and cleans up
the apt module to use it
14 years ago
Derek Carter 547395a2be added inventory_hostname_short varible 14 years ago
willthames ad9b8e2312 Output version string when --version is passed using optparse's version argument 14 years ago
Michael DeHaan 17be5537d6 When sudoing to another user, the umask may be set such that the next user might not be able to read/execute
the file.  Deal with this.
14 years ago
Michael DeHaan fcdc281c28 If sudoing to a user other than root, the home directory of the original user is very unlikely to be readable by the
sudoed to user, so just use tmp.  Data will be readable by others (briefly before deletion) but never writeable.
14 years ago
Michael DeHaan aa40c5f3b3 remove commented out debug lines 14 years ago
Michael DeHaan ee5f12cd40 Slight tweaks on vars_prompt upgrades 14 years ago
Petros Moisiadis c717934b7e Improved 'vars_prompt' syntax to support prompt text and (non-)private input
An example of the new syntax:

vars_prompt:
 - name: 'secret_variable_name"
   prompt: "Enter secret value: "
   private: "yes"
 - name: "nonsecret_variable_name"
   prompt: "Enter non-secret value: "
   private: "no"
14 years ago
Michael DeHaan a65b4fef97 Fix up chain invocations of template 14 years ago
Michael DeHaan 19fc8eea80 Things that happen inside multiprocessing shouldn't make side effects, ergo append ansible_facts only
in playbook code.

This technically means with_items calls can't continuously add facts I guess, but I can't see anyone
ever trying that.
14 years ago
Michael DeHaan da4562f495 changes to not clear the setup cache between runs, and also decide to run plays with no tasks
in them if it looks like they are not tagged, because if that is the case, then we may just
be gathering facts about them.
14 years ago
Michael DeHaan f371092845 rm stray comment 14 years ago
Michael DeHaan e035ce97ce blue on black, tears on a river, push on a shove, it don't mean much
(make colorized playbook runs not suck on black terminals)
14 years ago
Lorin Hochstein b63a3bd0c7 Save module name and args when processing list of items.
This is necessary because daisy-chained modules will overwrite
these values.
14 years ago
Michael DeHaan 8d7f526df6 importing/not-importing methods should be colorized 14 years ago
Michael DeHaan d3e8e8ff54 Fix output message 14 years ago
Michael DeHaan c16b691883 Copy module needs to use src as transfer path. 14 years ago
Michael DeHaan 263432daa1 Changed no hosts to red. Not sure this is the right color choice, but there is no orange :) 14 years ago
Michael DeHaan 82cca242e3 use AnsibleError so that if there is an error it does not print a traceback 14 years ago
Michael DeHaan 8fa4dc3920 Small change to previous patch, make ranges of hosts inclusive. 14 years ago
Michael DeHaan 416b8d59a9 Merge branch 'devel' of https://github.com/fangchin/ansible into devel 14 years ago
Michael DeHaan 15062b38e1 Fix typo 14 years ago
Michael DeHaan 12ff9b5b9a Move color coding bits to module, use over rest of playbook 14 years ago
Chin Fang 5315dd146d Added lib/ansible/inventory/expand_hosts.py 14 years ago
Chin Fang e3b2521f01 Added a host expansion feature to ansible's inventory parsing 14 years ago
Jan-Piet Mens 44a9226ece file mode now correctly set after chaining from copy 14 years ago
Michael DeHaan 3a2df329af Tweak the way chained callbacks work 14 years ago
Michael DeHaan dd6399b5ae Fixup args being passed into file from copy, tweak preservation of changed attribute. 14 years ago
Michael DeHaan 153f3932b5 reinstate delete_remote_files 14 years ago
Michael DeHaan 632a83c79e Remove unused function 14 years ago
Michael DeHaan 479f8b8c26 Templating neccessary here. 14 years ago
Michael DeHaan 9b8793e42e Fix a glitch with daisy chain logic 14 years ago
Michael DeHaan 183330a9fa Merge pull request #662 from tima/regex-cond-tasks
Importing re in runner for doing conditional tasks using pattern matching i.e. re.search(). Also conditionally outputting item when skipping.
14 years ago
Michael DeHaan cbea17e4c5 Fix up async 14 years ago
Michael DeHaan cac7afd700 async is under construction 14 years ago
Michael DeHaan 1f44c07ddf Fix assemble usage, some issues still with async. 14 years ago
Timothy Appnel 4b9b9a8a5b Importing re in runner for doing conditional tasks using pattern matching i.e. re.search(). Also conditionally outputting item when skipping. 14 years ago
Michael DeHaan ec12cc4154 Save the transfer of the module file for new style modules, because we can inject the arguments into the modules.
Module consumers using the API don't have to know how this works.  base64 stuff is only there
because escaping a docstring inside a docstring was a bit of a challenge :)
14 years ago
Michael DeHaan 617f9dc942 Added some caching logic to improve external inventory scripts, removed some debug statements. 14 years ago
Michael DeHaan 57f12ac9e3 Using __slots__ in more places, in particular, hosts and groups, where we are apt to create a fair amount of objects. 14 years ago
Michael DeHaan 0b891fc8fb Tweaking daisychain internals to allow get_url to modify the path destination when downloading to a directory.
Minor module refactoring.
14 years ago
Michael DeHaan 396b81b647 Remove this check as it wasn't really needed and in recent refinements keeps the group_vars stuff from working
as desired.
14 years ago
Michael DeHaan d0f4358730 Port the copy module over to the new "common module" logic. 14 years ago
Michael DeHaan d76c8c9c85 Various cleanup around runner's constructor and how daisy chaining is invoked. 14 years ago
Michael DeHaan 1682dd06c0 Avoid duplicate call to fetch inventory variables 14 years ago
Michael DeHaan 54c9c1e25c Some streamlining of first_available_file code 14 years ago
Michael DeHaan 2d06ee4c0d Fix some subtle things that were keeping 'hostvars' from being usable in templates. 14 years ago
Michael DeHaan 2b6d8a8be5 Fix some issues with the setup cache 14 years ago
Michael DeHaan 5a67a556cd Script to migrate YAML users to the INI format, so we can deprecate YAML inventory (which we are now doing). 14 years ago
Michael DeHaan dcca08b27b Don't let with_items erase 'hostvars' 14 years ago
Michael DeHaan b574c70006 host and group vars should update the setup cache 14 years ago
Michael DeHaan ba3466af95 The following paths are now implict and optional in vars_files:
./group_vars/groupname.yml (for all groups the host is in)
./host_vars/hostname.yml (for the hostname given in the inventory)

This requires an actual inventory file, not script and the paths are relative
to the directory of the inventory file.
14 years ago
Michael DeHaan db1a4d8fac Make 'assemble' use the new daisychain logic 14 years ago
Michael DeHaan 6fb74ae2f9 preserve 'changed' attributes in daisychain logic 14 years ago
Michael DeHaan d72c0c8898 replace module daisy-chaining logic 14 years ago
Michael DeHaan 6e84374c2a Make hostvars work post refactoring 14 years ago
Michael DeHaan b0eedfbf92 Merge pull request #639 from goozbach/issue-627
improved output in with_items fixes: #627
14 years ago
Michael DeHaan 85b9fa580c Merge pull request #644 from bradobro/common_fix
AnsibleModule now correctly reads param values with '"'.
14 years ago
bradobro a4a09fec82 AnsibleModule (in module_common.py) now correctly reads param values containing '='. 14 years ago
Stephen Fromm 8195375412 Sanitize possible password argument when logging invocation; taken from user module 14 years ago
Derek Carter 34e2584220 improved output in with_items fixes: #627 14 years ago
Rodney Quillo 5f068913ee Suppress Ubuntu ssh -tt error ioctl error. 14 years ago
Michael DeHaan a94ec130d2 Common module code upgrades 14 years ago
Michael DeHaan 9006d4557d Added code to allow insertion of boilerplate into modules to make them able to share lots of code, the result
should be a huge reduction of total ansible source, at a slight cost of difficulty in original module development.

We need to apply this now to all modules, but may need to have some exemptions to things like command, which should
subclass this module.
14 years ago
Peter Sankauskas 4b66d98332 Adding missing colon... can't believe I missed that... sorry 14 years ago
Michael DeHaan b38f8bfa80 Merge pull request #620 from pas256/patch-1
Conditional Imports should only import the first vars_file found in list
14 years ago
Peter Sankauskas 413fb15e0a Conditional Imports should only import the first file in the list, not all of them. This change stops looping through the vars_files list as soon as a file is found. 14 years ago
Seth Vidal 5ad9bc8833 when using -i"hostname," on the cli - don't complain about the host named "" not being a host - just clip it from the list 14 years ago
Michael DeHaan bfed0f14ec Merge pull request #613 from ludovicc/devel
Allow local plays to execute when --ask-sudo-pass is used on the command line
14 years ago
Ludovic Claude 26dc607c5c Revert "Change previous fix to a one line change relative to upstream"
This reverts commit 0d53b1b097.
14 years ago
Ludovic Claude 0d53b1b097 Change previous fix to a one line change relative to upstream 14 years ago
Ludovic Claude c4303c8c04 Avoid spurious error when mixing a local play with remote plays depending on --ask-sudo-pass 14 years ago
Jeroen Hoekx f1b1611956 Fix typo while handling custom facts.
This fixes #611.
14 years ago
Michael DeHaan 8bb8314d10 Inject vars need to pushed further up to make with_items work as desired. 14 years ago
Michael DeHaan 3c2cbae68e Plays and tasks now yell when they see parameters they do not understand, so that typos like 'var' for 'vars'
don't result in people having to ask questions about what is wrong with their playbook
14 years ago
Michael DeHaan e4a546e8bb Make it possible to use variables from 'vars' in the paths to task level include statements. 14 years ago
Dave Hatton 72ca9e58e7 meaningful messages if the remote md5 fails 14 years ago
Michael DeHaan 0edd0d4736 Fixing template calls 14 years ago
Michael DeHaan 5f69c557b9 Fix for the way host variables were being swallowed, plus some overall simplification. Deciding what
dictionary to use for templating now happens in exactly one place (executor_internal) and the "inject"
dictionary is passed to what needs it.
14 years ago
Dave Hatton c3205595b3 format fixes to make fetch more usable 14 years ago
Michael DeHaan b542dd8466 Fix import in ssh connection 14 years ago
Michael DeHaan 80edea2934 with_items handling code should apply to all modules, was screwed up in refactoring to only apply to 'normal'
modules.
14 years ago
Michael DeHaan 1754de3335 Misc code cleanup, mostly whitespace preferences, removing unused imports, plus a few fixes here and there. 14 years ago
Michael DeHaan 4b73931351 misc code cleanup, don't pass parameters to the connection object we can already get from Runner 14 years ago
Michael DeHaan 6341e75e33 misc code cleanup 14 years ago
Michael DeHaan 031ba43d22 minor code cleanup 14 years ago
Michael DeHaan 1d8bb17785 misc code cleanup 14 years ago
Michael DeHaan 5a63a48e6b No need to feed variables into the setup module for preservation since the file is no longer saved to disk. 14 years ago
Michael DeHaan 227c500ad7 Misc cleanup/formatting 14 years ago
Michael DeHaan 867b2437cc consolidate output code in callbacks.py, from utils, remove extra functions 14 years ago
Michael DeHaan bc71c6ddd7 add space between function 14 years ago
Michael DeHaan cb55cd6f8d removed unused function 14 years ago
Michael DeHaan 68a9adc1be Indentation cleanup (partial) 14 years ago
Michael DeHaan 244b923559 No longer need to calculate setup metadata location since we don't write
the setup file to disk.
14 years ago
Michael DeHaan 61d8e2e7c7 with_items should be processed inside the task class, also make first_available_file
and with_items incompatible.  Most cases that would need this could be solved
with vars_files.
14 years ago
Michael DeHaan 706cfd9ade Misc cleanup -- moved function out of utils, removed debug statement. 14 years ago
Michael DeHaan 19a2fc00dc Clean up imports in utils, add nicer recursion depth limit check. 14 years ago
Michael DeHaan 60d64251f8 Allow gather_facts: False in a playbook as a way of disabling the fact step if you know
you aren't going to need it.
14 years ago
Michael DeHaan 64c51ade1e Change the way we do with_items to make them happen next to each other in runner, which eliminates the problem of with_items and vars_files sometimes not playing nice with each other.
(Also a fix for the user module error handling when the user
is not present at the time of the return.  This can only really be caused by multiple ansible executions).
14 years ago
Michael DeHaan 028f216689 Error handling and magic around with_items, to let you know when variables are usable inside it and when not. 14 years ago
Michael DeHaan 102b22be1f Make the logic behind vars_files smarter, so host specific vars go into the setup cache, but other variables
are usable top level.  This allows vars_files data to be used, most of the time, just fine in with_items,
(error handling pending) but is mostly a memory and efficiency thing.
14 years ago
Michael DeHaan 15b2b3a020 Warn if something loaded by vars_files is not a dictionary 14 years ago
Michael DeHaan 279b5965b8 Much streamlining around setup steps in playbooks, now only run setup once per play. 14 years ago
Michael DeHaan 931f9f1a61 Setup module no longer saves to disk, as templates are mostly useful in playbooks and this allows lots of simplifications
around file pathing and removes occasional permissions conflicts depending on how things are used.
14 years ago
Michael DeHaan 60f295f7a0 Squashed commit of the following:
commit 4430ce3eefcdff0b0ceffea0ef66ea8e876a807d
Merge: 631783b 649963c
Author: Michael DeHaan <michael.dehaan@gmail.com>
Date:   Thu Jul 12 01:28:43 2012 -0400

    Merge branch 'host-groups' of https://github.com/dagwieers/ansible into daggroups

commit 649963ca2c
Author: Dag Wieërs <dag@wieers.com>
Date:   Thu Jul 12 23:01:00 2012 +0200

    Added comments in the example yaml file as requested

commit 7f9718f185
Author: Dag Wieërs <dag@wieers.com>
Date:   Thu Jul 12 22:49:38 2012 +0200

    Add the default nose color too, to test specific overrides

commit eb63b9e899
Author: Dag Wieërs <dag@wieers.com>
Date:   Thu Jul 12 22:44:35 2012 +0200

    Introduce comics and cartoons to test yaml groups defined on a per-node basis

commit aa13d23307
Author: Dag Wieërs <dag@wieers.com>
Date:   Thu Jul 12 19:33:15 2012 +0200

    A small fix to revert to old state

commit 264ebaa77c
Author: Dag Wieërs <dag@wieers.com>
Date:   Thu Jul 12 19:31:51 2012 +0200

    Combine both yaml unit tests into one example file

commit 7db49a8048
Author: Dag Wieërs <dag@wieers.com>
Date:   Thu Jul 12 16:46:53 2012 +0200

    Might as well fix this too

commit f36c6c8c5b
Author: Dag Wieërs <dag@wieers.com>
Date:   Thu Jul 12 16:42:00 2012 +0200

    Added unit tests for host-groups patch

    For the unit test I chose to keep the original yaml file in place as a reference.

    This patch also includes a fix.

commit a96f681352
Author: Dag Wieërs <dag@wieers.com>
Date:   Thu Jul 12 12:30:43 2012 +0200

    Allow groups to be defined on a per-host basis

    This makes it possible to define on a per-host basis what groups a host is in.
    When managing a large set of systems it makes it easier to ensure each of the
    systems is defined in a set of groups (e.g. production/qa/development,
    linux/solaris/aix) rather than having to add systems to multiple disconnected
    groups.

    ----
      - host: system01

      - host: system02

      - host: system03

      - group: linux
        hosts:
        - system01
        - system02

      - group: solaris
        hosts:
        - system03

      - group: production
        hosts:
        - system01
        - system03

      - group: qa
        - system02

      - group: dbserver
        hosts:
        - system01

      - group: ntpserver
        hosts:
        - system02

      - group: webserver
        - system03
    ----

    Can be redefined as:

    ----
      - host: system01
        groups: [ linux, production, dbserver ]

      - host: system02
        groups: [ linux, qa, ntpserver ]

      - host: system03
        groups: [ solaris, production, webserver ]
    ----
14 years ago
Michael DeHaan 611e5b0c90 Make adding tags to a playbook work as shorthand to tagging all tasks in the play. 14 years ago
Michael DeHaan cf313cde96 Soft import of paramiko since we have the SSH and local connection types now. Packaging will still
require it.
14 years ago
Michael DeHaan a765deccce Allow top level playbook files to import other playbook files, added some basic
playbook structure checking.
14 years ago
Dag Wieërs cb40778b84 Wrong evaluation of a local file before fetching the remote file 14 years ago
Timothy Appnel 84fa9dcaee The default private key file was getting set incorrectly from environment variables. My bad. 14 years ago
Ingo Gottwald 26aa4e2469 Enabled cowsay support for Ubuntu 14 years ago
Michael DeHaan dc4ebab345 Merge pull request #576 from davehatton/adjust_playbook_output_formating
improve output formating for playbook
14 years ago
Michael DeHaan 969c3feb13 Allow include statements from plays to specify tags (see tags.yml example file).
Also be smart and don't run a play at all if no tasks in the play match any of the tags specified.  This includes not running the setup actions!
14 years ago
Michael DeHaan 83f23ef861 Basic support for tagging tasks and selecting a subset of tasks to run with --tags. 14 years ago
Dave Hatton 7ecdb83800 improve output formating for playbook 14 years ago
John Kleint 375a1eaf43 Use iterative MD5 hashing. 14 years ago
Dave Hatton 55694db7c3 switch to hashlib.md5 or md5 instead of OS md5 commands 14 years ago
Michael DeHaan 0d28466b22 When sudo'ing to root, keep the setup file location as /etc/ansible/setup 14 years ago
Michael DeHaan c2b8fabf66 Take a remote md5sum before a file transfer to decide whether to transfer the file or not.
Allows for efficient transfer of large files.  Templates do not sample first because they are small.
14 years ago
Michael DeHaan 8220d57690 Clean up md5 functions + make the fetch module stay happy if the remote file does not exist. 14 years ago
Michael DeHaan b551eba6d4 Comment uncommented methods in utils 14 years ago
Michael DeHaan a490213d45 Release bump to start development on 0.6 14 years ago
Michael DeHaan e3aba7770f Merge pull request #518 from brainpage/devel
adds 'groups' variable, essentially making hosts file accessible as a var
14 years ago
Daniel Hokka Zakrisson 9882dd56f6 Allow variables in variables in templates 14 years ago
alex f72b1f4fd7 Fixed: pathname for tmp 14 years ago
alex bbf2939063 Fixed: executing templates outside playbooks 14 years ago
Jonathan Palley cedbcfcc0a adds 'groups' variable, essentially making hosts file accessible as a variable 14 years ago
Michael DeHaan a5dd280149 Fix up the output of the raw module when run within /usr/bin/ansible 14 years ago
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.
14 years ago
Jeroen Hoekx d592e15dcc Correctly add ungrouped hosts to 'ungrouped' in YAML inventory. 14 years ago
Michael DeHaan afb2e3e5ac Merge pull request #511 from dsummersl/devel
added ability to ovverride all ssh settings via ANSIBLE_SSH_ARGS
14 years ago
Dane Summers 37fce9c0f6 added ability to ovverride all ssh settings via ANSIBLE_SSH_ARGS 14 years ago
Michael DeHaan 8468e2255b Merge pull request #507 from jhoekx/convention-library-path
Add ./library to module search path.
14 years ago
Jeroen Hoekx 879ddddf6f Add ./library to module search path.
It allows for custom modules in the best practices directory structure.
Bundling custom modules along with playbooks in packages is useful.
14 years ago
Jeroen Hoekx 6c92d2fa88 Import ansible errors in Poller. 14 years ago
Michael DeHaan 618924a24f Merge pull request #497 from davehatton/change_constants
shouldn't need a (slash) before /home/daveh
14 years ago
Dave Hatton d42df3a82e change to STDOUT from PIPE to get ssh connection module working 14 years ago
Dave Hatton d28bbe14ed shouldn't need a (slash) before /home/daveh 14 years ago
Dave Hatton 30d4f070a1 change STDOUT to PIPE to get ssh connection module working 14 years ago
Daniel Hokka Zakrisson fa887bc90f Merge stdout and stderr for non-sudo 14 years ago
Daniel Hokka Zakrisson 7884bc02ea Wait for process to finish and then parse output 14 years ago
Seth Vidal dca75033fe add -q to handle stdout/stderr being combined, add catch for ControlPersist not existing in ssh for rhel6, etc 14 years ago
Michael DeHaan 9662902c31 Merge pull request #492 from dhozac/unnecessary-parse_json
Remove unnecessary parse_json invocation
14 years ago
Michael DeHaan 071978a2e7 Merge pull request #493 from dhozac/ssh-merge-stdouterr
Merge stdout and stderr as that is what is expected
14 years ago
Daniel Hokka Zakrisson f5ecd075f7 Remove unnecessary parse_json invocation 14 years ago
Michael DeHaan bd653c8f3c Merge pull request #488 from dhozac/jinja2-env
Create a Jinja2 environment allowing includes
14 years ago
Michael DeHaan e0f12292d8 Merge pull request #489 from dhozac/ssh-args-default
Default to using a ControlMaster connection
14 years ago
Daniel Hokka Zakrisson 7f6359b143 Default to using a ControlMaster connection 14 years ago
Daniel Hokka Zakrisson d08ba12a42 Merge stdout and stderr as that is what is expected
Should also fix problems where something might output an error
before the sudo prompt.
14 years ago
Seth Vidal 1ec518543e make Runner options conflict errors raise AnsibleErrors not traceback in general
add catch if -c ssh and -k are passed at the same time since the ssh connection type doesn't
support passwords
14 years ago
Daniel Hokka Zakrisson 9f93839d13 Create a Jinja2 environment allowing includes 14 years ago
Daniel Hokka Zakrisson ab08fea1aa Add an ssh command wrapper transport 14 years ago
Daniel Hokka Zakrisson 13b814a33c Run templating function until the text doesn't change
This allows variables to contain other variables.
14 years ago