Commit Graph

1686 Commits (d3a97bfb078c4393142b24d4d2aa3c699bfc94c2)

Author SHA1 Message Date
Brian Coca 18cb155bd5 now ANSIBLE_KEEP_REMOTE_FILE acts as boolean
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
12 years ago
Michael DeHaan fba1f7ef42 Revert "expand vars like $HOME used in config values too" -- breaks remote_tmp if set.
This reverts commit e5ff35bbdb.
12 years ago
Michael DeHaan afcd869487 Merge pull request #3451 from sergevanginderachter/template_ansible_ssh_host
allow ansible_ssh_host to be templated
12 years ago
Michael DeHaan 90dfc115d6 Merge pull request #3463 from stoned/filterskipped
Add Jinja2 filter 'skipped' to test for a registered variable from a ski...
12 years ago
Michael DeHaan 279247dfac Merge pull request #3464 from stoned/filterquote
Add Jinja2 filter 'quote' to quote string for shell usage
12 years ago
Andreas Piesk e5ff35bbdb expand vars like $HOME used in config values too 12 years ago
Lasse Borchard 8c8b4d56fc Fixed indention of vv() output 12 years ago
Stoned Elipot 247322bb16 Add Jinja2 filter 'quote' to quote string for shell usage 12 years ago
Stoned Elipot 906746b1f0 Add Jinja2 filter 'skipped' to test for a registered variable from a skipped task 12 years ago
Michael DeHaan cf6e1f8db9 Make it possible to tell paramiko to not record new host keys, which can be slow with a large number of hosts.
-c ssh is preferred in most cases if you have ControlPersist available, otherwise if you are comfortable you
can turn off recording while leaving host key checking on, etc.
12 years ago
Michael DeHaan 14818af446 Merge pull request #3450 from tonk/sudo
Repair issue #3447
12 years ago
Michael DeHaan aa9385411d Merge pull request #3443 from ajsalminen/arg_unicode_fix
Use .encode() instead of str() to support unicode arguments.
12 years ago
Ton Kersten 37ee361be1 Repair issue #3447 12 years ago
Serge van Ginderachter 129c7522d9 allow ansible_ssh_host to be templated
Use case: e.g. dual homed hosts on production en management network

The inventory_hostname is the regular host name and matches the
dns name on the production network; ansible connects to the host
through a management network; the dns name on the management network
is standardized and equals ${inventory_hostname}-mgt.mynetwork.com

Now this can be configured as the default in group_vars/all:

   ansible_ssh_host: {{ inventory_hostname + '-mgt.mynetwork.com' }}
12 years ago
Michael DeHaan 2cb7c30834 Improve interlaced output prevention when asking for host key approval. 12 years ago
Michael DeHaan c55adc9ac9 Default to 'smart' transport, which will use OpenSSH if it can support ControlPersist. 12 years ago
Antti Salminen d7c6cf10c2 Use .encode() instead of str() to support unicode arguments.
str() throws an UnicodeEncodeError for code points that cannot be
represented in 7-bit ASCII. This makes it impossible to use any
non-ASCII characters in module arguments. Using encode('utf-8')
gives the desired result.
12 years ago
Michael DeHaan 1683d44d2e Lock around SSH connectivity to new hosts in host checking mode such that prompts for host approval
messages do not get interlaced.
12 years ago
Michael DeHaan cb26945d54 Close the named temporary file. 12 years ago
Michael DeHaan 3b1aa092f8 Closing stdin too early. 12 years ago
Michael DeHaan ffadbc520a Enable paramiko to ask whether to add keys to known hosts. 12 years ago
Michael DeHaan 9db4f7a9a6 Makes host key checking the default behavior but can be disabled in ansible.cfg or by environment variable. 12 years ago
Stoned Elipot 0b3483cf03 Add Jinja2 filter |bool : return boolean interpretation of the value
'yes', 'on', '1', 'true', insensitively, and 1 are true,
 everything else is false
12 years ago
Michael DeHaan 6ba72854ee Merge pull request #3296 from ninetythirty/devel
Added flexible filename handling for main files
12 years ago
Michael DeHaan c2988dfdb0 Merge branch 'option-updates' of git://github.com/jlund/ansible into devel
Conflicts:
	bin/ansible-pull
12 years ago
Michael DeHaan 2bbad5dae3 Merge pull request #3275 from madduck/implicit-negations
Enable negated patterns
12 years ago
Michael DeHaan f2fc185651 Styling: indentation 12 years ago
Michael DeHaan c265c761d0 Slight message tweak. 12 years ago
Michael DeHaan e6adc2f066 Merge branch 'devel' of git://github.com/arturaz/ansible into devel 12 years ago
Michael DeHaan 146455fd0a Merge pull request #3375 from jhoekx/mandatory-filter
Add a mandatory jinja2 filter for use in templates.
12 years ago
Michael DeHaan 98e7eaf07a Merge pull request #3316 from dsedivec/devel
expanduser on each component of plug-in paths
12 years ago
Stoned Elipot b7f89837bb Remove redundant call to _get_path() in PluginLoader.find_plugin() 12 years ago
Jeroen Hoekx a37f55d32e Add a mandatory jinja2 filter for use in templates. 12 years ago
Joshua Lund dc984d94ac Updates to Ansible command options
* 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.
12 years ago
Jesse Keating e1dd83f2b6 add_host should not be a changed action
The action doesn't actually change anything on a system, so setting
the status to changed is wrong. add_host is much like set_fact in that
regard.

Since changed is False by default, there is no need to explicity set
it, so just create an empty dict for result and add to it from there.
12 years ago
Arturas Slajus 9be93d6ac7 Better error for fireball + sudo mode. 12 years ago
Dale Sedivec b32131c867 expanduser on each component of plug-in paths
ansible.constants was calling expanduser (by way of shell_expand_path)
on the entire configured value for the library and *_plugins
configuration values, but these values have always been interpreted as
multiple directories separated by os.pathsep.  Thus, if you supplied
multiple directories for one of these values, typically only the first
(at least on *nix) would have e.g. "~" expanded to HOME.

Now PluginLoader does expansion on each individual path in each of
these variables.
12 years ago
Ninety Thirty 7b1e87b62d Added flexible filename handling for main files
tasks, handlers, and vars main files can now be any of main, main.yml, or main.yaml
12 years ago
martin f. krafft fd02443d42 Enable negated patterns
A host pattern of the form '!foo' by itself does not work, but
'all:!foo' does. If the first pattern is a negation, this commit
automatically prepends 'all'.

Signed-off-by: martin f. krafft <madduck@madduck.net>
12 years ago
Michael DeHaan 010440dc47 Merge pull request #3114 from laggyluke/roles_combine_vars
Added basic support for hash_behaviour=merge in roles
12 years ago
Michael DeHaan fc45470162 Merge branch 'with_inventory_hostnames' of git://github.com/sdossett/ansible into inv_hostnames 12 years ago
Michael DeHaan 0ce7996bb6 Merge pull request #3266 from trbs/20130619_first_found
enable use of multiple terms in first_found
12 years ago
Michael DeHaan d2721526de Small tweak, don't merge conditionals, just evaluate each in turn. 12 years ago
Michael DeHaan d9c0a5c37d Revert "now modules can implement with_items list globbing w/o updating"
This reverts commit 4942a06bc2.

Conflicts:

	lib/ansible/runner/__init__.py
12 years ago
trbs 87c7fa9138 enable use of multiple terms in first_found 12 years ago
George Miroshnykov c642ba77ae Added basic support for hash_behaviour=merge in roles
Dict vars passed to roles are now properly merged
instead of simply overriding dict vars that are
coming from vars_files.
12 years ago
Jesse Keating 1074896105 make name the parameter, with hostname as alias
name is used throughout Ansible, it's the "standard". This change
applies that standard to the add_host routine and updates the docs to
reflect that. Related to https://github.com/ansible/ansible/pull/3254
12 years ago
Michael DeHaan fc2d25eb82 Merge pull request #3127 from bennojoy/devel
bug fix for #3077, environment settings for script
12 years ago
Michael DeHaan 132c89e681 Merge branch 'callbackinit' of git://github.com/sergevanginderachter/ansible into devel 12 years ago
Michael DeHaan 7193ff5fbf Merge pull request #3250 from gildegoma/more_magical_ansible_ssh_user
Make 'ansible_ssh_user' available in templates
12 years ago