Commit graph

7019 commits

Author SHA1 Message Date
Brian Coca
6a0a366746 fixed service fact usage 2016-05-26 13:37:59 -04:00
René Moser
176a207c61 Merge pull request #15974 from resmo/feature/vpc
cloudstack: add VPC support
2016-05-26 07:43:40 +02:00
Brian Coca
48d8fa0380 updated subrefs 2016-05-25 17:29:44 -04:00
Brian Coca
90cbb8c01b re-add the service action plugin (#13001)
* readd the service action plugin, was removed cause it created unexpected fact gathering and there are no split service plugins that would make this useful (yet)
Revert "removed action plugin as service facts and separate modules don't work yet and this forces gathering facts"

This reverts commit 7368030651.

* now only does minimal fact gathering
2016-05-25 17:14:04 -04:00
Toshio Kuratomi
3b69ef7e8b Add strings 'True' and 'False' as booleans as python bools converted to strings will look that way.
Workaround for custom modules which are using choices=BOOLEANS instead
of type='bool'.
2016-05-25 10:36:16 -07:00
Rene Moser
62c424797a cloudstack: add common network code
Also used for VPC support.
2016-05-24 23:18:17 +02:00
Toshio Kuratomi
a2bef45cf6 Update submodule refs 2016-05-24 11:52:19 -07:00
Tim Rupp
9041a0fee9 Adds a general purpose Exception class for F5 modules (#15977)
This class can be used by F5 modules for raising exceptions.
This should be used to handle known errors and raise them so
that they can be printed in the fail_json method.

The common Exception class built-in should not be used because
it hides tracebacks that are necessary to have when debugging
problems with the module.
2016-05-24 11:18:39 -04:00
Brian Coca
52a0165c77 skip non executable inventory when no shebang (#15969)
alternate fix #15934
2016-05-24 10:25:10 -04:00
Rene Moser
fe05c5e35a cloudstack: add VPC support 2016-05-23 23:01:31 +02:00
Michael Scherer
cf44db58e0 Add SEQUENCETYPE to handle the dict_keys type (#15953)
On python 3, there is a specific type for dict keys
instead of list, so previous tests based on Sequence didn't
not work anymore.
2016-05-23 15:17:28 -04:00
Brian Coca
c8f0cdbdfd renamed systemd detection function 2016-05-23 15:09:09 -04:00
James Cammarata
733d017ad0 Save and restore the loader's basedir when loading playbooks
Fixes #15930
2016-05-23 15:04:44 -04:00
Michael Scherer
f9f6f24acd Add a alias for 'long' since python3 do not have it (#15952) 2016-05-23 10:30:06 -04:00
James Cammarata
72b29d122e When adding nested blocks, don't pass in any parent includes
We previously changed block behavior to prefer includes over parent
blocks, which broke inheritence in nested blocks.

Fixes #15926
2016-05-23 10:08:29 -04:00
Toshio Kuratomi
b75895df9b Fix the error handling for loop squashing to restore the name argument into the task args 2016-05-21 07:07:26 -07:00
nitzmahone
a0ff49194e bump submodule refs 2016-05-20 17:29:42 -07:00
Brian Coca
4821dc66ad now we show path from which we load module on vvv
also added remote module location on debug
2016-05-20 09:25:20 -04:00
Brian Coca
38cca53669 return friendlier error when failing to make dirs 2016-05-20 09:03:01 -04:00
jctanner
5bb4ee0c1e Avoid duplicate system related fact calls. (#15716)
* Avoid duplicate system related fact calls.

Addresses #1461
2016-05-19 22:34:19 -04:00
Toshio Kuratomi
97791f8b4e Update submodule refs 2016-05-19 13:28:36 -07:00
Matt Davis
aee3b2e430 Merge pull request #15919 from camradal/devel
Fix issue with latest pyvmomi and certificate validation
2016-05-19 12:30:12 -07:00
Peter Oliver
95cfceda98 Catch DistributionNotFound when pycrypto is absent (#15731)
* Catch DistributionNotFound when pycrypto is absent

On Solaris 11, module `pkg_resources` throws `DistributionNotFound` on import if `cryptography` is installed but `pycrypto` is not.  This change causes that situation to be handled gracefully.

I'm not using Paramiko or Vault, so I my understanding is that I don't
need `pycrpto`.  I could install `pycrypto` to make the error go away, but:
- The latest released version of `pycrypto` doesn't build cleanly on Solaris (https://github.com/dlitz/pycrypto/issues/184).
- Solaris includes an old version of GMP that triggers warnings every time Ansible runs (https://github.com/ansible/ansible/issues/6941).  I notice that I can silence these warnings with `system_warnings` in `ansible.cfg`, but not installing `pycrypto` seems like a safer solution.

* Ignore only `pkg_resources.DistributionNotFound`, not other exceptions.
2016-05-19 11:39:34 -07:00
Matt Clay
bad293ae35 Add work-around for ssh pty race condition.
This should minimize loss of stdout when using
a pty and connecting with ssh or paramiko_ssh.
2016-05-19 10:33:17 -07:00
René Moser
ff62d7bbbd docs: cloudstack: add cloudstack guide to doc fragments (#15898) 2016-05-19 10:31:44 +02:00
Toshio Kuratomi
8363ef43c9 Update submodule refs 2016-05-18 17:04:16 -07:00
Matt Davis
ec2cb07988 Make 'required' optional in module docs (#15906)
Updated module dev docs, doc build, ansible-doc to match
2016-05-18 16:57:36 -07:00
James Cammarata
74a252d0a5 More playbook executor compatibility fixes
With some earlier changes, continuing to forward failed hosts on
to the iterator with each TQM run() call was causing plays with
max_fail_pct set to fail, as hosts which failed in previous plays
were counting those old failures against the % calculation.

Also changed the linear strategy's calculation to use the internal
failed list, rather than the iterator, as this now represents the
hosts failed during the current run only.
2016-05-18 14:09:21 -04:00
Toshio Kuratomi
aad9f43dda Make load_params into a function that custom modules can access (#15913) 2016-05-18 10:50:55 -07:00
Peter Sprygada
d197407306 Merge pull request #15743 from mattchilders/multi-parent-netcfg-difference
Fixed issue with parents havings depth of 3+ on add method of Network…
2016-05-18 09:30:57 -04:00
Toshio Kuratomi
61f2147385 Rename pycompat to pycompat24
This change makes it so we know when it is safe to get rid of the module
(when we stop supporting python2.4) and makes it easier for us to find
code that is using the functions in there to update.

If needed, we'll create a pycompat26 and pycompat27 as well.  These
files are for functions that are needed on that python version to write
portable code.  So python-2.4 compatible modules may need code in
pycompat24, python26+ modules may need code in pycompat26, etc.  If
a function is needed in multiple python versions, we should implement it
in an internal common file and use import to put it in the namespace for
each pycompatXY module.
2016-05-18 06:18:01 -07:00
James Cammarata
f0e26d0b76 In TQM run() mark any entries in _failed_hosts as failed in the PlayIterator
As noted in the comment, the TQM may be used for more than one play. As such,
after creating the new PlayIterator object it is necessary to mark any failed
hosts from previous calls to run() as failed in the iterator, so they are
properly skipped during any future calls to run().
2016-05-18 08:17:39 -04:00
James Cammarata
0f659d699e Re-remove checking for failed state on hosts when building list of hosts
This was re-added by 63471cd (and modified by me to use iterator again),
it simply needs to be removed.

Fixes #15395
2016-05-18 08:17:39 -04:00
Vincent Roy
7a1309c98a Make sure that serial failures are handled correctly. 2016-05-18 08:17:39 -04:00
Vincent Roy
59d3ae6136 Don't let max_fail_percentage affect future plays. 2016-05-18 08:17:39 -04:00
Vincent Roy
994e57fa2b Handle max_fail_percentage per task. 2016-05-18 08:17:39 -04:00
Vincent Roy
e193e80f04 Don't stop executing plays after failure.
https://github.com/ansible/ansible/pull/13750/files
2016-05-18 08:17:39 -04:00
Vincent Roy
ba89b2a095 Backward compatibility execution failures with 1.9 2016-05-18 08:17:39 -04:00
Peter Sprygada
48aa9153f2 Merge pull request #15755 from ocadotechnology/fix-junos-netconf-ssh-agent
Allow ssh agent usage for junos_netconf
2016-05-18 07:54:59 -04:00
Peter Sprygada
9553dfdbab Merge pull request #15911 from keinohguchi/ops_rest_auth_fix
openswitch.py: Fix the OpenSwitch REST authentication
2016-05-18 07:40:15 -04:00
Peter Sprygada
114a0596aa Merge pull request #15727 from privateip/shell_module
handle name resolution errors more gracefully from shell.py
2016-05-18 06:53:06 -04:00
Kei Nohguchi
2043c32551 openswitch.py: Fix the OpenSwitch REST authentication
It's a cookie based authentication, that we get it
through /login endpoint, called by connect() method
and save the cookie for the rest of the call.
2016-05-18 00:17:32 -07:00
Toshio Kuratomi
73a2bddf84 Update submodule refs 2016-05-17 10:51:14 -07:00
Peter Sprygada
7cb7132b24 Merge pull request #15891 from privateip/fixes-ansible-modules-core-3502
bugfix for issue with trying to eval contains with non-string
2016-05-17 06:43:42 -04:00
Michael Scherer
fb2355e47d Port rax.py to python3 compatible syntax (#15875)
Since the pyrax website say that only python 2.7 is tested,
I do not think it is worth to aim for python 2.4 compatibility
for the various rackspace modules.
2016-05-16 17:30:25 -07:00
Peter Sprygada
83d0a15588 bugfix for issue with trying to eval contains with non-string
fixes ansible/ansible-modules-core#3502
2016-05-16 14:54:26 -04:00
Brian Coca
c648c95eb7 made format more flexible and allow for non dict entries 2016-05-16 14:39:49 -04:00
Peter Sprygada
8f7c879574 Merge pull request #15629 from privateip/fix-15496
make netcfg preserve command order
2016-05-16 13:59:46 -04:00
Rob
ba63ccb880 Handle case of both Key and key (#15468) 2016-05-16 12:19:41 -04:00
Michael Scherer
8680cc7156 Fix pkgin detection on NetBSD 6 and 7 (#15834)
Since this is now the default package manager, it got moved
to another location on Netbsd :

  netbsd# type pkgin
  pkgin is a tracked alias for /usr/pkg/bin/pkgin
  netbsd# uname -a
  NetBSD netbsd.example.org 6.1.4 NetBSD 6.1.4 (GENERIC) amd64

But since the package manager is also used outside of NetBSD, we
have to keep the /opt/local path too.
2016-05-16 10:13:49 -04:00