Commit Graph

320 Commits (b0e1efbd62b683cd4ab9620372660ab11f139ce6)

Author SHA1 Message Date
James Cammarata d02dee37a1 Disallow setting state on template tasks
Fixes #14056
2016-01-21 15:02:24 -05:00
James Cammarata 54cde0d082 Standardize removal of BECOME-SUCCESS method and use it for async too
Fixes #13965
Fixes #13971
2016-01-20 15:27:28 -05:00
Brian Coca c09c01a1f5 go back to defaulting wrapping commands in shell
this was taken out in an effort to default to the user's shell but creates issues as this is not known ahead of time
and its painful to set executable and shell_type for all servers, it should only be needed for those that restrict the user
to specific shells and when /bin/sh is not available. raw and command may still bypass this by explicitly passing None.
fixes #13882

still conditional
2016-01-19 22:09:17 -05:00
Toshio Kuratomi ca8261ed31 Don't tracback trying to retore settings
Can occur if we exit the timeout before the settings were changed
2016-01-19 14:09:22 -08:00
Toshio Kuratomi 36aa89ac7e Fix erroneous fetch fail when fail_on_missing is set to False
Fixes #13832
2016-01-15 16:28:17 -08:00
Toshio Kuratomi 1b82de2354 Non-newstyle modules can't use pipelining
This is because we pass arguments to non-newstyle modules via an
external file.  If we pipeline, then the interpreter thinks it has to
run the arguments as the script instead of what is piped in via stdin.
2016-01-14 17:21:15 -08:00
Brian Coca cf9dfde15b Merge pull request #13751 from bcoca/module_internal_options
pass diff and verbosity settings to modules
2016-01-12 11:49:48 -05:00
Brian Coca c91df36ebe added module name to missing interpreter error
fixes #13816
2016-01-12 11:25:11 -05:00
Matt Martz 5f0a348447 Restore ability for a module to specify WANT_JSON 2016-01-08 11:37:28 -06:00
Brian Coca b7dcd7a3a0 pass diff and verbosity settings to modules
also simplifies and guarantees that all flags are always passed, even when false
this should make checks simpler as you always expect them to exist
2016-01-07 01:37:19 -05:00
Toshio Kuratomi 8d57ffd16b Revert "Transform the command we pass to subprocess into a byte string in _low_level-exec_command"
This reverts commit 0c013f592a.

Going to do this in the connection plugin
2016-01-04 19:25:40 -08:00
Toshio Kuratomi 559ba467c0 Revert "Convert to bytes later so that make_become_command can jsut operate on text type."
This reverts commit c4da5840b5.

Going to do this in the connection plugins
2016-01-04 19:25:40 -08:00
Michael Scherer 8599c56670 Do not set 'changed' to True when using group_by
Since group_by is not changing in any way to the remote
system, there is no change. This also make things more consistent
with the set_fact plugin.
2016-01-04 17:46:40 +01:00
James Cammarata e39e8ba308 Fix logic mistake in unarchive action plugin 2015-12-30 13:49:39 -05:00
Brian Coca 957b376f9e better module error handling
* now module errors clearly state msg=MODULE FAILURE
* module's stdout and stderr go into module_stdout and module_stderr keys
which only appear during parsing failure
* invocation module_args are deleted from results provided by action
plugin as errors can keep us from overwriting and then disclosing info that
was meant to be kept hidden due to no_log
* fixed invocation module_args set by basic.py as it was creating different
keys as the invocation in action plugin base.
* results now merge
2015-12-22 23:01:56 -05:00
Toshio Kuratomi c4da5840b5 Convert to bytes later so that make_become_command can jsut operate on text type. 2015-12-22 08:22:02 -08:00
Toshio Kuratomi 0c013f592a Transform the command we pass to subprocess into a byte string in _low_level-exec_command 2015-12-21 13:53:35 -08:00
Brian Coca 75e94e0cba allow for non standard hostnames
* Changed parse_addresses to throw exceptions instead of passing None
* Switched callers to trap and pass through the original values.
* Added very verbose notice
* Look at deprecating this and possibly validate at plugin instead
fixes #13608
2015-12-21 13:42:34 -05:00
Toshio Kuratomi 8ffc1fa838 Comment to explain why we strip _ansible_notify specially 2015-12-19 11:31:46 -08:00
Toshio Kuratomi 2936682f00 Revert "removed invocation info as it is not no_log aware"
This reverts commit 6127a8585e.
2015-12-19 11:09:20 -08:00
Brian Coca 6127a8585e removed invocation info as it is not no_log aware
This was added in 1.9 and 2.0 tried to copy, but since it cannot
obey no_log restrictions I commented it out. I did not remove as
it is still very useful for module invocation debugging.
2015-12-19 11:48:48 -05:00
James Cammarata d9c74536be Fix handling of environment inheritence, and template each inherited env
Environments were not being templated individually, so a variable environment
value was causing the exception regarding dicts to be hit. Also, environments
as inherited were coming through with the tasks listed first, followed by the
parents, so they were being merged backwards. Reversing the list of environments
fixed this.
2015-12-17 09:44:40 -05:00
Brian Coca 97275110d7 Merge pull request #13533 from bcoca/debug_fixes
debug now validates its params
2015-12-16 10:36:20 -05:00
Toshio Kuratomi 8d16638fec Fix for template module not creating a file that was not present when force=false 2015-12-14 10:55:21 -08:00
Toshio Kuratomi 2bc3683d41 Restore comment about for-else since it is an uncommon idiom 2015-12-13 05:55:31 -08:00
Brian Coca d73562902b debug now validates its params
simplified var handling
made default message the same as in pre 2.0
fixes #13532
2015-12-13 00:13:13 -05:00
Abhijit Menon-Sen 37c4e9aee3 Clean up debug logging around _low_level_execute_command
We were logging the command to be executed many times, which made debug
logs very hard to read. Now we do it only once.

Also makes the logged ssh command line cut-and-paste-able (the lack of
which has confused a number of people by now; the problem being that we
pass the command as a single argument to execve(), so it doesn't need an
extra level of quoting as it does when you try to run it by hand).
2015-12-11 07:11:48 +05:30
Yannig Perré 18ac12aee6 Do not fail when variable is not correct in debug action.
See https://github.com/ansible/ansible/issues/13484 for more information.
2015-12-09 22:08:30 +01:00
Brian Coca 7ffd578a9d Revert "Fix always_run support in the action plugin for template when copying"
This reverts commit 9c4eae5253.
2015-12-08 09:24:20 -08:00
James Cammarata 9c4eae5253 Fix always_run support in the action plugin for template when copying
Fixes #13418
2015-12-08 11:56:39 -05:00
Yannig Perré 2c8eee956f Fix issue when var name is the same as content.
See https://github.com/ansible/ansible/issues/13453 for more details.
2015-12-07 09:25:37 +01:00
Luca Berruti 8ea45e8608 Make no_target_syslog consistent.
no_target_syslog = False --> do log on target
2015-12-05 19:43:02 +01:00
Toshio Kuratomi e201a255d1 Revert "Make sudo+requiretty and ANSIBLE_PIPELINING work together"
This reverts commit f488de8599.

Reverting for now due to hard to pin down bugs: #13410  #13411
2015-12-03 08:01:05 -08:00
nitzmahone c94509f273 allow shell plugin to affect remote module filename
Fix for 13368, added get_remote_filename to shell plugins, powershell version appends .ps1 if necessary, base shell plugin no-ops
2015-12-01 13:39:02 -08:00
Abhijit Menon-Sen f488de8599 Make sudo+requiretty and ANSIBLE_PIPELINING work together
Pipelining is a *significant* performance benefit, because each task can
be completed with a single SSH connection (vs. one ssh connection at the
start to mkdir, plus one sftp and one ssh per task).

Pipelining is disabled by default in Ansible because it conflicts with
the use of sudo if 'Defaults requiretty' is set in /etc/sudoers (as it
is on Red Hat) and su (which always requires a tty).

We can (and already do) make sudo/su happy by using "ssh -t" to allocate
a tty, but then the python interpreter goes into interactive mode and is
unhappy with module source being written to its stdin, per the following
comment from connections/ssh.py:

        # we can only use tty when we are not pipelining the modules.
        # piping data into /usr/bin/python inside a tty automatically
        # invokes the python interactive-mode but the modules are not
        # compatible with the interactive-mode ("unexpected indent"
        # mainly because of empty lines)

Instead of the (current) drastic solution of turning off pipelining when
we use a tty, we can instead use a tty but suppress the behaviour of the
Python interpreter to switch to interactive mode. The easiest way to do
this is to make its stdin *not* be a tty, e.g. with cat|python.

This works, but there's a problem: ssh will ignore -t if its input isn't
really a tty. So we could open a pseudo-tty and use that as ssh's stdin,
but if we then write Python source into it, it's all echoed back to us
(because we're a tty). So we have to use -tt to force tty allocation; in
that case, however, ssh puts the tty into "raw" mode (~ICANON), so there
is no good way for the process on the other end to detect EOF on stdin.
So if we do:

    echo -e "print('hello world')\n"|ssh -tt someho.st "cat|python"

…it hangs forever, because cat keeps on reading input even after we've
closed our pipe into ssh's stdin. We can get around this by writing a
special __EOF__ marker after writing in_data, and doing this:

    echo -e "print('hello world')\n__EOF__\n"|ssh -tt someho.st "sed -ne '/__EOF__/q' -e p|python"

This works fine, but in fact I use a clever python one-liner by mgedmin
to achieve the same effect without depending on sed (at the expense of a
much longer command line, alas; Python really isn't one-liner-friendly).

We also enable pipelining by default as a consequence.
2015-12-01 23:32:20 +05:30
Brian Coca b5f2c3def2 fixed typo 2015-11-30 09:20:59 -08:00
Brian Coca eefb4931dd allow for bad stdout return from make temp dir command
fixes #13359
2015-11-30 09:19:16 -08:00
Brian Coca 71fe49ee3a Merge pull request #13247 from bcoca/fetch_fixes
fixes to fetch action module
2015-11-24 10:55:23 -08:00
James Cammarata 96fcfe45d0 Merge pull request #13264 from Yannig/devel_debug_var_list_or_dict
Allow debug var parameter to accept a list or dict.
2015-11-23 16:47:45 -05:00
Yannig Perré 5fa49a9ad8 Use to_unicode instead of str() 2015-11-23 22:04:55 +01:00
Yannig Perré 0480b44f50 Allow debug var parameter to accept a list or dict. Fix https://github.com/ansible/ansible/issues/13252 2015-11-23 16:58:24 +01:00
Brian Coca fb96748d7c fixes to fetch action module
* now only runs remote checksum when needed (fixes #12290)
 * unified return points to simplify program flow
2015-11-22 09:52:34 -08:00
Sebastien Couture 087dbc1ed5 We should give pipes.quote() a string every time 2015-11-20 12:58:50 -05:00
Toshio Kuratomi d75e707af5 Simplify code a little 2015-11-19 09:55:06 -08:00
Toshio Kuratomi 72558f7ecd Merge pull request #13074 from joernheissler/patch-13073
Use ansible_host in synchronize module
2015-11-19 09:51:43 -08:00
James Cammarata 9b9fb51d9d Template the final_environment value in _compute_environment_string()
Fixes #13123
2015-11-17 15:39:03 -05:00
Brian Coca d35f615af8 added more debug info for command results 2015-11-18 11:18:03 -08:00
Toshio Kuratomi 62979efa14 Finish up plugin porting to global display
Also remove display = display which does nothing
2015-11-11 10:44:23 -08:00
Toshio Kuratomi 4c7128da17 Port action plugins to global display 2015-11-11 10:44:22 -08:00
Brian Coca 99f45f2e19 pass task args without filtering, copy module needs to explcitly support
remote_src or it will remove the src file
2015-11-12 09:40:43 -08:00
Joern Heissler 647b92a79b Use ansible_host in synchronize module
Fixes #13073
2015-11-08 13:15:16 +01:00
Brian Coca 9a25e16140 set corrected force default 2015-11-06 19:06:58 -05:00
Rene Moser 768f2fe6d4 template: fix regression bug in template in case force=false
Fixes regression bug, previously reported in #12844 fixed with
4b20884719 re-introduced with
c64ac90560
2015-11-06 11:24:39 +01:00
Brian Coca c64ac90560 fixed check mode change response in template
fixes #13049
2015-11-05 15:55:19 -05:00
Brian Coca 7368030651 removed action plugin as service facts and separate modules don't work yet and this forces gathering facts 2015-10-30 17:56:05 -04:00
Jason O'Donnell 9dfa3719be Fixing typo 2015-10-26 17:13:49 -04:00
Jason O'Donnell ac9b35cc2b Found another typo 2015-10-26 17:04:28 -04:00
Toshio Kuratomi ca32d5bacc Potential fix for #12816 2015-10-23 13:38:44 -07:00
Toshio Kuratomi ce2b18174e Merge pull request #12878 from ansible/invocation-fix
Invocation fix
2015-10-22 16:17:40 -07:00
Toshio Kuratomi 2e87c1f74e Two fixes to action plugins
* Fix the task_vars parameter to not default to a mutable type (dict)
* Implement invocation in the base class's run() method have each action
  module call the run() method's implemention in the base class.
* Return values from the action plugins' run() method takes the return
  value from the base class run() method into account so that invocation
  makes its way to the output.

Fixes #12869
2015-10-22 16:07:26 -07:00
James Cammarata 86de1429e5 Cleaning up FIXMEs 2015-10-22 16:03:50 -04:00
Toshio Kuratomi 75cff7129c Fix for invocation not being added to output.
We want invocation to be omitted when we are running async, not when we
aren't running async.
2015-10-22 09:03:35 -07:00
Toshio Kuratomi 6b6d03290a Restore the automatic addition of invocation to the output
Revert "Remove auto-added invocation return value as it is not used by v2 and could leak sensitive data."

This reverts commit 6ce6b20268.

Remove the note that invocation was removed as we've now restored it.

Revert "keyword not in ubuntu 14.04"

This reverts commit 5c01622457.

Revert "remove invocation keyword check"

This reverts commit 5177cb3f74.
2015-10-22 08:53:37 -07:00
James Cammarata 4b20884719 Return correct changed flag when using check mode with template and force=no
Fixes #12844
2015-10-21 13:51:39 -04:00
James Cammarata 1fa975d81a Simplify group_by by removing BYPASS_HOST_LOOP from the action
Fixes #12825
2015-10-19 14:57:07 -04:00
Toshio Kuratomi c6d44738ad Clean up some more pyflakes warnings 2015-10-19 11:35:10 -07:00
Toshio Kuratomi 6ce6b20268 Remove auto-added invocation return value as it is not used by v2 and could leak sensitive data. 2015-10-19 09:08:25 -07:00
Toshio Kuratomi baa309309d Bundle a new version of python-six for compatibility along with some code to make it easy for distributions to override the bunndled copy if they have a new enough version. 2015-10-16 08:21:28 -07:00
Toshio Kuratomi 5617f6aad4 Update synchronize to use the correct host when delegating
Fixes #12752
2015-10-14 18:57:10 -07:00
Toshio Kuratomi 45a161b0a1 Merge pull request #12429 from edmstudio/devel
Update synchronize module plugin to work on OS X
2015-10-09 16:05:46 -07:00
Petr Mifek 6e035a3e94 Move nested function test for ipv6 to top level in synchronize module. 2015-10-10 00:01:22 +02:00
Toshio Kuratomi 97e8d25eb4 Fix for encoding errors when a command returns non-utf8 encoded values 2015-10-06 14:10:25 -07:00
Toshio Kuratomi 10750214ea Since Connection.execute_command() returns bytes, deal with the repurcussions here. 2015-10-02 12:39:36 -07:00
James Cammarata 30d481ac57 Fix old-style (non-python) module support 2015-10-02 12:58:35 -04:00
Brian Coca 6d6bfbc3d2 added missing import for pwd, was being obscured by exception catching and fallback 2015-10-01 18:56:30 -04:00
Brian Coca bf06e36382 updated async to pass along no_log setting 2015-09-30 11:52:27 -04:00
Brian Coca ddafed4403 Merge pull request #12528 from bcoca/task_logging
task logging revamp
2015-09-30 11:38:34 -04:00
Brian Coca c1ad96e5cf removed fixme as it is already implemented below. 2015-09-28 23:32:57 -04:00
Abhijit Menon-Sen 565c6f1ae7 Make ansible_pipelining a connection variable
SSH pipelining can be a significant performance improvement, but it will
not work if sudoers is configured to requiretty. With this change, one
could have pipelining enabled in ansible.cfg, but use sudo to turn off
requiretty in a separate play (or task) where pipelining is disabled:

    - hosts: foo
      vars:
          ansible_pipelining: no
      tasks:
        - lineinfile: dest=/etc/sudoers line='Defaults requiretty' state=absent
          sudo_user: root

(Note that sudoers has a complicated syntax, so the above lineinfile
invocation may be too simplistic for production use; but the point is
that a separate play can do something to disable requiretty.)
2015-09-28 20:55:14 +05:30
Brian Coca bb6141ec41 renamed managed_syslog to no_target_syslog 2015-09-26 08:22:32 -04:00
Brian Coca 37a918438b task logging revamp
* allow global no_log setting, no need to set at play or task level, but can be overriden by them
 * allow turning off syslog only on task execution from target host (manage_syslog), overlaps with no_log functionality
 * created log function for task modules to use, now we can remove all syslog references, will use systemd journal if present
 * added debug flag to modules, so they can make it call new log function conditionally
 * added debug logging in module's run_command
2015-09-25 23:57:28 -04:00
Toshio Kuratomi a1428d6bed Remove tmp as a parameter to the connection plugins
There doesn't appear to be anything that actually uses tmp_path in the
connection plugins so we don't need to pass that in to exec_command.
That change also means that we don't need to pass tmp_path around in
many places in the action plugins any more.  there may be more cleanup
that can be done there as well (the action plugin's public run() method
takes tmp as a keyword arg but that may not be necessary).

As a sideeffect of this patch, some potential problems with chmod and
the patch, assemble, copy, and template modules has been fixed (those
modules called _remote_chmod() with the wrong order for their
parameters.  Removing the tmp parameter fixed them.)
2015-09-24 13:33:57 -07:00
Toshio Kuratomi 03127dcfae remove the stdin return value from connection plugin exec_command() methods
The value was useless -- unused by the callers and always hardcoded to
the empty string.
2015-09-24 08:57:19 -07:00
James Cammarata 1e7fd2196d Fixing synchronize + delegate_to user bug
Fixes #12464
2015-09-22 16:06:52 -04:00
Toshio Kuratomi 18e2ee16ef Fix for user defined modules not overriding modules from core.
This fix takes into account that powershell modules are somewhat
different than regular modules and have to be kept separate.
2015-09-22 09:07:37 -07:00
James Cammarata ecf7d8c9ee Fix relative path bug in copy action
Without rebreaking #12055

Fixes #ansible-modules-core/2098
2015-09-22 01:31:03 -04:00
Marius Gedminas 9cdb6ebae3 Python 3: there is no 'basestring'
This fixes a failing unit test.

In actual use (which is still quite far), I'm not sure if bytes ->
unicode conversion should be done here (in which case the code will fail
with an AttributeError: 'bytes' object has no attribute 'readlines'), or
inside self._connection.exec_command() (in which case my change is
correct).
2015-09-21 08:48:59 +03:00
Petr Mifek 27f779a7cc Small clean up and refactor of the rsync target ipv6 observing formatter for synchronize action. 2015-09-18 11:46:33 +02:00
Petr Mifek 6f3f4dff7a Change synchronize module plugin to be backwards compatible with RSync 2.6.9 with regard to handling IPv6 addresses. 2015-09-17 23:19:11 +02:00
James Cammarata ba82e57445 Merge branch 'sudo_on_if_needed' of https://github.com/apollo13/ansible into apollo13-sudo_on_if_needed 2015-09-17 11:03:27 -04:00
Toshio Kuratomi 8532ddd5ed typo in formatting the warning message 2015-09-17 08:01:43 -07:00
Florian Apolloner d9f873495e Ported over #7158 to support SELinux context switches. 2015-09-17 15:03:46 +02:00
Florian Apolloner decd9e8710 Only use become if the target user difers from the current remote user. 2015-09-17 12:24:16 +02:00
James Cammarata 3f8e12d1f7 Merge pull request #12359 from cchurch/fetch_no_fail_on_missing
Fix fetch to not fail for missing file when fail_if_missing=False
2015-09-16 11:05:39 -04:00
Axel Delmas 4802641de7 Added env_string in async_cmd 2015-09-15 20:11:14 +02:00
gptech 1c6be7b9ba Replace 'degug' with 'debug'
Tiny typo fix.
2015-09-14 23:21:03 -04:00
Chris Church 260b9f648c Fix fetch action plugin to not fail if file is missing and fail_if_missing=False (the default). Add tests to test_fetch role to verify it works as expected. 2015-09-14 14:21:52 -04:00
Florian Apolloner 8182eb3787 Fixed #12356 -- Restored ansible 1.9.x become behavior. 2015-09-14 17:53:14 +02:00
Abhijit Menon-Sen 065bb52109 Be systematic about parsing and validating hostnames and addresses
This adds a parse_address(pattern) utility function that returns
(host,port), and uses it wherever where we accept IPv4 and IPv6
addresses and hostnames (or host patterns): the inventory parser
the the add_host action plugin.

It also introduces a more extensive set of unit tests that supersedes
the old add_host unit tests (which didn't actually test add_host, but
only the parsing function).
2015-09-11 21:47:18 +05:30
James Cammarata 083aef65ad Revert "set_fact should put facts in the fact_cache, not vars_cache"
This reverts commit 926f127245.
2015-09-11 09:45:27 -04:00
James Cammarata be7bd392cb Fix unreachable host detection and have plays continue after unreachable failures
Fixes #12284
2015-09-09 15:27:26 -04:00
James Cammarata 926f127245 set_fact should put facts in the fact_cache, not vars_cache
Also fixes a template path lookup issue when using an include

Fixes #12277
2015-09-09 11:10:18 -04:00
Gaurav Jain 6c107258fa Fix rsync connections to IPv6 addresses
Similar to https://github.com/ansible/ansible/pull/11816 we can unconditionally
wrap the host address in square brackets. This is required by rsync for IPv6
addresses.
2015-09-06 22:20:45 -07:00
Toshio Kuratomi e218bf8da9 Do not escape backslashes when processing a template file.
Fixes #12198
Fixes #12241
2015-09-03 17:45:17 -07:00
Marius Gedminas 823677b490 Replace .iteritems() with six.iteritems()
Replace .iteritems() with six.iteritems() everywhere except in
module_utils (because there's no 'six' on the remote host).  And except
in lib/ansible/galaxy/data/metadata_template.j2, because I'm not sure
six is available there.
2015-09-03 09:23:27 +03:00
Brian Coca a006e85947 removed printing module args as it violates no_log settings 2015-09-02 16:14:40 -04:00
James Cammarata f162990cb3 Properly assign the searchpath for templates to the environment loader
dbd755e0 previously assigned the value to self._templar.environment.searchpath,
which is incorrect - it needs to be assigned to the environment.loader.searchpath
value instead.

Fixes #11931
2015-09-01 17:33:14 -04:00
Abhijit Menon-Sen d6d523bcae Show module name and args with -vvv
This information was earlier shown only with ANSIBLE_DEBUG, but it's
extremely useful in a user context, especially with module invocations
with deeply nested args like the ec2_vpc/ec2 modules.

Closes #11680
2015-09-01 23:44:13 +05:30
Brian Coca 7458331539 package and service now check that module exists before trying to execute it 2015-08-31 20:34:20 -04:00
James Cammarata fca27c29f4 Properly fail if slurp fails during fetch 2015-08-31 16:45:03 -04:00
James Cammarata 66a2f2923e Look for proper values in slurp result during fetch with become enabled 2015-08-31 16:36:07 -04:00
Karl Brown 9aae1d5810 Fixed Spelling Error on Line 67
Noticed while running Ansible from Tip.
Throws: NameError: global name 'tself' is not defined
2015-08-28 15:45:49 -04:00
James Cammarata 5a5b9f211b Validate variable names when loading 'vars:' blocks
TODO: add this to VariableManager to validate vars loaded from files too

Fixes #12022
2015-08-28 11:36:31 -04:00
Marius Gedminas df1b41d3d3 Avoid types.NoneType
types.NoneType was removed in Python 3.

None is a singleton in Python, so 'x is None' is equivalent to
'isinstance(x, NoneType)'.
2015-08-27 22:15:56 +03:00
Marius Gedminas 0eb538df03 Use 0oNNN octal syntax
This syntax is valid in Python 2.6+ and 3.x.
2015-08-27 22:15:04 +03:00
Toshio Kuratomi 017bd7b1cd Fix synchronize lookup of localhost info 2015-08-26 13:36:50 -07:00
Thomas Quenolle c948af3b1e Synchronize fix error
Fix the error:
 "RuntimeError: dictionary changed size during iteration"
2015-08-26 11:01:00 +02:00
Toshio Kuratomi 56ae3a032f Merge pull request #12075 from ansible/fix-vault-unicode
Unicode and other fixes for vault
2015-08-25 14:49:15 -07:00
Toshio Kuratomi a3fd4817ef Unicode and other fixes for vault 2015-08-25 12:43:09 -07:00
Brian Coca ae91cdfc98 fixed environment inheritance 2015-08-25 10:15:32 -04:00
Brian Coca 17060f9849 remove +1 from size that was cutting off first char of copied files when a recursive dir
fixes #12055
2015-08-24 21:10:03 -04:00
Abhijit Menon-Sen 09e4eac2e5 Use rsplit(':',1) for clarity; no functional changes 2015-08-23 22:52:35 +05:30
Ryan Petrello 1886307845 Fix a parsing bug that prevents IPv6 addresses from being used with `add_host`
Closes #8682
2015-08-23 22:50:47 +05:30
Brian Coca 961bee00d5 centralized the definition of 'localhost' 2015-08-19 15:49:37 -04:00
Brian Coca 950622cebd made sure they all look in files/vars/template dirs also when executed in play and not only from task 2015-08-16 02:37:21 -04:00
Brian Coca 79ea6d3a1e copy now passes a list of diffs 2015-08-16 02:37:21 -04:00
Brian Coca 13c91ef9d4 actually use the read source contents for the diff 2015-08-16 02:37:21 -04:00
Brian Coca 45cebd283f added remote_src to copy, now allows copying to be done on the target server 2015-08-16 02:37:21 -04:00
Brian Coca 1b7369cc8d added diff to assemble for remote_src=false 2015-08-16 02:37:21 -04:00
James Cammarata 4836641683 Use ansible_python_interpreter value for remote checksums
Fixes #11968
Fixes #11969
2015-08-15 12:00:55 -04:00
Brian Coca 7a51836530 check for failure in fact gathering 2015-08-15 11:29:10 -04:00
Brian Coca 1edae51e05 added generic service module, step #1 to separating services to their own modules
falls back to current service module and requries service mgr facts and new service modules
2015-08-15 11:00:26 -04:00
Brian Coca 172e0c328c fixed adhoc fact gathering 2015-08-15 11:00:10 -04:00
Brian Coca 0381923333 fixed call to setup module 2015-08-15 10:50:22 -04:00
Brian Coca 621b18c6ef fixed source path discovery for unarchive in roles
fixes #11943
2015-08-12 22:50:30 -04:00
James Cammarata e0b074000e Merge pull request #11764 from lpirl/devel_v2
fixes remote code execution for su/sudo with strict remote umasks
2015-08-11 22:30:44 -04:00
Brian Coca c08305a31f set script command itself to be sudable and not use the chmod sudoable settings as it can
ignore sudo settings for script when become_user is not root
fixes #11902
2015-08-10 13:19:37 -04:00
Brian Coca 6fcfebd21d made sure we need becoem before we format the command, added debug entry also 2015-08-07 16:27:25 -04:00
Brian Coca 177499476b fixed warning 2015-08-07 16:27:25 -04:00
Brian Coca d47d0b1d7f now continue/abort mode allows ignoring other input 2015-08-06 22:16:30 -04:00
Brian Coca a555a0652e allow for vars_prompt and pause prompt to be skipped in non interactive settings
ansible-pull users rejoice
2015-08-06 19:20:45 -04:00
Brian Coca 29cd72b7d8 even simpler condition tree for pause 2015-08-06 18:40:15 -04:00
Brian Coca dc80bc8929 now pause behaves like v1 pause 2015-08-06 18:09:59 -04:00
Brian Coca f7707d8850 brought user_input back to pause 2015-08-06 17:49:14 -04:00
Toshio Kuratomi e7b5cb8782 Fix synchronize source path with roles and local connection
Fixes #8261
2015-08-05 13:32:12 -07:00
Toshio Kuratomi 308bf80055 Cleanups to synchronize including:
* Better comments
* Reorganize code so related settings are close to each other
* Add ::1 to the "localhost" patterns we look for
* Make the dest_port parameter override the ansible_ssh_port setting
* Fix dest_port (wasn't being set)
* more complete detection of delegate_to
* Fix set_remote_user (wasn't being looked for in parameters)
* Instead of removing mode here, have the ansible module accept it
  (better documents the parameters doing it htat way)
2015-08-05 13:16:08 -07:00
James Cammarata dbd755e0f4 Fix jinja2 template search pathing
Fixes #9933
2015-08-04 22:50:16 -04:00
James Cammarata b6c3e5d797 Validate variable names given in set_fact
Fixes #11851
2015-08-04 13:30:47 -04:00
Toshio Kuratomi ca941ec632 style cleanup because -ECANNOTUNDERSTAND without it 2015-08-03 15:05:26 -07:00
Toshio Kuratomi f86245dcb0 Add a warning about python3 in the synchronize plugin 2015-08-03 15:05:26 -07:00