Hi Everyone,
Everybody's been busy and it's time for another update of all of the
cool things I've merged lately. This is all in the changelog now,
but here's an annotated explanation!
=== THE LIST ==
* output on failed playbook commands is now nicely split for
stderr/stdout and syntax errors
When running a playbook, If you have a command fail and a module gave
you three pages of output, it's nice to not have those stderr and
stdout messages inside the JSON curly brackets. It should now be
much more readable in those cases. (We may be doing a bit more of
this upgrade wise, but this is a start)
* if local_action is not used and delegate_to was 127.0.0.1 or
localhost, use local connection regardless
If someone decides to use delegate_to instead of the "local_action"
syntactic sugar, it should work exactly the same. This patch also
allows you to use a variable in "delegate_to".
* explicit quoting around only_if statements is no longer neccessary
No longer do you have to say:
only_if: "'$some_variable' == 'foo'"
You can now say:
only_if: '$some_variable' == 'foo'
* is_unset is also available in only_if in addition to is_set
This is now possible:
only_if: is_unset($some_variable)
Just like this was already possible:
only_if: is_set($some_variable)
* negative host matching (!hosts) fixed for external inventory script usage
If you are using inventory scripts to pull inventory from OpenStack
Nova, EC2, or Cobbler, (etc), this fixes the handling of negative
groups.
This is like when you would say:
hosts: all:!webservers
to select all hosts that aren't webservers. This already worked
before but there was a small bug with script based inventory data.
* pause plugin (pause seconds=10) (pause minutes=1) (pause prompt=foo)
action plugin
This is a cool new feature from Tim Bielawa. This allows you to
pause at arbitrary points of your play for X minutes or seconds, or
until a prompt is given.
When used with the "serial" keyword it will pause every N hosts,
otherwise it's once for all hosts.
- action: pause seconds=10
- action: pause minutes=3
- action: pause prompt='enter something to continue'
Etc. Try it out!
* cleaner error messages with copy if destination directory does not exist
Previously if you tried to copy into some remote directory
/that/did/not/exist it would tell you the destination was not
writeable. This wasn't too clear, so now it will tell you that the
directory
does not exist, when it in fact does not exist
* internals: os.executable check replaced with utils function so it
plays nice on AIX
If you're using ansible to talk to AIX nodes, this fixes a few checks
throughout the app. Developers should use utils.is_executable or
module.is_executable where you need similar
behavior elsewhere.
* when running a playbook, and the statement has changed, prints
'changed:' now versus 'ok:' so it is obvious without colored mode
When running without colors enabled (NOCOLOR=1, not supporting color
in your terminal, etc) it wasn't easy to tell when something resulted
in a change state when running your playbook. Now when things have
changed, it prints "changed" vs just "ok".
* variables now usable within vars_prompt (just not host/group vars)
This is kind of a rare thing, but if you want to define a variable
message to prompt with in vars_prompt, you can now do that.
* setup module now still works if PATH is not set
Pretty much as it says, if you for some reason don't have a PATH set,
the setup module now won't choke.
* Debian packaging now includes ansible-pull manpage
* magic variable 'ansible_ssh_host' can override the hostname (great
for usage with tunnels)
This has been needed for a while. What if you have lots of tunnels
and stuff? Well, you can do this!
[servers]
alias1 ansible_ssh_port=1234 ansible_ssh_host=bastion
alias2 ansible_ssh_port=1235 ansible_ssh_host=bastion
alias3 ansible_ssh_port=1236 ansible_ssh_host=bastion
And now you can easily express that kind of setup in your inventory
file. Previously you had to use resolv.conf to implement aliases.
* service module status now correct for services with 'subsys locked' status
* misc fixes/upgrades to the wait_for module
* date command usage in build scripts fixed for OS X
* git module now expands any "~" in provided destination paths
If you do dest=~/somedir the git module now works with that data.