Commit graph

7804 commits

Author SHA1 Message Date
Peter Sprygada
c534f8f9fc fixes conditional processing with junos and xml data structures (#17801)
The conditional processing was failing due for two reasons:

1) The xml to json conversion string was not happening before the runner
   was processing the results
2) The Conditional instance was not parsing conditionals encoded with []

This fix address both issues.
2016-09-28 20:58:43 -04:00
cinerama70
fb50698da3 Graceful error handling when delegate_to host null (#17453) (#17783)
Currently, if the host specified in delegate_to for a task is null,
Ansible will crash with a stack trace. Add a check for this state
and handle the error appropriately.
2016-09-28 19:24:32 -04:00
Brian Coca
3c42651fc7 fixed typo 2016-09-28 18:34:19 -04:00
Gilles Gagniard
da5b0c39c9 fixes #16865 : we should properly determine connection type for delegated task first, before overriding remote user for local connections (#17723) 2016-09-28 18:33:40 -04:00
Peter Sprygada
9854644431 adds overwrite kwarg to load_config in junos (#17798)
The junos load_config() method supports operations of overwrite, replace
and merge.  This adds the missing overwrite keyword arg to load_config()
so that action in junos_template can be procesed correctly.
2016-09-28 14:36:53 -04:00
Toshio Kuratomi
17c0f52c96 Update submodules refs 2016-09-28 08:29:13 -07:00
Brian Coca
368497fd14 better handling of host lists (#17781)
* better handling of host lists

fixes #17762

* corrected message

* fixed extras space
2016-09-28 11:21:07 -04:00
Brian Coca
86ea21a73d ansible_play_batch (#17779)
* ansible_play_batch

* added version added
2016-09-28 10:32:19 -04:00
Peter Sprygada
605152e61b raises ValueError exception if conditional is not parsable (#17788)
The Conditional class now raises a ValueError with message if it cannot
correclty parse the passed in conditional.  This makes it easier to
detect issues in modules that specify conditionals.
2016-09-27 21:12:08 -04:00
Matt Clay
670536f685 Revert "Clear the plugin path cache when adding new directories" (#17785)
This reverts commit 5a57313dd7.
2016-09-27 16:17:35 -07:00
James Cammarata
5a57313dd7 Clear the plugin path cache when adding new directories 2016-09-27 14:48:35 -05:00
Matt Clay
dce94ec3c6 Update submodule refs. 2016-09-27 11:02:03 -07:00
Matt Davis
e7819609ce swallow errors during async polling (#17760)
also use connection reset on exceptions if available (eg, prevent reuse of "stuck" WinRM connections due to reboot/NIC bounce/etc)
2016-09-27 10:31:40 -07:00
Brian Coca
cf7822e201 remove bare vars and undefined from lookup lists (#17647)
https://docs.ansible.com/ansible/porting_guide_2.0.html#deprecated
2016-09-27 12:32:04 -04:00
Brian Coca
3550f73837 removed deprecated first available file from tasks (#17643)
https://docs.ansible.com/ansible/porting_guide_2.0.html#deprecated
2016-09-27 12:31:46 -04:00
Brian Coca
1b0b6b4c10 removed deprecated 'bare' templating environment (#17640)
https://docs.ansible.com/ansible/porting_guide_2.0.html#deprecated
2016-09-27 12:31:14 -04:00
Brian Coca
943f4ebccf undefined var should fail 'label' setting (#17675) 2016-09-27 12:24:16 -04:00
Brian Coca
f63b8878fd fix delegate_facts (#17736)
code was misplaced when we changed result processing
also cleaned up import and clarified item/label
fixes #17582
2016-09-27 11:51:16 -04:00
Toshio Kuratomi
a4fed650e2 Update submodule refs 2016-09-27 08:35:44 -07:00
Toshio Kuratomi
eb33ed4219 Update submodule refs (especially to pick up the mount fixes) 2016-09-26 23:52:30 -07:00
Peter Sprygada
9694d60af5 fixes issue where arguments for regexp search() where transposed (#17764)
The arguments for the regex search() function were transposed in the
netcli match() method that caused conditionals to fail. Switched the
arguments to fixe the bug

fixes #17749
2016-09-26 19:29:57 -04:00
Michael Scherer
362b682f1c Add a umask argument to run_command
In order to avoid problem due to race conditions, it is
required to run umask when generating some sensitive files,
such as a TLS key.
2016-09-26 11:16:22 -04:00
Brian Coca
38b975800d removed unused code, added comment explaining
files is really a placeholder for common code for separate service modules, was copy of current service module and this seemed to confuse people so this update should clear that up
2016-09-26 10:27:56 -04:00
Senthil Kumar Ganesan
9d5dff5596 Update OS6 sublevels (#17735) 2016-09-24 09:27:38 -04:00
Toshio Kuratomi
bcebfab8e3 Update submodule refs 2016-09-23 14:51:14 -07:00
peter.jang
0d94d39689 fix for rsync protocol support (#16756) 2016-09-23 16:12:07 -04:00
Toshio Kuratomi
0f4c56a697 Update submodule refs to pick up mount fixes 2016-09-23 12:40:48 -07:00
Peter Sprygada
aa1e3ef2b5 fixes issue introduced with raw kwarg (#17728)
The raw kwarg was added to return raw output from devices with if the
attempt to convert to json failed.  The change was causing all json
output to be returned raw.  This fixes that issue.
2016-09-23 12:09:55 -04:00
j0hnsmith
4650d8910e Feature/add ansible play hosts all (#17498)
* refactor ignore_limits_and_restrictions

into ignore_limits and ignore_limitations

* add ansible_play_hosts_all

* update docs re ansible_play_hosts_all

* only use play.hosts when is has a value

* replace ansible_play_hosts with ansible_play_hosts_all

* remove unnecessary var
2016-09-23 11:17:46 -04:00
Brian Coca
52bf021904 clarified omit intended usage
fixes #13986
2016-09-23 10:19:36 -04:00
nitzmahone
f82c693181 bump extras submodule ref 2016-09-22 20:07:20 -07:00
Peter Sprygada
361f3999ea fixes issue where junos shared module was ignoring ssh_keyfile (#17712)
This fixes a problem with the Netconf transport in which the ssh keyfile
wasn't being used if it was defined.  The ref issue is filed against 2.1.1
but have been unable to replicate the problem in that version

ref: ansible/ansible-modules-core#4966
2016-09-22 19:52:42 -04:00
James Cammarata
6666d13654 Add max_passes to the debug strategy override of _process_pending_results
Fixes #17520
2016-09-22 10:49:30 -05:00
jctanner
a2547db5b5 ini lookup: add 'type' to the list of known arguments (#17707)
Fixes #16556
2016-09-22 11:32:14 -04:00
Pascal Grange
8b08a28c89 fixes issue #13981: unsafe_writes block appeared too late in the atom… (#17405)
* fixes issue #13981: unsafe_writes block appeared too late in the atomic_move
workflow. This led to errno.EBUSY to not be managed in the context of
issue #!#981

* Reduce changes to fix #13981

* Abstract the unsafe_writes fallback into a helper method.
Explicitly try/except os.rename part of the code and call this helper method.
If the code fails in shutil.copy2 or shutil.move this should not be related to issue #13981
since they write to b_tmp_dest_name.
(as suggested by @abadger)

* Check if unsafe_writes in the caller, not in _unsafe_writes.
That way the function call reads as "Do an unsafe write"
and not as "I think we should do an unsafe_write.
2016-09-22 11:31:35 -04:00
Peter Sprygada
839f908a14 fixes mode on module_utils/dellos9.py (#17682) 2016-09-22 10:42:57 -04:00
Toshio Kuratomi
dde7c11713 Update submodule refs 2016-09-21 20:42:22 -07:00
Toshio Kuratomi
8aa8e07d13 Remove _load_hosts() from Play initialization as it's no longer needed and it breaks using extra_vars defining a list for hosts (#17699)
Thanks to @jimi-c for the solution

Fixes #16583
2016-09-21 17:25:54 -07:00
James Cammarata
c9d3d2b9a0 Allow for empty source in dwim_path_relative_stack
Fixes #17192
2016-09-21 16:16:14 -05:00
James Cammarata
23651b657e Create a raw lookup for hostvars that does not template the data
When using hostvars to get extra connection-specific vars for connection
plugins, use this raw lookup to avoid prematurely templating all of the
hostvar data (triggering unnecessary lookups).

Fixes #17024
2016-09-21 13:16:08 -05:00
Ondra Machacek
04165fb6c0 Add oVirt support to ansible/module_utils module (#17364)
* Add oVirt utility module

This patch add oVirt utility module, which contains helper functions,
for oVirt modules and also shared documentation fragment for oVirt.

* Adjust to Python 2.4

* Fixups

* Add support for poll interval and fixes
2016-09-21 12:41:36 -04:00
Gabriele
cfd880dab8 Adding raw check to nxos.py (#17659) 2016-09-21 05:35:56 -04:00
Peter Sprygada
765a76885b fixes issue where config sessions where left behind (#17673)
When using the Cli transport, if the session hung on a command and the
socket timed out, the config session would be left behind.  This change
will allow the shell to try to get control back and remove the config
session, assuming the channel is still open.

fixes ansible/ansible-modules-core#4945
2016-09-20 16:30:09 -04:00
Peter Sprygada
2a908b832c fixes commit confirm check in junos shared module (#17663)
The module didn't perform a commit confirm check which would cause
checking commits to be non idempotent.  This change will fix that problem.
2016-09-20 16:12:08 -04:00
Matt Clay
24c9e047c3 Remove test-docs from module search ignore list. (#17670) 2016-09-20 15:38:46 -04:00
Matt Clay
08e964a9c5 Update submodule refs. 2016-09-20 12:24:36 -07:00
Brian Coca
1e4e188318 changed missing file error to warning for lookups (#16800)
* changed missing file error to warning for lookups

* changed plugins that expected exception

warning will still be displayed, they now work with None value
2016-09-20 15:05:11 -04:00
Toshio Kuratomi
55cbe257cc Update submodule refs to pick up pip fixes 2016-09-20 11:03:28 -07:00
James Cammarata
4dc2bf4815 Take ITERATING_ALWAYS into account when setting failed state in PlayIterator
Fixes #15963
2016-09-20 11:11:52 -05:00
Timothy Appnel
1975a545bd Implements verbose always to assert action plugin module (#17654) 2016-09-20 10:52:21 -05:00