Commit graph

7092 commits

Author SHA1 Message Date
Dag Wieers
04ce71b4bd Give a module the possibility to known its own name (#16087)
* Give a module the possibility to known its own name

This is useful for logging and reporting and fixes the longstanding problem with syslog-messages:

    May 30 15:50:11 moria ansible-<stdin>: Invoked with ...

now becomes:

    Jun  1 17:32:03 moria ansible-copy: Invoked with ...

This fixes #15830

* Rename the internal name from module.ansible_module_name to module._name
2016-06-10 11:48:54 -04:00
Brian Coca
a529a60478 raw should not use default executable (#16085)
also removed unused cruft in script
2016-06-10 11:37:58 -04:00
J. Javier Maestro
828b73dd2d Fix: create retry_files_save_path if it doesn't exist (#15659)
* Fix: create retry_files_save_path if it doesn't exist

Ansible documentation states that retry_files_save_path directory will be
created if it does not already exist. It currently doesn't, so this patch
fixes it :)

* Use makedirs_safe to ensure thread-safe dir creation

@bcoca suggested to use the makedirs_safe helper function :)
2016-06-10 09:30:06 -04:00
Toshio Kuratomi
10860c50bd Update submodule refs for revert of git change 2016-06-09 14:50:13 -07:00
Brian Coca
4625bd2de5 updated submodule refs 2016-06-09 15:18:29 -04:00
Brian Coca
c376954ecf avoid processing bad mtab entries (#16206)
fixes #16174
2016-06-09 15:05:06 -04:00
Toshio Kuratomi
1b58b55346 Update submodule refs 2016-06-09 08:56:52 -07:00
jctanner
02e52c319c Force an include to be a static task if no vars or loops are being used. (#16192)
Fixes #15735
2016-06-08 19:23:48 -04:00
James Cammarata
b51d0dd69b Fix hostvars lookup of locahost based on 5f1bbb4 2016-06-08 14:14:02 -05:00
James Cammarata
5f1bbb4fcd There can be only one localhost
The changes to exclude implicit localhosts from group patterns exposed
the bug that we sometimes create multiple implicit localhosts, which
caused some bugs with things like includes, where the host was used as
an entry into a dict, so having multiple meant that the incorrect host
(with a different uuid) was found and includes were not executed for
implicit localhosts.
2016-06-08 13:03:52 -05:00
James Cammarata
fbec2d9692 Expand return code values returned by TQM and strategies
This allows the PlaybookExecutor to receive more information regarding
what happened internal to the TaskQueueManager and strategy, to determine
things like whether or not the play iteration should stop.

Fixes #15523
2016-06-08 10:21:57 -05:00
Peter Sprygada
178cfd142b fixes issue with ssh keyfile and nxos authentication
The nxos cli provider would not properly handle ssh key files passed
from the playbook task.   The ssh_keyfile argument is now properly
passed to the ssh authentication method

This fix address the bug reported in #3862
2016-06-07 21:01:34 -04:00
nitzmahone
d91315f2a0 bump submodule refs 2016-06-07 17:15:19 -07:00
James Cammarata
f9803bfcc9 Revert "don't tempalte register"
This reverts commit 7ba790bbaf.

Fixes #15700
2016-06-07 13:38:26 -05:00
James Cammarata
068e447fda Further tweaks to variable precedence to make it match our docs
Also removes looking at role variables from the Block, as those are
merged in separately via VariableManager
2016-06-07 12:08:01 -05:00
James Cammarata
b37b51dcea Fix variable precedence issue where set facts beat role params
Also updates doc on variable precedence, as it was incorrect for the
order of play vars/vars_prompt/vars_files in relation to set_fact and
registered variables.

Fixes #14702
Fixes #14826
2016-06-07 11:25:02 -05:00
James Cammarata
fa368934bd Create state in PlayIterator for unknown hosts rather than raise errors
Since we now use the PlayIterator to carry forward failures from previous
play executions, in the event that some hosts which had previously failed
are not in the current inventory we now create a stub state instead of
raising an error.
2016-06-07 09:42:39 -05:00
Brian Coca
f76befdb9a fix issues when state is not supplied 2016-06-07 10:29:24 -04:00
Krzysztof Magosa
721da46842 fix: playbook_on_task_start expects name and not task object (#16168) 2016-06-07 09:43:01 -04:00
Ritesh Khadgaray
ef9238ab85 set remote_user to default if none is found when using delegate_to (#16138) 2016-06-07 09:36:17 -04:00
Peter Sprygada
596b32f31e Merge pull request #16148 from privateip/working
fixes issues with authenticating using ssh-agent for ios devices
2016-06-07 06:31:46 -04:00
Brian Coca
6f36909074 service now passes 'started' instead of 'running'
other modules don't have to implement this directly
also updated docs to prefer 'started'.
fixes #16145
2016-06-06 22:30:04 -04:00
Trond Hindenes
ad4eb751a5 moved pending reboot to powershell.ps1 2016-06-06 23:18:51 +02:00
James Cammarata
e36b4014f5 Merge pull request #15958 from Schnitzel/taskinclude_handler
new HandlerTaskInclude Class which can run TaskIncludes inside Handlers
2016-06-06 14:01:57 -07:00
Adrian Likins
7eec99a140 Merge pull request #16154 from vlna/patch-1
Typo fix: Kuraotmi -> Kuratomi
2016-06-06 13:36:18 -04:00
James Cammarata
b33aeee2f0 Merge branch 'andreyshestakov-devel' into devel 2016-06-06 11:26:08 -05:00
James Cammarata
add2d1947e Fix recursive call of _load_inventory_file() in VariableManager
Fixes #16128
2016-06-06 11:25:15 -05:00
James Cammarata
1f18f5c92d Tweak the poll time to 0.005 to improve perf with large playbooks 2016-06-06 11:24:32 -05:00
James Cammarata
b9e743b478 Merge branch 'devel' of https://github.com/andreyshestakov/ansible into andreyshestakov-devel 2016-06-06 11:03:28 -05:00
James Cammarata
560532da7d Make sure we add host/group vars files when parsing inventory
Also fixes a bug where add_host was not adding the vars files

Fixes #16117
2016-06-06 10:52:39 -05:00
Brian Coca
2a984bbc98 much more fine grained error messages
fixes #16039
2016-06-06 11:48:16 -04:00
rdezavalia
a7274774ed Support etcd v2. Use this version by default (#12312)
* Support etcd v2. Use this version by default

* default to etcd v1
2016-06-06 11:26:12 -04:00
vlna
53ac89e40d Typo fix: Kuraotmi -> Kuratomi 2016-06-06 15:24:44 +02:00
Peter Sprygada
0a87651fc5 fixes issues with authenticating using ssh-agent for ios devices
Exception was raised when trying to use ssh-agent for authentication to
ios devices.   This fix enables ssh-agent and enable use of password
protected ssh keys.  There is one additional fix to capture authentication
exceptions nicely.
2016-06-06 07:53:42 -04:00
James Cammarata
d21cd16a91 Change uses of unicode() to to_unicode() in inventory/__init__.py 2016-06-04 21:05:33 -05:00
James Cammarata
879dc3a687 Mark implicitly hosts as such and exclude them from the all group
Fixes #16059
2016-06-04 18:53:47 -05:00
Toshio Kuratomi
5a3493be5f Port urls.py to python3 and other byte vs text fixes (#16124)
* Port urls.py to python3

Fixes (largely normalizing byte vs text strings) for python3

* Rework what we do with attributes that aren't set already.

* Comments
2016-06-04 16:19:57 -07:00
nitzmahone
434c949d03 update azure minimum doc fragment 2016-06-04 16:05:58 -07:00
nitzmahone
d1b611a730 updates for Azure SDK 2.0.0rc4 2016-06-04 15:05:13 -07:00
Toshio Kuratomi
4fe8fe303f Update submodule refs 2016-06-04 10:50:09 -07:00
Toshio Kuratomi
80c36bef9f Update submodule refs 2016-06-04 08:50:54 -07:00
Toshio Kuratomi
3bac945147 Fix the copy action to not send the content as a param. (#16127)
Has already been transferred as a tempfile.

This fixes the error in https://github.com/ansible/ansible/issues/16125
but there may be higher level issues that should be fixed as well (other
modules might be able to cause status fields like failed and changed to
return a censored string instead of a bool).  So leaving 16125 open for
now.
2016-06-03 12:32:15 -07:00
nitzmahone
14fec788a1 bump core submodule ref 2016-06-03 10:43:19 -07:00
Matt Clay
7a533406f9 Merge pull request #13145 from Mic92/devel
lxc connection plugin
2016-06-03 10:09:04 -07:00
Brian Coca
85f4c95843 minor optimization 2016-06-03 09:56:56 -04:00
Brian Coca
2482c687b7 optimize openbsd pkg_mgr fact discovery 2016-06-03 09:54:59 -04:00
Brian Coca
44bd1db976 updated package to use minimal fact gathering
also fixed results handling of fact gathering
2016-06-03 09:54:59 -04:00
Michael Scherer
f07d6b26a7 Show a better error message when there is too much arguments (#16119)
If someone run:

  ansible all -m file state=present

The error message is "Missing target hosts" which is misleading, since
the target hosts is here, the problem is the missing '-a'.
2016-06-03 09:53:41 -04:00
jctanner
2bf2e0fdfd Force relative role paths to be absolute and correct errors about missing path(s). (#16088)
Addresses #10811
2016-06-03 09:46:51 -04:00
James Cammarata
273a965dcc Fix the way host and group vars are loaded
* In the VariableManager, we were not properly tracking if a file
  had already been loaded, so we continuously append data to the end
  of the list there for host and group vars, meaning large sets of data
  are duplicated multiple times
* In the inventory, we were merging the host/group vars with the vars
  local to the host needlessly, as the VariableManager already handles that.
  This leads to needless duplication of the data and makes combining the
  vars in VariableManager take even longer.
2016-06-02 16:52:37 -04:00