Commit Graph

377 Commits (ce1de28061414c54ab95053fd642a02e9acd9079)

Author SHA1 Message Date
Michael DeHaan 7fd4051857 make connection types pluggable 13 years ago
Michael DeHaan 9851066f4d Adding ability to set ssh args from config file 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
Michael DeHaan 7ab0d60b1a update config code 14 years ago
Michael DeHaan 62fbbf7653 config file support 14 years ago
Michael DeHaan deec50fc3c Default -u (user) and "user:" in playbooks to the current user. 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 1754de3335 Misc code cleanup, mostly whitespace preferences, removing unused imports, plus a few fixes here and there. 14 years ago
Timothy Appnel 84fa9dcaee The default private key file was getting set incorrectly from environment variables. My bad. 14 years ago
Dave Hatton d28bbe14ed shouldn't need a (slash) before /home/daveh 14 years ago
Daniel Hokka Zakrisson ab08fea1aa Add an ssh command wrapper transport 14 years ago
Timothy Appnel 5ea8ad2d94 Most constants can be overriden with environment variables. Reserved doing anything with the connection options for further review. 14 years ago
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
14 years ago
Michael DeHaan 60d44e1a01 Squashed commit of the following, plus some streamlining (MPD).
commit e00368e7c65c65bed11fcaaf83fe8b093dbf492e
Merge: 2ea7110 c039aa0
Author: Michael DeHaan <michael.dehaan@gmail.com>
Date:   Thu May 10 01:43:10 2012 -0400

    Merge branch 'devel' of https://github.com/weaselkeeper/ansible into weaselkeeper-devel

commit c039aa0915
Author: Jim Richardson <weaselkeeper@gmail.com>
Date:   Fri May 11 17:55:13 2012 -0700

    cleanup and simplification of ANSIBLE_REMOTE_TMP feature

commit d87f15b796
Merge: 5917aba 4c2fd25
Author: Jim Richardson <weaselkeeper@gmail.com>
Date:   Fri May 11 17:30:16 2012 -0700

    Merge branch 'devel' of github.com:weaselkeeper/ansible into devel

commit 5917aba761
Author: Jim Richardson <jrichardson@classmates.com>
Date:   Wed May 9 11:25:45 2012 -0700

     ANSIBLE_REMOTE_TMP environment variable sets where ansible will stuf tmp files on remote host.  Default is /var/tmp for root, and $HOME/.ansible/tmp for non-root

commit 4c2fd25777
Author: Jim Richardson <jrichardson@classmates.com>
Date:   Wed May 9 11:25:45 2012 -0700

     ANSIBLE_REMOTE_TMP environment variable sets where ansible will stuf tmp files on remote host.  Default is /var/tmp for root, and $HOME/.ansible/tmp for non-root
14 years ago
Jim Richardson 93a20a33e9 first bit of getting sudo -u functionality 14 years ago
Michael DeHaan f2465e0571 Add support for specifying sudo passwords to both ansible & playbook. Nopasswd sudo is no longer required. 14 years ago
Stephen Fromm 896f8de446 Add DEFAULT_TRANSPORT and DEFAULT_TRANSPORT_OPTS constants
DEFAULT_TRANSPORT is set to paramiko.  DEFAULT_TRANSPORT_OPTS is a list
of possible transport options; it is set to local and paramiko.
14 years ago
Christopher Johnston f06ec76fdb add support for using an alternate remote port 14 years ago
Michael DeHaan 5be1a612d3 Add async polling logic to runner. Will add to playbook shortly, have to diagnose why paramiko
is not letting async_wrapper daemonize itself when it does work fine when directly executed.
14 years ago
Tim Bielawa f2c2786a14 Update constants.py to pull module path and the hosts file from the
environment (ANSIBLE_{LIBRARY,HOSTS}) if defined.

Update manpages to represent this.

Also update the env-setup script to set ANSIBLE_{LIBRARY,HOSTS}.
14 years ago
Michael DeHaan 8d06c074b1 * Added uptime.py as an example of somewhat minimal API usage & reporting
* Pattern in API now has a default
* Fixed bug in template module operation detected from running playbook (tests for that pending)
* Workaround for multiprocessing lib being harmlessly squeaky (feeder thread got sentinel)
14 years ago
Michael DeHaan 687a315a80 Increasing default --forks to 5 14 years ago
Michael DeHaan 847846af0e -p has been replaced by a required option. Various docs changes. 14 years ago
Michael DeHaan bed29b7e11 Allow the /etc/ansible/hosts file to contain groups and those group names to be used in place
of pattern names.
14 years ago
Michael DeHaan be4cb64c92 Relicensing to GPLv3, all previous committers ok'd on mailing list. 14 years ago
Michael DeHaan e5f62f20b1 make copy & template module take key/value parameters so we're consistent. Only the command
module works differently now

starter manpage for modules

allow template file location to be passed into template & setup modules
14 years ago
Michael DeHaan 6eda2cf383 Added initial stub for where playbooks will go, moved to common
constants file so as to not repeat constants between CLI and lib.
14 years ago