Commit graph

28 commits

Author SHA1 Message Date
Brian Coca
bb58cbcd91 now use combine vars to preserve existing cached host vars 2015-03-20 11:34:53 -04:00
Brian Coca
e3e97f6e06 now correctly aplies add_host passed variables last to override existing vars. 2015-03-20 11:23:50 -04:00
Brian Coca
6dca95b309 now add_host loads hostvars 2015-03-20 10:34:51 -04:00
James Cammarata
ee18c557ec Load group_vars for new groups loaded via add_host
Fixes #8605
2014-08-14 13:18:26 -05:00
James Cammarata
188ab7b952 Check groupnames for None as well as an empty string in add_host
Fixes #7585
2014-05-29 11:01:11 -05:00
jeromew
5c965a75f0 ssh_alt.py / decrease # of ssh roundtrips 2013-12-13 14:23:40 -05:00
Michael DeHaan
74e4ccb59b Revert "ssh_alt.py / decrease # of ssh roundtrips"
This reverts commit 7f8863f96d.
2013-12-10 19:23:52 -05:00
jeromew
7f8863f96d ssh_alt.py / decrease # of ssh roundtrips 2013-12-10 06:00:21 -05:00
James Tanner
12ed39ef7b Fixes #5056 Append new hosts to the groups cache 2013-11-27 13:04:31 -05:00
Tim Gerla
51a1709253 add_group module: strip trailing/leading whitespace from comma-separated group names 2013-10-17 14:13:55 -07:00
Michael DeHaan
41aaad69aa Make add_host clear the inventory pattern cache, add some more aliases. Fixes #4442. 2013-10-11 16:37:10 -04:00
James Tanner
52aea868df Allow for updating host vars in add_host 2013-10-04 16:15:17 -04:00
Stoned Elipot
f0743fc32a Introduce the 'always_run' task clause.
The 'always_run' task clause allows one to execute a task even in
check mode.

While here implement Runner.noop_on_check() to check if a runner
really should execute its task, with respect to check mode option
and 'always_run' clause.

Also add the optional 'jinja2' argument to check_conditional() :
it allows to give this function a jinja2 expression without exposing
the 'jinja2_compare' implementation mechanism.
2013-08-20 23:09:44 +02:00
Lasse Borchard
8c8b4d56fc Fixed indention of vv() output 2013-07-08 11:18:33 +02:00
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.
2013-06-25 10:58:55 -07:00
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
2013-06-18 21:11:52 -07:00
Michael DeHaan
251f19263c Remove unneeded import. 2013-04-12 10:23:53 -04:00
Daniel Hokka Zakrisson
ae8d6ac303 Ensure complex_args is considered in all action_plugins 2013-02-28 14:27:42 +01:00
Michael DeHaan
ab389d8908 For consistency, add host should take a key named 'name' in addition to 'hostname'. 2013-02-17 20:45:37 -05:00
Kavin Kankeshwar
359ac9a495 Fixing syntax error
running install_lib
byte-compiling /usr/lib/python2.6/site-packages/ansible/runner/action_plugins/add_host.py to add_host.pyc
SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/ansible/runner/action_plugins/add_host.py', 37, 92, '    def run(self, conn, tmp, module_name, module_args, inject, complex_args=None, **kwargs)\n'))
2013-02-17 15:35:58 -08:00
Michael DeHaan
1ecf4a6943 Working on complex argument support. 2013-02-17 15:01:49 -05:00
Michael DeHaan
b365e04616 Allow add_host to add hosts to multiple groups, groups is now an alias for groupname. 2013-02-17 11:22:50 -05:00
Rob Parrott
ef17fc9f20 add the ability to take variables in the add_host module, and be willing to parse a host:port hostname handed to add_host 2013-02-16 20:27:38 -05:00
Daniel Hokka Zakrisson
1becc665b2 Fix missing ) in add_host
Fixes #1980.
2013-02-04 12:21:33 +01:00
Michael DeHaan
fed82c2188 This implements a basic --check mode which for now is only implemented on template & copy operations. More detail will be shared with the list
shortly.
2013-02-03 20:34:13 -05:00
Daniel Hokka Zakrisson
bda08c8a1b Avoid creating temporary directory for some action plugins
This ensures we don't litter remote systems with temporary directories
that don't get cleaned up, as well as speeds things up from not having
to touch every node.
2012-11-28 21:34:55 +01:00
Seth Vidal
70d61fe7e8 need to use the variabled results 2012-11-09 00:16:17 -05:00
Seth Vidal
e147ad4213 add add_host action plugin - add hosts to inventory during a playbook
run - lets act on those hosts in the next play
2012-11-09 00:16:17 -05:00