Commit graph

7304 commits

Author SHA1 Message Date
Brian Coca
7657f75f75 removed defined/undefined as jinja2 already has em 2016-07-08 12:11:22 -04:00
Brian Coca
7f28bcacaa added defined/undefined tests 2016-07-08 11:28:37 -04:00
Nathaniel Case
af5fba759f EOS new ModuleStub
As per #16575
2016-07-07 16:09:28 -04:00
James Cammarata
9ad8132628 Updating submodule refs 2016-07-07 13:49:42 -05:00
Peter Sprygada
b4d36f6ed4 Implement IOS restconf 2016-07-07 14:39:47 -04:00
Nathaniel Case
18738c81da New ModuleStub solution 2016-07-07 14:35:27 -04:00
Matt Davis
30c63a41e9 Merge pull request #16555 from matsu-chara/fix-error-msg-default-to-defaults
fix default/main.yml to defaults/main.yml
2016-07-07 11:14:54 -07:00
nitzmahone
b6d41d3d4b bump extras submodule ref 2016-07-07 10:59:36 -07:00
Nathaniel Case
72204ddd3e Net mod ios (#16426)
* Update IOS with new NetworkModule

* Remove redundant EOS code

* `authorize` can get rolled into NetCli

* Fix up IOS to where EOS is.

* Update IOSXR for NetworkModule

* collections is unnecessary
2016-07-07 13:46:33 -04:00
James Cammarata
6cde80fe69 Updating submodule refs 2016-07-07 11:32:46 -05:00
Brian Coca
906dc99c64 correctly set become value in console
fixes #16614
2016-07-07 10:42:40 -04:00
James Cammarata
9248cde239 Force remote_user to be the currently user for connection=local
Fixes ansible-modules-core#4092
2016-07-06 23:09:07 -05:00
Toshio Kuratomi
251c9182fe Refactor network and eos module_utils to use a subclass instead of factory function to create the NetworkModule 2016-07-06 18:24:24 -07:00
Toshio Kuratomi
626e6aee7d Update core submodule for unarchive fixes 2016-07-06 16:24:29 -07:00
Toshio Kuratomi
d1558fcee4 Don't check that we import basic.py in new-style modules (#16613)
Since Ansiballz, we no longer need to import basic directly into
a new-style module.  Some modules, like the Networking modules, may
import basic in their own module_utils files and the module will import
that specialized module_util file rather than basic.
2016-07-06 15:28:08 -07:00
Toshio Kuratomi
a93cf801e1 Update submodule refs 2016-07-06 14:42:32 -07:00
Monty Taylor
229d8f6b21 Don't treat parsing problems as async task timeout (#16458)
* Don't treat parsing problems as async task timeout

If there is a problem reading/writing the status file that manifests as
not being able to parse the data, that doesn't mean the task timed out,
it means there was what was likely a tempoarary problem. Move on and
keep polling for success. The only things that should cause the async
status to not be parseable are bugs in the async_runner.

* Add comment explaining not bailing out of loop

* Return different error when result is unparseable

* Remove extraneous else
2016-07-06 14:26:50 -07:00
James Cammarata
930d090507 Fix the way handlers are compiled and found/notified
* Instead of rebuilding the handler list all over the place, we now
  compile the handlers at the point the play is post-validated so that
  the view of the play in the PlayIterator contains the definitive list
* Assign the dep_chain to the handlers as they're compiling, just as we
  do for regular tasks
* Clean up the logic used to find a given handler, which is greatly
  simplified by the above changes

Fixes #15418
2016-07-06 14:57:38 -05:00
Brian Coca
729686a434 added back spaces for profile_tasks formatting 2016-07-06 15:39:09 -04:00
Toshio Kuratomi
d38cc1e0a1 Remove doubled instantiation of the zipfile (#16609) 2016-07-06 12:22:42 -07:00
René Moser
0f5f5fffee cloudstack: handle unicode API results in has_changed (#16601)
* cloudstack: handle unicode API results in has_changed

* cloudstack: add more case sensitve keys
2016-07-06 20:27:31 +02:00
Peter Sprygada
58eab8ee9f Merge pull request #16573 from privateip/network
captures the responses from running commands and adds response to object
2016-07-06 14:19:13 -04:00
James Cammarata
690bc192d5 Use get_handler_blocks() to get list of role handlers 2016-07-06 12:29:29 -05:00
Toshio Kuratomi
3f4027f7b4 Add the PID of the Ansible process to local_tmp directory. (#16589)
This aids in associating a leftover cachedir with a previous run of
Ansible.  Came about because of #16489
2016-07-06 10:02:20 -07:00
Will Thames
0e16a5f3ee Retain local tar.gz roles during galaxy install (#16592)
Don't treat local tar.gz files as temporary when cleaning
up at the end of an ansible-galaxy install
2016-07-06 12:28:54 -04:00
Peter Sprygada
7d53fd2ef2 Merge pull request #16587 from privateip/netcfg
minor bug fixes found in netcfg
2016-07-05 21:16:15 -04:00
Peter Sprygada
c9dccd3566 Merge pull request #16588 from privateip/vyos
bug fixes in vyos shared module
2016-07-05 21:15:57 -04:00
Peter Sprygada
f30a836063 bug fixes in vyos shared module
* fixes lots of bugs with get_config function to perform correctly
* refactors load_config into load_candidate
* adds load_config function to convert commands to NetworkConfig
2016-07-05 20:27:11 -04:00
Peter Sprygada
3002965af0 minor bug fixes found in netcfg
* fixes issue with converting config to lines
* fixes issue with returning text config with single line
2016-07-05 20:25:53 -04:00
nitzmahone
c5e0d3d17b prevent spurious pywinrm arg warnings for non-pywinrm connection args 2016-07-05 16:04:59 -07:00
nitzmahone
908ca727d6 bump core submodule ref 2016-07-05 15:50:26 -07:00
James Cammarata
a178ffa674 Merge pull request #15890 from brandond/inv_refresh_hostvars-fixes_15115
Ignore limits and restrictions when parsing inventory.
2016-07-05 15:59:05 -05:00
Brian Coca
ec61fba553 updated subref to fix pip issue 2016-07-05 16:49:43 -04:00
Brian Coca
65f87486fc updated module subrefs 2016-07-05 15:36:26 -04:00
James Tanner
d51917f306 Update submodule refs 2016-07-05 15:00:11 -04:00
James Cammarata
06379bb288 Prevent loop_control from being inherited via parent includes
Fixes #16542
2016-07-05 12:02:38 -05:00
James Cammarata
ea6efdbf2c Merge branch 'iterator-returncode' of https://github.com/axelspringer/ansible into axelspringer-iterator-returncode 2016-07-05 10:05:20 -05:00
Martin Matuska
8bff6154a6 Determine failed hosts with _check_failed_state() (#16566) 2016-07-05 12:26:41 +02:00
Peter Sprygada
54199f1cfb initial add of vyos shared documentation fragments 2016-07-04 22:58:00 -04:00
Peter Sprygada
0430923647 Merge pull request #16423 from privateip/netcfg
bug fix in netcfg replace method to handle whitespace argument
2016-07-04 22:54:16 -04:00
Peter Sprygada
65713c2418 Merge pull request #16574 from privateip/vyos
add get_config function to vyos shared module
2016-07-04 22:53:26 -04:00
Peter Sprygada
2866c7a9fb updates netcfg to remove dependency on collections module
This fixes the netcfg shared lib to be compatable with python versions
prior to 2.7.
2016-07-04 22:25:39 -04:00
Peter Sprygada
6b8c24e0f8 bug fix in netcfg replace method to handle whitespace argument 2016-07-04 22:24:02 -04:00
Peter Sprygada
75b8cf6ab3 captures the responses from running commands and adds response to object
The Command object can now store the response from executing the command
to allow it to be retrieved later by command name.  This update will
update the Command instance with the response before returning.
2016-07-04 22:21:15 -04:00
Peter Sprygada
527e4196b2 adds new method to return specific response from command to netcmd
This adds a new method that will return the output from a specified
command that has already been excuted by the CommandRunner.  The new
method, get_command takes a single argument which is the full name
of the command to retrieve.
2016-07-04 22:20:51 -04:00
Peter Sprygada
062db03f99 add get_config function to vyos shared module
This adds a new shard function get_config to retrieve the device
configuration either from module arguments or remotely from the
device.
2016-07-04 22:10:39 -04:00
Chris Houseknecht
54db1df244 Merge pull request #16559 from chouseknecht/azure-rc5
Fix authentication via params and env variables.
2016-07-04 15:03:13 -04:00
James Cammarata
83e4a4048b Fix the way pull localhosts out of inventory for delegate_to
This patch corrects the way we look in the inventory hosts list for
implicit localhost entries when localhost aliases are used.

Fixes #16568
2016-07-04 11:25:53 -05:00
Chris Houseknecht
c71a939b08 Fix authentication via params and env vars. Update guide to RC5. 2016-07-02 21:36:34 -04:00
Chris Houseknecht
9e93f1c907 Merge pull request #16558 from chouseknecht/azure-rc5
Update and pin to azure-2.0.0rc5
2016-07-02 18:35:36 -04:00
chouseknecht
a076612b63 Update and pin to azure-2.0.0rc5 2016-07-02 18:16:43 -04:00
matsu-chara
9f8b0cabcd fix default/main.yml to defaults/main.yml 2016-07-02 21:16:33 +09:00
Matt Clay
292785ff2b Parse async response in async action. (#16534)
* Parse async response in async action.
* Add async test for non-JSON data before module output.
* Fix existing async unit test.

Resolves #16156
2016-07-01 14:52:45 -07:00
jctanner
f86c527736 If the known_hosts file does not exist, do not attempt to stat it. (#16548)
paramiko: If the known_hosts file does not exist, do not attempt to stat it.

Fixes #10057
2016-07-01 16:39:02 -04:00
NAGA RAVI CHAITANYA ELLURI
b312a43544 fix(callback-mail plugin): fixes the warning 'TaskResult' object has no attribute '__getitem__' because of which its not sending an email on failure (#16547) 2016-07-01 13:25:48 -04:00
Stian Vikan
288446c9bf Added and-quit to all commit statements. (#16411) 2016-07-01 12:11:05 -04:00
Brian Coca
faec03aabc fix encoding issues in profile_tasks (#16522)
* fix encoding issues in profile_tasks

fixes #16521

* really fix it

* unicode the nested

* simpler format

* readded space after name
2016-07-01 10:21:49 -04:00
Abhijit Menon-Sen
950cc26aab Use loop_control.loop_var directly
6eefc11c converted task.loop_control into an object, but while the other
callers were updated to use .loop_var instead of .get('loop_var'), this
site was overlooked.

This can be reproduced by including with loop_control a file that does
set_fact; a simple regression test along these lines is included.
2016-07-01 07:03:42 +05:30
graywulf
9b7d782abb Ignore broken pipe errors if the sshpass process has exited (#16515)
This fix prevents a broken pipe exception from occurring when password-less
SSH is configured and the sshpass process exits and closes the pipe before
the password is written to the pipe.
2016-06-30 19:39:30 -04:00
Brad Davidson
0c4effb8a6 Ignore limits and restrictions when parsing inventory.
We want to update host vars for all hosts (even those that might
have failed), and the in case of a refresh_inventory, the code has
a stale restrictions list at this point anyway.
2016-06-30 13:32:48 -07:00
Peter Sprygada
46a97e1f55 removes dependency on collections module from eos (#16485)
This removes the dependency on the Python collections module to make
it fully compliant with version prior to py2.7
2016-06-30 11:55:21 -04:00
nitzmahone
6df56f009f bump submodule refs 2016-06-29 17:36:51 -07:00
Shota
47f715fb37 Fix some typos (#16498) 2016-06-29 14:31:25 -04:00
Toshio Kuratomi
4f76222f5b Update submodule refs 2016-06-29 10:05:24 -07:00
Toshio Kuratomi
c7129c4efe In some cornercases, sys.executable is empty. Work around that by choosing a sensible default path to python and emitting a warning (#16487)
Fixes #13585

Fix grammar of warning method
2016-06-29 08:50:22 -07:00
Brian Coca
7c690f04e2 task get_path returns empty string when not in play 2016-06-29 10:50:36 -04:00
Peter Sprygada
216a845244 Merge pull request #16486 from privateip/netcmd
removes dependency on collections module from netcmd
2016-06-28 17:46:32 -07:00
Peter Sprygada
9b40e1106e removes dependency on collections module from netcmd
This change removes the dependency on collections so netcmd is
compatable with python versions prior to py2.7
2016-06-28 17:13:13 -07:00
Matt Clay
8f1b487141 Handle repeat includes in junit callback. (#16484) 2016-06-28 15:55:46 -07:00
Toshio Kuratomi
405dca1abe Update submodule refs 2016-06-28 14:53:46 -07:00
Brian Coca
2bb7feec6d Search path (#16387)
* smarter function to figure out relative paths

takes list of paths in order of relevance to current task
and does the dwim magic on them

* shared function for action plugins using new dwim

unify path construction and error info/messaging
made include and role non exclusive
corrected order and now smarter about tasks
includes inside roles are currently broken as they don't provide the correct role data
make dirname full match to avoid corner cases

* migrated action plugins to new dwim function

reported plugins to use exceptions instead of info

* clarified needle
2016-06-28 17:23:30 -04:00
Brian Coca
d843e5a79d removed unused boolean 2016-06-28 15:25:18 -04:00
Brian Coca
9abdb1bb7c added skipped_reason for verbosity not met
fixes http://github.com/ansible/ansible-modules-core/issues/4062
2016-06-28 15:24:59 -04:00
jctanner
4ba60d00c8 Refactor the parameter splitting in ini lookup to handle more path formats (#16477)
Refactor the parameter splitting in ini lookup to handle more path formats.

Fixes #16468
2016-06-28 13:24:57 -04:00
Brian Coca
3afe50dfe2 push unicode handling into unfrack 2016-06-28 10:57:41 -04:00
Brian Coca
bae988ee9b fix path utils 2016-06-28 10:38:34 -04:00
Lars Fredriksen
4b5203c5fb add holders to partitions (#16446)
* add holders to partitions

* make holder gathering a function
2016-06-28 09:44:51 -04:00
James Cammarata
af249b83e6 Don't modify the original task ds when preprocessing data
In the case of using YAML anchors/aliases, YAML actually uses references
to the duplicated object so any modifications to the original impacts
later uses of the object.

Fixes #13575
2016-06-28 03:07:59 -05:00
Pilou
b361bf90d7 Lookup password omit salt (#16361)
* Lookup unencrypted password must not include salt
* Integration test lookup: remove previous directory
* Test that lookup password doesn't return salt
* Lookup password: test behavior with empty encrypt parameter

Closes #16189
2016-06-27 10:44:25 -07:00
nitzmahone
60a8af95a5 bump core submodule ref 2016-06-27 09:00:25 -07:00
Brian Coca
1b7b1ca15e if seconds are specified, min is 1 2016-06-27 09:36:15 -04:00
Peter Sprygada
d83962d3f5 Merge pull request #15992 from ogenstad/asa
Module util, template action and doc fragment for Cisco ASA
2016-06-27 06:32:12 -07:00
Matt Clay
c2a5cb6174 Fix junit callback plugin for Python 2.6. (#16440) 2016-06-24 14:22:27 -07:00
James Cammarata
04fca42b62 Fixing issues with getattr caused by 5a3493b 2016-06-24 15:43:03 -05:00
Toshio Kuratomi
9330edd6b9 Update submodule refs 2016-06-24 09:01:40 -07:00
Peter Sprygada
32b605f603 Merge pull request #16422 from privateip/network
bug fix changes Config class in network to only raise exceptions
2016-06-23 16:15:20 -07:00
Peter Sprygada
02902325b4 Merge pull request #16424 from privateip/vyos
initial commit of vyos shared module with Cli transport
2016-06-23 16:15:07 -07:00
James Cammarata
948682dbe2 Fix off-by-one error with retries
Fixes #16408
2016-06-23 18:07:11 -05:00
James Cammarata
3e4755f7e4 Remove unnecessary role initialization and lookup stuff
* Remove unnecessary copying of values from parents to role deps, as
  this can cause problems when roles have multiple parents (or the same
  parents with different params speficied through deps)
* Since we're already checking the dep chain in the block for role
  things (which every task in a role should have), it is not necessary
  to check the role directly in case it improperly grabs something

Fixes #14438
2016-06-23 17:00:01 -05:00
nitzmahone
ac04ffb9b1 apply @zazard's fix to parent attribute lookup 2016-06-23 14:11:07 -07:00
Peter Sprygada
77922f82e2 initial commit of vyos shared module with Cli transport
This adds support for the VyOS network operating system using the
Cli transport.   This module will simplify building VyOS based
modules in Ansible
2016-06-23 12:27:33 -07:00
James Cammarata
c24c0f5f6b Properly wrap objects using json default encoder
Our custom encoder for the to_json filter was simply returning the
object if it was not a HostVars object, leading in some cases to a
TypeError when the data contained an undefined variable. This lead
to an odd error message being propagated up, so we now properly catch
this as an undefined variable error.

Fixes #15610
2016-06-23 09:19:32 -05:00
w1r0x
7d24e6e95c Fixes #12309 (#14121) 2016-06-23 09:02:34 -04:00
James Cammarata
3ea3fa8d46 Merge pull request #14639 from ivovangeel/find_mount_point-bug
Fixed bug in find_mount_point function
2016-06-22 22:38:54 -05:00
nitzmahone
5f9ca67685 bump extras submodule ref for test failures 2016-06-22 17:27:16 -07:00
nitzmahone
76633ddc4c bump submodule refs 2016-06-22 17:21:54 -07:00
James Cammarata
7c27f72515 Merge pull request #14356 from mludvig/session_token
Add support for AWS_SESSION_TOKEN environment variable. (trivial patch)
2016-06-22 18:51:09 -05:00
Peter Sprygada
107c13759e changes Config class in network to only raise exceptions
The Config class should not call fail_json but simply raise exceptions
and allow the implementor to handle the exception
2016-06-22 09:22:50 -05:00
Toshio Kuratomi
39c543e356 Use find -exec + so that failures will be visible in find's exit code (#16389)
Fixes #16385
2016-06-22 05:42:37 -07:00
James Cammarata
4c1601e9f2 Take previously failed/unreachable hosts into account when checking the batch
Again, as we're carrying failed/unreachable hosts forward from play to play via
internal structures, we need to remember which ones had previously failed so that
unrelated host failures don't inflate the numbers for a given serial batch in the
PlaybookExecutor causing a premature exit.

Fixes #16364
2016-06-21 16:47:38 -05:00