Commit Graph

64 Commits (41451aced9619899ae14c181d8a6f739570a5c0b)

Author SHA1 Message Date
Michael DeHaan a78edbb45c More pep8 2013-05-11 17:26:06 -04:00
Matt Coddington 542eeeb5d6 add option to ignore $legacy variable style substitution 2013-05-11 14:06:01 -04:00
Michael DeHaan b8fdcff524 Merge branch 'nocows' of git://github.com/jpmens/ansible into devel
Conflicts:
	lib/ansible/callbacks.py
	lib/ansible/constants.py
2013-04-27 11:34:39 -04:00
Michael DeHaan aa55268514 Adds a logfile for ansible playbooks that can be set by the environment or configuration file. 2013-04-27 10:24:26 -04:00
Jan-Piet Mens dfd885a012 Make ANSIBLE_NOCOWS configurable
nocows = 1 in ansible.cfg
	or old environment variable ANSIBLE_NOCOWS=1
add to ansible.cfg example
2013-04-23 16:43:23 +02:00
willthames e55e123c01 Added DEFAULT_EXECUTABLE as a constant
Use DEFAULT_EXECUTABLE when no executable is passed to
_low_level_command_exec

Works as a standard constant - can be overridden in all the normal ways
and defaults to /bin/sh

Motiviation is for a user that only has /bin/bash in /etc/sudoers
2013-04-04 13:32:23 +10:00
Michel Blanc 0cd0a7fda3 Fixes jina typos
Moved *jina* to *jinja2*
2013-02-16 13:32:48 -05:00
Michel Blanc 1c22f2146e Adds configurable jinja2 extension loading
Jinja extensions adds features to the jinja2 templating engine. This
patch allows module loading for the templating engine vian an
ansible.cfg configuration key (jinja_extensions).
The default behaviour doesn't change (no module loading).
Requested modules can be added coma separated in ansible.cfg

Adds whitespace handling in jinja_extension config

Added whitespace handling in jinja_extension configuration directive, so
things stay safe if user adds spaces around comas in the directives
list.

Adds config example for jinja_extensions

Added config example with multiple extentions for jinja_extensions
2013-02-16 13:32:48 -05:00
Daniel Hokka Zakrisson 5268d49bad Add sudo_flags configuration option to alter sudo behaviour
Default to -H to set $HOME appropriately.
2013-01-28 17:41:43 +01:00
fdavis 925c1a4611 add env vars for plugins action,callback,connection,lookup,vars,filter 2013-01-26 09:25:35 -08:00
Michel Blanc e28e538c6e Adds user-selectable hash merging support in vars
Hash variables are currently overriden if they are redefined. This
doesn't let the user refine hash entries or overriding selected keys,
which can, for some, be a desirable feature.
This patch let the user force hash merging by setting the
hash_behaviour value to "merge" (without the quotes) in ansible.cfg

However, by default, ansible behaves like it always did and if any value
besides "merge" is used ("replace" is suggested in the example ansible.cfg
file), it will also behave as always.
2013-01-23 21:39:34 +01:00
ron1 280660b8a7 Support sudo alternatives that offer sudo-compatible interfaces 2013-01-19 08:40:32 -05:00
Stephen Fromm 6a68d3813f Set LANG in module_common.py
Add constant DEFAULT_MODULE_LANG that defaults to C.  Can be set via
environment variable ANSIBLE_MODULE_LANG or configuration variable
module_lang.  Updated test-module to have same behavior.
2012-11-27 00:16:06 -08:00
Daniel Hokka Zakrisson 5183417de8 Reinstate ANSIBLE_KEEP_REMOTE_FILES
Fixes #1395.
2012-11-18 18:32:45 +01:00
Daniel Hokka Zakrisson c906f44d90 Use the ssh_connection section for scp_if_ssh 2012-11-16 23:45:47 +01:00
Stephen Fromm 06e54c0b97 Add ability to specify syslog facility for modules
Update constants.py so that one can specify environmental variable
ANSIBLE_SYSLOG_FACILITY or syslog_facility in ansible.cfg to define
the syslog facility to use.  Alternatively, you can specify
ansible_syslog_facility in inventory.  Runner now replaces
the syslog facility in the openlog() call with the default or
the injected variables ansible_syslog_facility.

This also updates hacking/test-module to behave similarly.
2012-11-11 00:14:08 -08:00
Michael DeHaan 3dc31a049f Merge pull request #1527 from fdavis/devel
Support scp in an ssh connection
2012-11-08 16:42:37 -08:00
fdavis b1dbeec66c Allows use of scp instead of sftp in
Added a boolean constant scp_if_ssh to the config
Added scp support for the ssh connection plugin
Refers to #1279
2012-11-05 14:25:40 -08:00
Jeroen Hoekx 8ffed6df75 Support custom jinja2 filters.
This uses the plugin framework to add filter plugins.
The previously hardcoded core filters are defined using the plugin
framework now.
2012-11-05 15:11:34 +01:00
Michael DeHaan 6f938c9f4c Merge branch 'playbook_ssh_ask_pass' of git://github.com/clatour/ansible into devel
Conflicts:
	examples/ansible.cfg

+ doc tweak
2012-11-03 19:23:38 -04:00
Michael DeHaan 908c43ad7f Merge branch 'devel' of git://github.com/skorokithakis/ansible into devel 2012-11-03 19:19:59 -04:00
Chandler Latour f436a8c88b Added config option for default ask for ssh_pass 2012-11-02 10:53:26 -05:00
Stavros Korokithakis 3616dffb68 Detect whether we're running in a virtualenv. 2012-11-02 01:42:04 +02:00
Stavros Korokithakis d9a377cbb1 Fix installing to virtualenvs. 2012-11-01 20:40:28 +02:00
Brian Coca 604bf9f58a Added config option to control default of asking or not for sudo password
Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>
2012-10-30 23:36:07 -04:00
Michael DeHaan be300b562a pyflakes fixes (mostly unused imports, unused vars) 2012-10-30 20:47:05 -04:00
Michael DeHaan 6ba30170dd Make group_vars and host_vars available to usr/bin/ansible, and make vars_plugins exist 2012-10-26 19:55:59 -04:00
Michael DeHaan d509dfc969 delete extra else clause 2012-10-18 20:27:39 -04:00
willthames 5a769a5a4d Fixed tests to reflect desired configuration behaviour
Test for when environment variable and configuration file
variable both set now tests that the environment variable takes
precedence

Removed logic that would never be triggered from
lib/ansible/constants.py
2012-10-18 12:53:30 +10:00
Michael DeHaan fd6a26239c Env var vs config priority fixing 2012-10-17 22:34:59 -04:00
Michael DeHaan 63100c9bc0 Docs + fix variable precedence of environment variables (ok, ok, I give in!) 2012-10-16 18:40:01 -04:00
Daniel Hokka Zakrisson ab44a4abba Load additional plugins from path specified in configuration 2012-10-14 21:09:24 +02:00
Tim Bielawa baa91ebc95 Add DIST_MODULE_PATH so setup.py and ansible.spec can live in harmony. Closes #1277 2012-10-11 13:22:30 -04:00
Jan-Piet Mens 9ed59da294 Allow user-specified $ansible_managed string with named parameters 2012-10-04 08:50:51 +02:00
Lorin Hochstein aa5ef9561d ANSIBLE_CONFIG take precedence over ./ansible.cfg 2012-09-29 10:44:14 -04: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
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
```
2012-09-10 17:57:32 +03:00
Michael DeHaan 7fd4051857 make connection types pluggable 2012-08-18 10:52:24 -04:00
Michael DeHaan 9851066f4d Adding ability to set ssh args from config file 2012-08-14 20:13:02 -04:00
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.
2012-08-14 20:22:47 +10:00
Michael DeHaan 7ab0d60b1a update config code 2012-08-13 20:17:07 -04:00
Michael DeHaan 62fbbf7653 config file support 2012-08-13 19:17:59 -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 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.
2012-08-10 02:45:29 -04:00
Michael DeHaan 1754de3335 Misc code cleanup, mostly whitespace preferences, removing unused imports, plus a few fixes here and there. 2012-07-15 12:29:53 -04:00
Timothy Appnel 84fa9dcaee The default private key file was getting set incorrectly from environment variables. My bad. 2012-07-12 13:30:30 -04:00
Dave Hatton d28bbe14ed shouldn't need a (slash) before /home/daveh 2012-06-21 15:37:43 +01:00
Daniel Hokka Zakrisson ab08fea1aa Add an ssh command wrapper transport 2012-06-17 20:34:17 +02:00
Timothy Appnel 5ea8ad2d94 Most constants can be overriden with environment variables. Reserved doing anything with the connection options for further review. 2012-06-11 18:07:44 -04:00
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
2012-05-14 16:14:38 -04:00