* Moved the --list-hosts option that is common to both `ansible` and
`ansible-playbook` into utils/__init__.py (corrects a FIXME)
* Wrote new help text for the --list-hosts option that makes sense
for both of the commands that it applies to
* Changed the usage argument in `ansible-playbook` so that it is
setup in the base_parser method the same way that it is in
the `ansible` executable
* Updated the help text for several options to correct typos,
clarify meaning, improve readability, or fix grammatical errors.
In the case of `ansible-pull`, I changed the help text so that
it adheres to the same standards as the other executables.
Add option to specify inventory. No default is defined since
ansible-playbook already does this and it allows an ansible.cfg in the
git repository to take precedence.
Overall, this should help ansible-pull work with less setup in advance,
which should be helpful in kickstart scenarios. Much of this was
discussed in issue #2464.
A first stab at a pull-based model for ansible. This does two things:
1. Invoke the git module via Runner to set up a git repository on the
localhost. It sets up Runner to use transport='local' and forces
the inventory to just 'localhost'.
2. Run any playbooks provided. By default, this wants to run the
playbook local.yml. This also sets transport='local' and sets
the host_list to a list: localhost, fqdn, and hostname.
The reason for setting the host_list and not using override_hosts is
because there may be plays in the playbook that are not meant for a
specific host. That is, if the git repository is for the entire site
and not host-specific, you don't want to override hosts and apply all
plays to any given host. This has the downside of potentially running a
play three times if the play is defined for 'hosts: all'.