Commit graph

15163 commits

Author SHA1 Message Date
Romain Richard
e341135431 Duplicated line in the documentation of the apt_repository module
Removing that extra line.
2017-01-10 12:28:37 -05:00
Toshio Kuratomi
c6fb355b58 Convert all results from open_url() into text before deserializing the json. (#20069)
Fixes #20012
2017-01-10 08:35:08 -08:00
Willem van Ketwich
1ee69c07cc New module (cloud): cloudfront_facts (#19727)
* initial commit of cloudfront_facts.py

* modification as per review from @georgepsarakis

* fixed shippable build error

* fixed shippable build error

* removed wildcard imports and replaced with specific imports from ansible.module_utils.ec2 as advised by @georgepsarakis

* renamed all instances of cloud_front_origin_access_identity to origin_access_identity as advised by @georgepsarakis

* added input option requirements where missing. fixed a typo in an error message, added '.' to the end of sentences.

* fixed typo in documentation

* simplified paginated_response method as advised by @georgepsarakis

* set default option to list_defaults when no option specified as advised by @ryansb

* bumped version to 2.3 as advised by @ryansb

* removed double-nesting of ansible_facts as advised by @ryansb

* show facts based on alias and distribution id for easy referencing as advised by @ryansb. have done for both distribution and distribution_config

* made comments clearer

* fixed incorrect logic for default list_distributions, fixed list_distributions_by_web_acl - wasn't passing web_acl_id, fixed list_invalidations keyword args missing DistributionId

* neatened up logic for list_distributions default

* facts now return Etag as well as specific facts. modified paginated_response to handle this. also all requests that use distribution id also list the facts under the corresponding alias now.

* fixed last fact added clobbering all previous facts for an alias or an id

* removed list_ prefix from list keys

* removed unnecessary boto fields. made list_distributions and list_streaming_distributions dictionaries with id/alias as key. fixed list_invalidations.

* fixed incorrectly named list_distributions_by_web_acl to ..web_acl_id. added id/alias dict for list_distributions_by_web_acl_id

* minor doc changes

* removed merge tag

* fixed more of merge
2017-01-10 11:27:54 -05:00
Jamie Lennox
0533b3d639 Add additional information to the get_url SSL failure message. (#20025)
When get_url or other functions receive an SSL failure it prints a
standard message regardless of the failure. Include the actual OpenSSL
message in the error message so alternative failures can be debugged.

Closes: #20024
2017-01-10 08:22:43 -08:00
Toshio Kuratomi
8ae29a5a80 Remove the redundant get_exception import 2017-01-10 08:19:54 -08:00
Dag Wieers
560831752e Defined get_exception() (#20087)
This fixes #20080
2017-01-10 08:18:51 -08:00
Ner'zhul
16a1585ffc vmware_guest: Fix customvalues when VM doesn't exists (#20094) 2017-01-10 11:07:42 -05:00
Brian Coca
3ceff2f9b3 added missing import 2017-01-10 10:37:55 -05:00
Ner'zhul
7603ae33b5 vmware_guest improvements: annotations & customvalues (#20052)
* Idempotency fix on annotations permitting to change them on reconfiguration
* Permit to set VMware customvalues attributes on VM
* Gather annotation & customvalues and report it into module facts
2017-01-10 09:10:48 -05:00
Dag Wieers
aca60f1776 vmware_guest: various customizations changes and fixes (#19975)
* vmware_guest: various changes and fixes

Most of my queued changes were already implemented by @aperigault !

This was still open
- Typos
- Various fixes to dict.get() without quotes
- Defaults to fullname and orgname (so they are no longer mandatory)
- Add missing timezone implementation
- Remove the customize flag from the options
- Rename 'customizations' to 'customization' (cfr VMware docs and fora)

* Important fixes for idempotency and customization

- A password is mandatory for customization to work on Windows !
- An important fix for idempotency related to guestId
- Support all types of Windows guestId entries

* Suggestion by @aperigault

* Small documentation fixes
2017-01-10 08:34:38 -05:00
René Moser
bcf9cd1e2a cloudstack: cs_iso: fix async poll for state=absent (#20050) 2017-01-10 12:06:13 +01:00
John R Barker
3c4623d68b dellos9__config -> dellos9_config 2017-01-10 10:47:13 +00:00
Ivan Bojer
8d29406d74 new panos module that adds arbitrary service to the FW (#19896)
* new module that adds arbitrary service to the FW

* change exception handling

* minor code changes based on the review comments
2017-01-09 23:50:38 -05:00
Ivan Bojer
f8f388bdaf Panos mgtconfig (#19897)
* new module to manipulate mgmt interface

* new module for mgmt interface management

* minor code changes based on the review comments
2017-01-09 23:50:03 -05:00
Ivan Bojer
178e11473a new panos module to load configuration file (#19902)
* new module to load configuration file

* minor code changes based on the review comments
2017-01-09 23:48:59 -05:00
Ivan Bojer
23349ed638 new panos module for profile groups (#19904)
* new module for profile groups

* minor code changes based on the review comments
2017-01-09 23:48:40 -05:00
Adrian Likins
cf7b1108ff Fix 'No module named network' net_template error (#20060) 2017-01-09 23:45:52 -05:00
Brian Coca
afbe3bd63f corrected service condition 2017-01-09 15:44:53 -05:00
James Cooke
fafe5bba59 Fix authorized_key crash in Python3 with remote key file (#20037)
* Decode downloaded keys bytes if Python3
* Fixes #20007
* Thanks @georgepsarakis
2017-01-09 12:21:51 -08:00
Adam Števko
ebd7e03425 Add ipadm_addr module (#19411)
* Add ipadm_addr module

* Add ANSIBLE_METADATA
Document return values
Make imports explicit
Use native YAML syntax in EXAMPLES

* Fix version to 2.3
2017-01-09 14:32:05 -05:00
Evan Kaufman
ad9c25a54f Apply SELinux context only if cron_file param exists
Use selinux calls in module_utils/basic instead of native selinux bindings

Fixes #18768
2017-01-09 14:02:05 -05:00
Adam Števko
07a517aebd Add dladm_vlan module (#19412)
* Add dladm_vlan module

* Add ANSIBLE_METADATA
Document return values
Make imports explicit
Use native YAML syntax in EXAMPLES
2017-01-09 12:32:23 -05:00
Adam Števko
a677f40457 Add dladm_linkprop module (#19413)
* Add dladm_linkprop module

* Add ANSIBLE_METADATA
Document return values
Make imports explicit
Use native YAML syntax in EXAMPLES
2017-01-09 12:31:42 -05:00
Adam Števko
05bf7488cc Add dladm_iptun module (#19414)
* Add dladm_iptun module

* Add ANSIBLE_METADATA
Document return values
Make imports explicit
Use native YAML syntax in EXAMPLES
2017-01-09 12:30:42 -05:00
Valentín Gutiérrez
6c448d3673 Fix pamd module (#20048)
* Fix string_types usage

* Fix adding arguments for argument=value arguments

* Remove unnecesary check on module_args

* Fix argument requirements

* Proper handling of parameter=value arguments
2017-01-09 09:30:32 -08:00
Adam Števko
457e94d21e Add ipadm_addrprop module (#19415)
* Add ipadm_addrprop module

* Add ANSIBLE_METADATA
Document return values
Make imports explicit

* Use native YAML syntax in EXAMPLES

* Add temporary
2017-01-09 12:29:56 -05:00
Adam Števko
7b71e9a0de Add ipadm_ifprop module (#19416)
* Add ipadm_ifprop module

* Add ANSIBLE_METADATA
Document return values
Make imports explicit
2017-01-09 12:29:24 -05:00
Ryan Brown
a2b4ad9da0 (docs) Remove/update mentions of git submodule in docs and error me… (#19941)
* (docs) Remove/update mentions of `git submodule` in docs and error messages.

* Remove parenthetical per @dharmabumstead
2017-01-09 12:11:39 -05:00
Marius Gedminas
0a7f2c202b Improve --diff output when files lack trailing newlines
The behavior now matches GNU diff.

Fixes #14094.

Example of output before this change:

    TASK [healthchecks.io : hourly healthchecks.io ping] ***************************
    changed: [ranka]
    --- before: /etc/cron.hourly/mg-healthchecks-dot-io
    +++ after: /tmp/tmpOTvXTw
    @@ -1,2 +1,2 @@
     #!/bin/sh
    -curl -sS https://hchk.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > /dev/null+curl -sS https://hchk.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > /dev/null

after this change:

    TASK [healthchecks.io : hourly healthchecks.io ping] ***************************
    changed: [ranka]
    --- before: /etc/cron.hourly/mg-healthchecks-dot-io
    +++ after: /tmp/tmpOTvXTw
    @@ -1,2 +1,2 @@
     #!/bin/sh
    -curl -sS https://hchk.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > /dev/null
    \ No newline at end of file
    +curl -sS https://hchk.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx > /dev/null

The added unit tests contain more examples.

This commit also takes care to avoid "no newline at EOF" warnings when
no_log is in effect, and also when modules return dicts rather than
strings.  (It also removes trailing whitespace from using json
serialization when diffing dicts, because I hate trailing whitespace in
Python source files, even if they're test files.)
2017-01-09 11:49:03 -05:00
James Cammarata
a6fff93967 Fixing security bugs for CVE-2016-9587 2017-01-09 10:43:03 -06:00
Peter Sprygada
258c6ada52 refactors ios_config to use network_cli plugin (#20042)
* updates the ios_config module to use the network_cli plugin
* updates the local action plugin to derive from network
* add unit test cases for ios_config
2017-01-09 11:19:25 -05:00
Brian Coca
0ef60aeacb improved negative service status handling
This is still far from optimal but the nature of the initscripts does not really allow for much better.
fixes #20028
2017-01-09 11:09:11 -05:00
Michael Scherer
0847a137d3 Add a fact about apparmor, to see if that's loaded or not 2017-01-09 10:12:13 -05:00
Peter Sprygada
5bbab91452 fixes add() method in netcfg (#20041)
The add() method was not properly setting childen and parents objects
on instances of ConfigLine.  This only applied to the add method.  This
change fixes the problem by adding child and parent to the right
attribute.
2017-01-09 10:01:13 -05:00
Jiri Tyr
28050c1356 Update option desc of yum_repository module 2017-01-09 09:55:47 -05:00
Ner'zhul
c1f5432cc0 Better user report when OMAPI error occurs or key is invalid (#20035)
* Move imports after header
2017-01-09 12:40:53 +00:00
Ner'zhul
e87d6d8a70 Unbreak vmware_guest module which was break by 818ef493ad (#20036) 2017-01-09 11:29:18 +00:00
aperigault
8241675095 vmware_guest: Rename existing VM, or mark as template (#20018)
* vmware_guest: Add rename feature

* vmware_guest: Add feature to mark an existing VM as template
2017-01-09 09:37:36 +00:00
Adam Števko
d9ced3f4d1 Modules for gathering facts about ZFS datasets and pools (#19181)
* Add modules for gathering facts about ZFS datasets and pools

* Move zfs module to storage/zfs subcategory

* Replace dict.iteritems() with iteritems(dict)

* Add ANSIBLE_METADATA
Document return values
Make imports explicit
Use native YAML syntax in EXAMPLES

* Add zfs_facts and zpool_facts modules to CHANGELOG.md

* Add facts to return values
2017-01-09 07:53:42 +00:00
Adam Števko
3744764fae Add module for managing boot environments on FreeBSD/Solaris/illumos … (#19180)
* Add module for managing boot environments on FreeBSD/Solaris/illumos systems

* Add ANSIBLE_METADATA
Document return values
Make imports explicit
Use native YAML syntax in EXAMPLES

* Add beadm module to CHANGELOG.md

* Update version to 2.3
2017-01-09 07:52:06 +00:00
Adam Števko
69559c184d Gather uptime and device facts from Solarish systems (#18733)
* Gather device information on Solarish systems

* Gather uptime information on Solarish systems

* Fix typo in variable name

* Add comments and example output from kstat command
Use frozenset instead of set
Make parsing of line a little bit safer
2017-01-08 13:26:52 -08:00
Michael
583136980d Adding os_quota support to the OpenStack modules (#19590)
* Adding os_quota support to the OpenStack modules

* Updated descriptions in doc string

* Updated version_added to 2.2 based on CI test feedback

* ready_for_review

* Changed exit_json to remove updating host var facts

* Updated version_added and docs

* Added support for state:absent paramater

This includes:
- Updated the doc string with the paramater information
- Updated the example section showing how to reset a project quota
- Added code support to handle state:absent
- Encountered a bug in delete_network_quota where it returns
an error instead of the current quota. Added support code to
workaround that issue until a proper fix can be added.

* Updated security groups kwarg to reflect Neutron kwargs

* Updated iteritems to be items based on CI feedback

* Updated descriptions and import statements based on code review feedback

* Updated CHANGELOG.md to include os_quota under new mods.
2017-01-08 18:55:12 +00:00
Toshio Kuratomi
08d6990e67 Fix code-blocks to use correct syntax highlighting 2017-01-08 09:18:45 -08:00
John R Barker
01849004e9 Correctly link to modules (#20019) 2017-01-08 17:06:07 +00:00
Baptiste Mille-Mathias
d1bd526426 Document git module return values (#19485)
* Document git module return values

* Document git module return values

* Remove duplicate and added more variables
2017-01-08 15:33:51 +00:00
Fabio Alessandro Locati
2790999ee9 Add output (#19212) 2017-01-08 15:33:05 +00:00
Fabio Alessandro Locati
474c0dc87c Remove quotes - Cloud/azure/azure.py (#19206)
* Remove unused quotes

* Explicit is better than inplicit
2017-01-08 15:28:48 +00:00
Fabio Alessandro Locati
85f7d2b97a authorized_key: doc: Improve example description (#19209) 2017-01-08 12:28:29 +01:00
Scott Sinclair
de5d08a786 a copy of the pull request from ansible/ansible-modules-extras#3515 by @twistyWater
This fixes #19959 - exception throw when robocopy return_code is not 1 2 or 4.
2017-01-07 18:21:57 +11:00
Peter Sprygada
cba66dfedc update the _ios_template module to use the network_cli plugin (#19933)
* updates the deprecated ios_template module to use network_cli
* adds unit test cases for ios_template
* adds check for provider argument and displays warning message
2017-01-06 20:22:17 -05:00
Brian Coca
b7ad86acd0 only warn if non whitespace junk 2017-01-06 17:07:42 -05:00
Peter Sprygada
7d3366acc0 updates ios_command to use network_cli plugin (#19992)
* refactors ios_command to use network_cli
* adds unit test cases for ios_command
2017-01-06 17:06:40 -05:00
Gabriele
c980b52d33 Fixing issue when multiple vni exist (#19928) 2017-01-06 16:36:13 -05:00
Gabriele
f2baa6d61a fix nxos_facts to support multiple neighbors and modules (#19946) 2017-01-06 16:34:59 -05:00
Brian Coca
4672058b1f updated unarchive docs for url handling 2017-01-06 16:21:55 -05:00
Dag Wieers
c8d3dd9a15 Small fixes 2017-01-06 16:11:56 -05:00
Tom Melendez
89f232ad8a [GCE] gc_storage: add type parameter to expiration in argument_spec. (#19979)
Fixes ansible/ansible#19568
2017-01-06 13:27:47 -05:00
THEBAULT Julien
d1b38cb718 Fix tags documentation into rabbitmq_policy module 2017-01-06 12:51:44 -05:00
howinator
90002e06ae Add subnet associations to route tables dict
The main purpose of this PR is to add the subnet associations to the
dict returned by ec2_vpc_route_table_facts. This commit also
re-formats code to make it PEP8 compliant.
2017-01-06 12:30:54 -05:00
Will Thames
4bf7bf0b94 Add postgres-9.6 to rds_param_group module
Support postgres-9.6 as an engine choice for rds_param_group
2017-01-06 12:29:37 -05:00
Rene Moser
40c6191da6 win_template: fix key errors when --diff is used 2017-01-06 11:55:54 -05:00
John R Barker
40ecc3188f Use M() to link to the replacement module. (#19976) 2017-01-06 16:21:39 +00:00
aperigault
818ef493ad vmware_guest: Add windows customization support (#19866)
* vmware_guest: Add windows customization support

* vmware_guest: Move customizations inside separate function
2017-01-06 10:27:48 -05:00
James Hogarth
513466d309 add jenkins_script module for running arbitrary jenkins console scripts against a jenkins instance (#19640) 2017-01-06 15:12:24 +00:00
Olivier Boukili
b139a67c71 module_utils/vmware: added find_datastore_by_name helper function (#17538)
module_utils/vmware: exception catch for vcenter self-signed certificates
2017-01-06 09:11:25 -05:00
Ryan S. Brown
7a074b69a0 gce_net module: fail when no libcloud is found 2017-01-06 09:05:52 -05:00
Dag Wieers
00031e454e Sanitize folder path from the very start (#19929)
- If an absolute path is provided, ensure it starts with /vm
- Also ensure there are no trailing slashes

This gets rid of a few locations where the same was being done.
It also fixes the cases of multiple trailing slashes, or ending up with
/vm/ instead of /vm.
2017-01-06 09:05:10 -05:00
Toshio Kuratomi
ad1e066540 Transform exception with to_native instead of str 2017-01-05 18:16:32 -08:00
Andrew Grigorev
3fe8f70b08 Fix misleading SSL error message
The `except` block with exception matching throught
`if 'connection refused' in str(e).lower():` is funny,
but is not user-friendly.

Probably related issues:

- #15679
- #12161
- #9966
- #8221
- #7218

... and more
2017-01-05 18:13:44 -08:00
Toshio Kuratomi
0ee9972903 Fix constants to use environment variables in preference to config files 2017-01-05 17:11:51 -08:00
Angus Williams
f7d000fe74 Stops New-PSDrive commandlet producing output which was causing warnings (#19873) 2017-01-05 17:09:04 -08:00
Toshio Kuratomi
03510ec4ce Allow OSError to skip scriptdir removal
On Ubuntu the scriptdir gets placed into sys.path.  This makes some
modules (copy) fail because the ansible module gets loaded instead of
the stdlib copy module.  So we remove scriptdir there.  Unfortunately,
the scriptdir code uses abspath().  When pipelining, abspath() has to
find the cwd.  On OSX, finding the cwd when that directory is not
executable by the user raises an OSError.  Since OSX does not suffer
from the scriptdir problem we're able to just skip scriptdir handling if
we get that exception.

Fixes #19729
2017-01-05 15:50:56 -08:00
Ken Evensen
99e19ad617 Minor rework of pamd module. Fixed some documentation. (#19758)
* Minor rework.  Fixed some documentation.

* Requested changes in the case the arg is unicode
2017-01-05 15:48:24 -08:00
Toshio Kuratomi
5536ffe978 Fix OSX defaults for lists
In modern ansible, parameters default to string type.  This causes
issues for polymorphic parameters like this module's value param.  note
that this fix restores ansible-2.0 and previous behaviour but it is not
perfect.  If a parameter is specified via key=value or given on the
commandline then it will be a string before it reaches the module code.
There's nothing we can do about that.

Fixes #19585
2017-01-05 15:45:26 -08:00
Daniel
7cf9ee30a5 Removed 'no vn-segment' when state == 'absent' (#19952) 2017-01-05 22:03:46 +00:00
Brian Coca
08e0f6ada5 allow modules to set custom stats (#18946)
can be per run or per host, also aggregate or not
set_stats action plugin as reference implementation
added doc stub
display stats in calblack
made custom stats showing configurable
2017-01-05 16:38:36 -05:00
Emlyn Stokes
1154aca746 Paginate ASG results (#19944) 2017-01-05 16:12:30 -05:00
Jasper Lievisse Adriaanse
7793424b1b Add new module to manage SmartOS images through imgadm(1M) (#19696)
* Add new module to manage SmartOS images through imgadm(1M)

* Explain why check_mode is not supported

* Add imgadm module

* Incorporate feedback from abadger
2017-01-05 12:30:31 -08:00
Simon Wydooghe
6d9ca6c9d7 Simple typo fix (#19949)
Was reading the docs and spotted a typo.
2017-01-05 21:27:11 +01:00
Søren Kröger
3a2875739f Added active_connection_states parameter (#19775) 2017-01-05 10:57:22 -08:00
Toshio Kuratomi
95df8977b6 Fix yum install root (#19925)
* Reenable yum install root tests

No need for sos to test installroot.  Something with less deps works
just as well.

* Fix yum installroot.

Fix module import to use fail_json when the modules aren't installed.

Remove wildcard imports

* Lsat task is supposed to remove sos so make that happen
2017-01-05 10:42:43 -08:00
Toshio Kuratomi
22c9428776 eval() should be avoided when at all possible
eval can have security consequences.  It doesn't look bad here but it
does introduce unnecessary complexity and would make it harder if we
ever want to use static analysis to detect and prohibit eval.  So we
should get rid of it.

Note: this could be even more efficient if we combined the checks into
a single condition instead of looping but that does change the error
messages a bit.  For instance:
-        for arg in ('name', 'linode_id'):
-            if not eval(arg):
+        if not (name and linode_id):
+            module.fail_json(msg='name and linode_id are required for active state')
2017-01-05 10:41:49 -08:00
Samuel Boucher
ed624876d1 Update atomic_image.py (#19756)
Doc update typo
2017-01-05 10:33:05 -08:00
Dag Wieers
e1fe403075 Inform user that the yum metadata cache remains (#19753)
This PR improves the documentation so that it is clear that this module does
not clean the repository metadata cache on removal, and add an example
notification handler to the removal example as an extra reminder.

This fixes #19730
2017-01-05 10:30:37 -08:00
Dag Wieers
9ddcf16b4b vmware_guest: add support for more virtual NICs (#19932)
This patch adds support for all other virtual NICs, including:

 - pcnet32
 - vmxnet2
 - e1000e
 - sriov

Without this change, VMs with one of these NICs will fail with a
fault.NicSettingMismatch.summary error as it will only add interfaces,
not edit these.

This fixes #19860
2017-01-05 18:16:21 +01:00
Tyrone Tudehope
38d42e8b36 module is a property of the global object client (#19744)
Fixes #5466
2017-01-05 08:59:30 -08:00
René Moser
cb8cc51fdf cloudstack: new module cs_host (#19331) 2017-01-05 16:28:42 +01:00
Ted Timmons
12495e4b42 New module: aws_kms for managing access grants on AWS KMS keys (#19309)
New module by @tedder for handling granting/revoking access to KMS secrets. 

For example:

```
- name: grant user-style access to production secrets
  kms:
  args:
    mode: grant
    key_alias: "alias/my_production_secrets"
    role_name: "prod-appServerRole-1R5AQG2BSEL6L"
    grant_types: "role,role grant"
```
2017-01-05 09:42:59 -05:00
Peter Sprygada
5a14f1d705 adds new module ios_system (#19916)
adds new module ios_system
2017-01-05 09:02:29 -05:00
Toshio Kuratomi
cd2516bf8d Revert "Revert "Add --installroot to YUM and DNF modules, issue #11310""
This reverts commit b73ddd5212.
2017-01-05 00:24:20 -08:00
Matt Clay
b73ddd5212 Revert "Add --installroot to YUM and DNF modules, issue #11310" 2017-01-05 00:14:33 -08:00
Peter Sprygada
1c16c1db2b adds new module ios_vrf (#19915)
adds new module ios_vrf
2017-01-04 23:34:51 -05:00
Peter Sprygada
d182b271db updates netcfg and refactors Config class (#19920)
* refactors Config into network module
* fixes minor bugs with netcfg
2017-01-04 23:23:08 -05:00
Peter Sprygada
f842bc0b91 adds network_common shared module (#19919)
* support for ComplexList and ComplexDict
2017-01-04 23:17:41 -05:00
Peter Sprygada
6b7742fd75 Revert "cleans up the netcfg implementation" (#19917) 2017-01-04 22:55:16 -05:00
berenddeschouwer
1fdcda0996 Add --installroot to YUM and DNF modules, issue #11310 (#19861)
* Add --installroot to YUM and DNF modules, issue #11310

This continues ansible-modules-core#1558, and
ansible-modules-core#1669

Allow specifying installroot for the yum and dnf modules
to install and remove packages in a location other than /.

* Remove empty aliases

* Simpler installroot set default logic
2017-01-04 19:20:00 -08:00
Peter Sprygada
d424a0468a refactors ios shared module (#19850)
This allows the ios_* modules to take advantage of the new network_cli
connection plugin by refactoring the ios shared module.  Individual modules
need to be udpated as well
2017-01-04 21:52:56 -05:00
Peter Sprygada
630d10a27a updates action plugins for network_cli connection (#19849)
* net_config now subclasses action plugin network
* net_template now subclasses action plugin network

This will break existing modules until those modules have been refactored.
2017-01-04 21:52:46 -05:00
Peter Sprygada
fdb24bb5d7 cleans up the netcfg implementation (#19847)
* moves parse() into the instance
* removes old Config instance and supporting code
* adds net_common shared module
* minor tweaks to NetworkConfig class for parsing config files
2017-01-04 21:52:25 -05:00
Patrik Lundin
ee5364f983 openbsd_pkg: make "name" take a list.
This commit also adds the module to DEFAULT_SQUASH_ACTIONS which is
possible with this change.

The module still calls the pkg_* tools once per name internally, so the only
difference is less invocations of the module itself when using with_items.
2017-01-04 18:45:31 -08:00
Jiri Tyr
579b6a0f9d Changing author's e-mail for ldap_* modules (#19900) 2017-01-04 21:30:43 -05:00
Toshio Kuratomi
a33e34894b Move some modules into proper categories 2017-01-04 18:09:45 -08:00
Toshio Kuratomi
8469ea93d9 Remove unnecessary use of iteritems so that this compiles under python3 2017-01-04 17:39:34 -08:00
THEBAULT Julien
ee1dee08b6 Check the command result status in easy_install plugin (#16519) 2017-01-04 17:17:30 -08:00
Joe Adams
337ea4d65c Add pulp_repo module for interacting with repositories on a pulp server. 2017-01-04 17:12:49 -08:00
Ondra Machacek
8a3e80eb09 cloud: ovirt: add kernel boot parameters to vms module 2017-01-04 17:11:07 -08:00
Fabrizio Colonna
b6f9b0be1f Added arbiter support to gluster_volume module. 2017-01-04 17:09:24 -08:00
Andy Freeland
778a189a59 Fix letsencrypt remaining_days docs 2017-01-04 16:53:23 -08:00
Enis Ozgen
d4d9a48205 Fix typo in ec2_vpc_peer.py documentation 2017-01-04 16:51:26 -08:00
Paulo Matias
d51064a05e os_user: fix typo (self is not defined) 2017-01-04 16:47:43 -08:00
Sergio Millan
08b671990d Fixing Issue#18995 2017-01-04 15:24:32 -08:00
Toshio Kuratomi
f129977e2b Fix 4d355f8bf2
default values can contain nonstrings and those should not be converted
via to_text.
2017-01-04 14:35:05 -08:00
Toshio Kuratomi
91242b8cc3 Leave a comment that .format() can lead to security risks
Couldn't find any code that does this now but left a comment so that we
don't change something in the future without seeing that it could be
a problem.
2017-01-04 14:33:15 -08:00
Dag Wieers
ecaa0202b9 vmware_guest: assorted fixes and improvements (#19842)
A small collection of fixes and improvements:
- Simplify should_deploy_from_template()
- Bugfix for x.config that can be None
- Bugfix for mandatory guest_id (not when using templates)
- Simplify key testing and defaults
- Fix an incorrect reference to the last network
- Duplicate alias 'folder' removed
2017-01-04 17:25:09 -05:00
Toshio Kuratomi
02e3f4b526 Fix for atomic_move on RHEL5
When becoming an unprivileged user using non-sudo on a platform where
getlogin() failed in our situation we were not able to detect that the
user had switched.  This meant that all of our logic to use move vs copy
if the user had switched was attempting the wrong thing.  This change
tries the to do the right thing but then falls back to an acceptable
second choice if it doesn't work.

The bug wasn't easily detected because:
* sudo was not affected because sudo records that the user's have been
  switched so we were able to detect that.
* getlogin() works on most platforms.  RHEL5 with python-2.4 seems to be
  the only platform we still care about where getlogin() fails for this
  case.
* It had to be becoming an unprivileged user.  When becoming
  a privileged user, the user would be able to successfully perform the
  best case tasks.
2017-01-04 14:08:19 -08:00
Toshio Kuratomi
4d355f8bf2 Transform config values to text immediately when they enter ansible
Convert configuration values from ENV VARS, config files, and defaults
in constants.py.
2017-01-04 14:06:18 -08:00
Corwin Brown
9b7c9931db Issue #19575: Adding Dest Param to win_uri (#19577)
* Issue #19575: Adding Dest Param to win_uri

Added `dest` param to win_uri. Outputs the response body to a specified
file.

Addresses Issue #19575

* Was setting the wrong attribute
2017-01-04 13:33:47 -08:00
James Cammarata
a0b4d37dea Removing unused files in playbook/ directory 2017-01-04 15:17:15 -06:00
Brian Coca
92e8c53879 fixed id queries, should rely on effective 2017-01-04 14:23:26 -05:00
Jiri Tyr
1ff9b74e3d Adding ldap_attr module (#19286) 2017-01-04 14:11:02 -05:00
Toshio Kuratomi
e98c0a3009 Fix locale_gen to compare native strings rather than mixing byte and text strings
Fixes #19426
2017-01-04 10:11:33 -08:00
Adrian Likins
c771ab34c7 Add a encode() to AnsibleVaultEncryptedUnicode (#19840)
* Add a encode() to AnsibleVaultEncryptedUnicode

Without it, calling encode() on it results in a bytestring
of the encrypted !vault-encrypted string.

ssh connection plugin triggers this if ansible_password
is from a var using !vault-encrypted. That path ends up
calling .encode() instead of using the __str__.

Fixes #19795

* Fix str.encode() errors on py2.6

py2.6 str.encode() does not take keyword arguments.
2017-01-04 12:17:19 -05:00
James Cammarata
ac00c8a660 Fixing an iteration bug introduced by fed079e4 2017-01-04 10:34:06 -06:00
Ryan S. Brown
8772e4387b Update ec2_facts with new ap-south region 2017-01-04 10:27:48 -05:00
Kevin Houdebert
2ffb705049 Fix win_robocopy flags argument (#19603) 2017-01-04 14:27:24 +00:00
Matthew
45c57618b3 Have AnsibleModule raise a failure of git is missing in git_config module (#19676) 2017-01-04 14:23:21 +00:00
Rob
927218d99d Fix backward compat change - create custom required_together statement (#19642) 2017-01-04 14:11:56 +00:00
Kash
dceace6bb2 ecs_taskdefinition: Fix missing import camel_dict_to_snake_dict (#19560)
ecs_taskdefinition: Fix missing import camel_dict_to_snake_dict
2017-01-04 13:50:13 +00:00
Dag Wieers
fbec2ecaa8 vmware_guest: Do not match simply by folder (#19823)
This fixes #19077
2017-01-04 09:26:29 +00:00
Dag Wieers
0d9392a3bc vmware_guest: import iteritems (#19821)
Without this change you get this on Python 2.7.5:

    NameError: global name 'iteritems' is not defined
2017-01-04 09:12:29 +00:00
Toshio Kuratomi
0ca3800ae1 Fix traceback on Darwin with Python3
os.write() needs bytes objects on python3 while python2 can work with
either a byte or unicode string.  Mark the DUMMY_CA_CERT string as
a byte string so it will work.

Fixes #19265
Fixes #19266
2017-01-04 00:33:12 -08:00
Serhiy Martynenko
c7637992fe Fix #19189 django_manage bug with python3 filter() returning iterator insted of list 2017-01-03 22:41:43 -08:00
tedder
15e12d2cf2 git ssh wrapper: py3-compatability with strings
Wrap the fh.write(str) in b() to ensure the string is of the proper type in py2/py3. Otherwise, the following error occurs when using its ssh_wrapper:

    An exception occurred during task execution. The full traceback is:
    Traceback (most recent call last):
      File "/tmp/ansible_8r299r6t/ansible_module_git.py", line 1049, in <module>
        main()
      File "/tmp/ansible_8r299r6t/ansible_module_git.py", line 928, in main
        ssh_wrapper = write_ssh_wrapper()
      File "/tmp/ansible_8r299r6t/ansible_module_git.py", line 330, in write_ssh_wrapper
        fh.write(template)
    TypeError: 'str' does not support the buffer interface
2017-01-03 22:09:12 -08:00
Peter Sprygada
4937dd67e4 adds new feature to network_cli (#19848)
In some cases it is desirable to have a send only function that doesn't
wait for the response from the CLI (such as reloading a device).  This
adds a new key to the command json string sendonly that will
achieve this behavior.
2017-01-03 22:33:02 -05:00
Jacky Gao
08e2a5d4fb Contributing new module to manage HUAWEI data center CloudEngine switch. (#19793)
* HUAWEI data center CloudEngine switch module

* HUAWEI data center CloudEngine switch module

* HUAWEI data center CloudEngine switch module

* Update __init__.py

* Update __init__.py

* HUAWEI data center CloudEngine switch module

* HUAWEI data center CloudEngine switch module

* Update __init__.py

* Delete __init__.py

* HUAWEI data center CloudEngine switch module

* HUAWEI data center CloudEngine switch module

* modify init file

* Update cloudengine.py

* Update cloudengine.py
2017-01-03 22:30:59 -05:00
Ted
fd3ae0bf80 Add bigswitch big mon inline chain module (#18631)
* Add bigswitch util

* Add big switch big mon inline chain module

* Add required to access_token doc

* Add controller to doc

* Add validate_certs to doc

* Add author & metadata

* Add BSD license header
2017-01-03 22:26:34 -05:00
James Cammarata
fed079e4cb Fix role completion detection problem
When the same role is listed consecutively in a play, the previous role
completion detection failed to mark it as complete as it only checked to
see if the role changed.

This patch addresses that by also keeping track of which task in the role
we are on, so that even if the same role is encountered during later passes
the task number will be less than or equal to the last noted task position.

Related to #15409
2017-01-03 14:32:44 -06:00
Martin Bektchiev
1c13ddf7c8 Add @ to valid package name characters (#18862)
NodeJS formulae are now named node@<major_version>

E.g. https://github.com/Homebrew/homebrew-core/blob/master/Formula/node@6.rb
2017-01-03 21:05:37 +01:00
Arne Demmers
bd7466d56c Fix key lookup in gather facts flag. 2017-01-03 13:53:07 -05:00
Toshio Kuratomi
70e42f917d Add traceback information to fail_json in atomic move 2017-01-03 10:39:28 -08:00
Eric Lavarde
a601f2c6a3 Add warning to raw and script modules that there is no actual free_form parameter (like for command etc). 2017-01-03 11:46:50 -05:00
Marcos Diez
024e40d5f4 new lookup module: mongodb (#15057)
* new lookup module: mongodb lookup

* fix versionadded for MongoDB Lookup

* tests should run again

* removed use of basestring

* we don't use iteritems anymore

* run tests again

* run tests again2

* run tests again3

* run tests again4
2017-01-03 11:40:02 -05:00
Joseph Price
1ea86bc66a Clarify state=reloaded will start service 2017-01-03 11:34:07 -05:00
Dag Wieers
ffb80926ce Performance improvement using in-operator on dicts
Just a small cleanup for the existing occurances.

Using the in-operator for hash lookups is faster than using .keys()
http://stackoverflow.com/questions/29314269/why-do-key-in-dict-and-key-in-dict-keys-have-the-same-output
2017-01-03 11:31:38 -05:00
tmshn
6a6113e951 [timezone module] Return tzfile from _verify_timezone (fix #19745)
Modification picked from https://github.com/ansible/ansible-modules-extras/pull/3337
2017-01-03 11:20:38 -05:00
Tomáš Karásek
3ebbcbadcf 2 modules for Packet host: packet_device and packet_sshkey (#19005)
* Added 2 modules for Packet Host: packet_device and packet_sshkey

* Fixed comments from @mmlb

* Fixed comments from @gundalow

* Fix typos pointed by @gundalow

* Mention new Packet modules in the CHANGELOG.md
2017-01-03 16:10:17 +00:00
Alexander Gubin
fce9f4f679 shuffle filter: added optional 'seed' parameter 2017-01-03 11:08:36 -05:00
Ivan Bojer
f9385cb972 new module to change admin pwd through ssh (#19247)
* new module

* new ansible 2.3 requirements
2017-01-03 11:02:35 -05:00
Ivan Bojer
addb68f5ca panos_commit (#19244)
* new module

* added METADATA globe

* changed METADATA format from yaml to json
2017-01-03 11:01:31 -05:00
Ivan Bojer
660fab6bea panos_restart (#19245)
* new module

* support latest METADATA requirements
2017-01-03 11:00:15 -05:00
Leandro Lisboa Penz
0296f70f07 Don't use netconf's discard_changes when the device has no candidate cap (#19626)
The discard_changes netconf RPC requires the candidate capability.
We were getting an exception when configuring that kind of device.

Fixes #19529
2017-01-03 10:52:22 -05:00
Gabriele
c58278b1c2 Fixing nxos_ntp when no config exists (#19678) 2017-01-03 10:50:31 -05:00
mathieu bultel
962a592628 Add pacemaker cluster module for being managable with ansible (#19594)
* Add pacemaker cluster module for being managable with ansible

* fix yaml syntax in documentation

* Remove useless dependency

* Import AnsibleModule instead of import *
2017-01-03 15:50:00 +00:00
Ner'zhul
2c17f9becd vmware_guest: module rewrite to add many features & fixes (#19228)
* vmware_guest: various fixes, improvements & additions

* Add template_flag attribute to define if the destination machine is a
template
* Add helper class to create:
  * SCSI controller
  * Disks
  * Network devices
* New feature: create VM without using templates
* New feature: multiple NIC
* New feature: multiple disks
* New feature: custom SCSI controller types (default: paravirtual)
* New feature: NIC can now be E1000 or VMXNet3 (default)
* New feature: customize NIC mac address
* New feature: new disk option autoselect_datastore permit to select the less used datastore. If datastore field is provided, filter the datastore list before selection
* New feature: Implement disk resizing + addition when state=present and VM exists
* New feature: when state=present and vm exists, modify the current CPU, Memory and disk space
* New feature: add guest_id support permitting to customize & change current VM guest ID in VMWare
* New feature: resource pool support
* New feature: change VM configuration without recreating it (CPU, memory, disks, network, guest ID, resource pool)
* Add 'gatherfacts' state to gather facts on a VM instead of previous 'present' state ('present' ensure the VM configuration)
* Add PyVmomiCache class to cache read only object
* Various python code fixes
* Various documentation fixes
* esxi_hostname & cluster are now exclusive
* Drop ips attribute & set ip directly into networks
* Little performance fixes by removing some duplicate calls to VMWare API
* Python 3 portability fixes
* Create many functions to make the code maintainable
* Cleanup some useless attributes

* Add 'suspended' as desired state for VM

* Make guest_id, memory & CPU number optional in reconfiguration mode

* Note: guest_id is now mandatory to create a VM from scratch (not templating)

* Bux fixes + Do network IP optinal + Add network vlan option
2017-01-03 09:48:07 -05:00
Marius Gedminas
b0b7a636d8 authorized_key: support --diff (#19277)
* Refactoring: split readkeys() into readfile() and parsekeys()

* Refactoring: split writekeys() into writefile() and serialize()

* authorized_key: support --diff

* Refactoring: remove no-longer used readkeys()/writekeys()

* Integration test for authorized_key in check mode
2017-01-03 09:32:32 -05:00
Alexander Trost
5c36bd6714 Added set feature for OpenVSwitch bridges (#19692)
See old PR https://github.com/ansible/ansible-modules-extras/pull/2711
2017-01-03 10:01:09 +00:00
Brian Coca
425ab5598e fix wait_for example 2017-01-02 17:16:23 -05:00
Jasper Lievisse Adriaanse
0c0defb63d Recognize pkgin when installed in the global zone on SmartOS 2017-01-02 17:02:22 -05:00
Jonathan Juares Beber
0bf7a7321a fix mongodb_parameter
This is broken the module when using str parameters.

Value is already converted to int, if necessary at line 193
2017-01-02 07:46:21 -08:00
Ner'zhul
9f2d8c2409 Add omapi_host module (#19602)
This module managed DHCPd hosts using OMAPI protocol

Features:
* Add a host
* Remove a host
* Modify host IP (it's impossible to modify only mac or only hostname, this doesn't have any effect)
* Add custom DHCP attributes (at creation only)
2016-12-31 19:09:24 +00:00
Kash
8e0119b24c ecs_taskdefinition: more accurate description in doc (#19204) 2016-12-30 12:30:04 -05:00
Ondra Machacek
9a2b220005 ovirt: get default auth/connection params from environment vars (#19385)
* cloud: ovirt: add possibility specify auth params in env vars

* module_utils: ovirt: fix pep8 issues
2016-12-30 12:24:05 -05:00
Rob
36213e8b21 Fix to fail when task_definition or desired_count not defined and state=present, define that role is required with load_balancers parameter and a few pep8 fixes (#19490) 2016-12-30 10:50:09 -05:00
Ryan S. Brown
0228f741c3 Undo format changes 2016-12-30 10:42:33 -05:00
Rob White
62dfa2ad11 Add helper function so that IAM policies can be compared for equality and update s3_bucket to take advantage of helper function 2016-12-30 10:41:22 -05:00
Tom Paine
e66501b0b7 [docs] update ec2_ami_copy docs to clarify encrypted snapshots (#19641)
Docs formatting.
2016-12-30 10:37:25 -05:00
Tom Paine
7ba746dc1e Update ec2_ami.py (#19636)
- Consistent capitalisation in the descriptions
- Removed redundant 'optional' notes when this is covered by the Boolean `optional` column
- Clarified `instance_id` description
2016-12-30 10:36:29 -05:00
Ondra Machacek
ba9f6326f4 Documentation improvments of oVirt modules (#19668) 2016-12-30 10:35:26 -05:00
Lujeni
427cfd6162 Fix the certificates bodies compare into iam_cert module (#19684) 2016-12-30 10:34:18 -05:00
joernheissler
a5145a41a8 Add 3 new Amazon AWS regions (#19687) 2016-12-30 10:32:21 -05:00
Laurent Goujon
e2c50baf3f Fix broken ec2 volume creation breaks with older boto versions (#1773) (#19723)
Fix issue which prevents creating ec2 instance with extra volumes when
using a older version of boto not supporting volume encryption.

Fix issue #1173
2016-12-30 10:31:35 -05:00
Sean Summers
f8fa772a55 ec2_ami_find: set is_public to 'true' or 'false' (#19250)
* set is_public 'true' or 'false'

Despite being a boolean property, https://github.com/melta/boto/blob/master/boto/ec2/image.py:63 sets is_public = True only if the argument is passed in as the string 'true'. Likewise for False/'false'.

This is a workaround for that bug in boto2, to allow the documented parameter to work with valid yaml values.

fixes #5600

* only set is_public if true
2016-12-30 10:28:13 -05:00
Ivan Nikolov
fcb1a2b6cc Fixed ec2_eip.py when assigning a standard elastic IP. (#19238) 2016-12-30 10:27:04 -05:00
Chris Soyars
e0d4050612 ec2_facts: Add support for ca-central-1 (#19260) 2016-12-30 10:26:09 -05:00
René Moser
f101a9bd73 icinga2_feature: Set LANG since we rely on the output by using regex (#19742)
- remove common return
- add ANSIBLE_METADATA
2016-12-30 09:06:49 +01:00
kuboj
5e17eb3053 added os_aggregate module (#19374)
* added os_aggregate module

* various fixed to os_aggregate module

based on comments by @emonty (https://github.com/ansible/ansible-modules-extras/pull/2873)

* updated shade version requirement
2016-12-29 12:51:34 -05:00
Tom Melendez
7e88df7ebc Adding auth support for google-api-python-client and gcloud-python (#19090)
Support for the Google API and GCloud-Python Clients have been added.

The three libraries:
* GCloud-Python: A new function, get_google_cloud_credentials, should be used.  The credentials-object returned can be passed to any gcloud-python client.  Using this client library requires in the installation of gcloud-python.  This is preferred library for new modules.

* Google API: A new function, gcp_api_auth, should be used to take advantage of services requiring this client.  This client library should be used if the desired functionality is not available in GCloud-Python.  Using this library requires the installation of google-api-python-client.

* libcloud: Existing function, gcp_connect, should be used.  The interface and return values have not changed and existing modules (such as gce, gce_pd and gce_net) should work without modification.  Note that the credentials-fetching code has been refactored out of gcp_connect so that can be reused by all connection functions. To use this function, apache-libcloud must be installed.

Import guards have been added and will only be trigger if a user tries to use a function that is missing dependencies.

Credential-specifying mechanisms (i.e, ansible module params, env vars and libcloud secrets.py) have not changed.  They have been refactored and unit tests have been added to allow for changes going forward. We are deprecating (and removing in a subsequent release) the ability to specify credentials via the libcloud secrets file.  Also, we have deprecated (and also plan to remove in a subsequent release) the ability to use a p12 pem file for a key - the JSON format is strongly preferred.  Deprecation warnings have been added for both of these issues (see the Ansible docs on how to disable deprecation warnings).
2016-12-29 12:33:52 -05:00
Ner'zhul
65f0155d8a Add icinga2_feature module (#19732)
This module permits to tell icinga to enable or disable features
2016-12-29 14:05:22 +00:00
Gaël Lambert
647bf4eceb doc: fix indentation in amazon/rds.py example docs (#19734)
Actual doc give this error

```
fatal: [localhost]: FAILED! => {
    "changed": false,
    "failed": true,
    "invocation": {
        "module_args": {
            "command": "facts",
            "register": "new_database_facts"
        },
        "module_name": "rds"
    },
    "msg": "unsupported parameter for module: register"
}
```

Register should be at the module `rds` level and not at args level in this example :

```
 - rds:
     command: facts
     instance_name: new-database
-    register: new_database_facts
+  register: new_database_facts
```
2016-12-29 08:46:40 -05:00
Tom Melendez
d09ad82e71 Add regex support to gce_tag module, add unit tests and update integration test. (#19087)
The gce_tag module can support updating tags on multiple instances via an instance_pattern field.  Full Python regex is supported in the instance_pattern field.

'instance_pattern' and 'instance_name' are mutually exclusive and one must be specified.

The integration test for the gce_tag module has been updated to support the instance_pattern parameter.  Unit tests have been added to test the list-manipulation functionality.

Run the integration test with:

TEST_FLAGS='--tags "test_gce_tag"' make gce

Run the unit tests with:

python test/units/modules/cloud/google/test_gce_tag.py
2016-12-29 08:45:20 -05:00
George Brighton
a10209cbe9 iptables: Fixes invalid ip6tables option (#19657)
fixes #19656
2016-12-27 08:27:22 +01:00
Jun Guo
31526595c5 docker_image: docs: won't be pushed to private registry without push parameter. (#19691) 2016-12-27 08:15:12 +01:00
Jasper Lievisse Adriaanse
2eb8f4cc70 Add new 'clean' and 'quick' parameters, correspondig to -c and -q in pkg tools (#19680) 2016-12-26 20:57:37 +01:00
Monty Taylor
0bb7149e17 Merge pull request #19653 from Thingee/verify_openstack_images
Verify image exists when passed for open stack server creation
2016-12-26 13:15:20 -06:00
ABond
47c0c71002 Minor grammar change in Digital_Ocean Module doc (#19674) 2016-12-25 00:24:54 +01:00
Matt Davis
f96ac8bff0 fix multiple handler notifications (#19655)
Fixes #19647
Adds integration test to catch multiple handler notifications
2016-12-22 21:33:24 -08:00
James Cammarata
78d4f6bbc1 Removing print debug statements 2016-12-22 19:14:20 -06:00
Tom Booth
a37bc3788b runner_on_async_failed missing arg
missing and argument from CallbackModule
2016-12-22 16:55:46 -08:00
Michael Scherer
dc71f28642 Handle color on multiple line in a cleaner way
When using ansible deployment on git push, git insert "remote:"
at the start of ansible output. If you force the color on ansible,
the "remote:" also get colored if the string to display is on
more than 1 line.

This change make sure that each end of line reset the color, instead
of reseting only at the end of the string.
2016-12-22 16:01:29 -08:00
Timur Vasyunin
5365b81d14 Fix for import 'display' in lib/ansible/plugins/lookup/filetree.py 2016-12-22 15:51:39 -08:00
slohse
27cce305e6 iocage connector that wraps around jail connector. (#17986)
Added iocage connector that extends the jail connector. Uses iocage to translate iocage tags or UUIDs/partial UUIDs to the actual jail name and then uses the jail connector for actual functionality.
2016-12-22 15:34:47 -08:00
azenk
f2458140f6 Lastpass lookup plugin (#16285)
This plugin can be used with the lpass cli interface for lastpass.
[lastpass-cli](https://github.com/lastpass/lastpass-cli)

Example:
Add a lookup to your playbooks/variables somewhere:
```
some_variable: "{{ lookup('lastpass','Some Lastpass entry name or ID', field='username') }}"
```
Usage:
* start a lpass session prior to using ansible
* run ansible
* logout when finished

```
lpass login user@domain.com
ansible-playbook foo.yml
lpass logout
```
2016-12-22 14:47:33 -08:00
Mike Perez
6d32dba3c3 Verify image exists when passed for server creation
If the image doesn't exist, we should fail and raise the error clearly. Fixes #18921
2016-12-22 22:37:59 +00:00
Rob Cutmore
1da6a67c50 Add tests for Git remote URL changes (#16893)
* Update Git tests for set remote URL changes
* Git: report changed when needed in check mode
2016-12-22 13:46:47 -08:00
Sorin Sbarnea
4ebd763de0 py3 compatibility fix reported on #17038 (#19569)
Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
2016-12-22 11:56:46 -08:00
Nathaniel Case
f7cf96e1a6 fix junos typo (#19648)
closes #19646
2016-12-22 14:56:12 -05:00
Brian Coca
6f5ecb7efd warn when examined group_vars is not dir 2016-12-22 12:39:31 -05:00
Rob
69c14bd003 New module - iam_role (#19486)
* New module - iam_role

* Change policy type to json. Remove wildcard import
2016-12-22 13:58:38 +00:00
Hugh Ma
5b07bbfcfc Stacki host module (#19532)
* moving stacki module to remote_management

* updating docstring with force_install info
2016-12-22 13:53:05 +00:00
Gregory Shulov
6c3de3c299 Initial Commit for Infinidat Ansible Modules (#19429)
* Initial Commit for Infinidat Ansible Modules

Skip tests for python 2.4 as infinisdk doesn't support python 2.4

Move common code and arguments into module_utils/infinibox.py

Move common documentation to documentation_fragments. Cleanup Docs and Examples

Fix formating in modules description

Add check mode support for all modules

Import AnsibleModule only from ansible.module_utils.basic in all modules

Skip python 2.4 tests for module_utils/infinibox.py

Documentation and code cleanup

Rewrite examples in multiline format

Misc Changes

Test

* Add Infinibox modules to CHANGELOG.md

* Add ANSIBLE_METADATA to all modules
2016-12-22 13:18:19 +00:00
Gordon Gao
d9e1e374b2 let chdir support relative path in more modules (#16736) 2016-12-22 00:19:50 -08:00
James Cammarata
b688f11474 Correctly set loader path when using list tags/tasks
Fixes #19398
2016-12-21 21:01:02 -06:00
bart2
cdb35f4ce2 Fixes #16936 - Digest authentication not working in uri module (#18736) 2016-12-21 18:11:42 -08:00
James Cammarata
85bbce9d6b Wrap unhandled errors from lookups in an AnsibleError
This provides better error handling, and prevents errors like KeyError
from bubbliing up to code in odd places.

Fixes #17482
2016-12-21 11:48:18 -06:00
James Cammarata
d70d279c4e Also fix default callback to use ignore_errors param
Rather than the value in the task, which may not be templated.

Related to #18289
2016-12-21 11:37:06 -06:00
Matt Clay
446888ef41 Switch from iteritems to items for py3. 2016-12-21 09:22:54 -08:00
Ganesh Nalawade
0d06b77970 Add 'update' parameter in junos_config module (#19046)
* Add update parameter in junos_config module which supports
configuration action like merge, replace and overwrite.

* Add support for replace along with update
argument
2016-12-21 11:56:55 -05:00
James Cammarata
dd0257b995 Template "original_task" fields in _process_pending_results
Since we no longer use a post-validated task in _process_pending_results, we
need to be sure to template fields used in original_task as they are raw and
may contain variables.

This patch also moves the handler tracking to be per-uuid, not per-object.
Doing it per-object had implications for the above due to the fact that the
copy of the original task is now being used, so the only sure way is to track
based on the uuid instead.

Fixes #18289
2016-12-21 10:09:06 -06:00
Brian Coca
7faa041636 added file flag preservation to atomic_move
preserves existing flag info if possible
2016-12-21 10:56:40 -05:00
Brian Coca
3691c784d2 fix check mode for all options
also simplified code paths and changed import away from *
fixes #19476
2016-12-21 09:36:46 -05:00
Jiri Tyr
91094ec96c Adding ldap_entry module (#19285)
* Adding ldap_entry module

* Introducing explicit option for LDAP attributes

* Fixing requirements of attributes option
2016-12-21 07:37:28 +01:00
Nehal J Wani
e907622121 jenkins_plugin: doc: Specify version as string (#18858)
If the plugin version expected is, say '1.20', then specifying it
as...
    version: 1.20
... will make the YAML parser interpret it as a float, and the
value obtained by the module will be 1.2 instead of 1.20, which
will cause downloading of wrong version of the module.

This patch updates the docs so that users don't face this issue.
2016-12-21 07:32:23 +01:00
Brian Coca
8c5d321a23 simplified unsafe writes 2016-12-20 15:54:10 -05:00
Adrian Likins
727ca6f436 Fix error on 'help module' in ansible-console (#19390)
If 'help xattr' for example, ansible-console would
traceback because module_docs.get_docstring() now
returns 4 values (module metadata was added)
2016-12-20 15:50:29 -05:00
Brian Coca
ebf835045f unique error messages to avoid confusion 2016-12-20 15:25:59 -05:00
Adrian Likins
ab560df15f Fix 3 char indent on AnsibleModule._unsafe_writes (#19542) 2016-12-20 10:36:17 -05:00
Adrian Likins
388510f379 Fix missing imports from sysctl module
This module was missing an import of get_exception()
and had an unused import of 're'
2016-12-20 10:23:48 -05:00
Matthew Gamble
8292cadc7f Tell pacman not to display progress bars
Displaying progress bars is not recommended for any scripted usage of
pacman, such as the ansible pacman module.
2016-12-20 09:47:25 -05:00
Ganesh Nalawade
c3c4ae87dd Add 'update' parameter in junos_config module (#19038)
* Fix # #5839 Add 'update' parameter in junos_config module

Add update parameter in junos_config module which supports
configuration action like merge, replace and overwrite.

* Fix documentation issue

* Fix review comment to add replace argument

Make replace and update argument mutually
exclusive, to support replace for backward
compatibility.
2016-12-20 07:27:26 -05:00
Peter Sprygada
f831ef692c update signature in network plugin (#19545)
Fix call to _update_module_args() to include module_name in the args
2016-12-20 07:07:42 -05:00
Ken Evensen
bcace3cfc4 Gconf2 module (#19540)
* Pull #19267 broke sysctl module.  Minor corrections

* Correct description.  Functional updates
2016-12-20 11:53:49 +00:00
tmshn
112d950794 [timezone module] Check if timedatectl command is actually available 2016-12-19 21:18:12 -05:00
Michael Herold
a532dd915a Adds description for ini_file "section: null" 2016-12-19 21:10:30 -05:00
Matthew Gamble
f24ab68f04 Improve and optimise pacman package installation
Previously, packages were installed one at a time in a loop. This caused
a couple of problems.

First, it was a performance issue - pacman would have to perform all of
its checks once per package. This is unnecessarily costly, especially
when you're trying to install several related packages at the same time.

Second, if a package you're trying to install depends on a virtual
package that is provided by several different packages (such as the
"libgl" package on Arch) and you aren't also installing something that
provides that virtual package at the same time, pacman will produce an
interactive prompt to allow the user to select a relevant package. This
is obviously incompatible with how ansible operates. Yes, this problem
could be avoided by installing packages in a different order, but the
order of installation shouldn't matter, and there may be situations
where it is not possible to control the order of installation.

With this refactoring, all of the above problems are avoided. The code
will now work out all of the packages that need to be installed from any
configured repositories and any packages that need to be installed from
local files, and then install all the repository packages in one go and
then all of the local file packages in one go.
2016-12-19 21:09:25 -05:00
Dag Wieers
93cfe73a76 Report detailed error when internal remote functions fail
This is a redesign in how plugins call _remote_checksum().

- _remote_stat() has been modified to report the real error as
  AnsiblError
- Action plugin **unarchive** calls _remote_stat() directly instead of
   _remote_checksum()
- Action plugin **unarchive** also handles the exceptions directly
- Ensure get_exception() returns native text

Two other action plugins, **template** and **fetch**, also do a remote checksum.
In **template** we already call _remote_stat(), just like we now do for
unarchive, in **fetch** we do call _remote_checksum() and we make the
exact same mistake as the unarchive plugin. So that one could use a
redesign as well.

This fixes #19494

Before:
```
[dag@moria ansible.testing]$ ansible-playbook -v test137.yml
Using /home/dag/home-made/ansible.testing/ansible.cfg as config file

PLAY [localhost]
******************************************************************************************************

TASK [unarchive]
******************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg":
"python isn't present on the system.  Unable to compute checksum"}

PLAY RECAP
******************************************************************************************************
localhost                  : ok=0    changed=0    unreachable=0
failed=1
```

After:
```
[dag@moria ansible.testing]$ ansible-playbook -v test137.yml
Using /home/dag/home-made/ansible.testing/ansible.cfg as config file

PLAY [localhost]
*************************************************************************************************************

TASK [unarchive]
*************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg":
"Failed to get information on remote file (/tmp/): sudo: unknown user:
foobar\nsudo: unable to initialize policy plugin\n"}

PLAY RECAP
*******************************************************************************************************************
localhost                  : ok=0    changed=0    unreachable=0
failed=1
```
2016-12-19 21:04:48 -05:00
Adrian Likins
2597c1236d Better error msg for basic.get_bin_path()
Include the searched paths in the error message.
2016-12-19 20:55:52 -05:00
Adrian Likins
35fef6fb84 Better error message for module unsupported params
Keep track of all the unsupported parameters, and include
all of them in the error message as well as a list of the
supported params.
2016-12-19 20:47:39 -05:00
Fabio Alessandro Locati
06abeea5ad Improve YAML examples - windows/win_package.py (#19407)
* Improve YAML examples - windows/win_package.py

* Fix quote

* Fix typo
2016-12-19 13:58:28 -08:00
Fabio Alessandro Locati
3c64ccd6e1 Make examples in YAML format - windows/win_acl.py (#18836)
* Make examples in YAML format - windows/win_acl.py

* Raw string
2016-12-19 13:57:21 -08:00
Peter Sprygada
c546c12b60 fixes incorrect module name for action plugin (#19535)
This fixes a bug introduced in the action plugin for setting the
module name value for logging
2016-12-19 16:54:31 -05:00
Rezart Qelibari
507b96ff30 user: make system=yes work on Darwin systems. (#19464)
* Update system/user.py module.

Add ability to add real system users with next free system uid (< 500) on macOS.

* Improve syntax in system/user.py module.

Remove complex if else line and replace by simple comparison which yields the same boolean value.

* Remove "True" comparison of user.py.

Remove comparison to true, as it is not pep8 conform.
2016-12-19 16:35:56 -05:00
Chris Houseknecht
71685b3258 Update module_args['rsync_opts'] when connection type is docker (#19531) 2016-12-19 16:08:31 -05:00
Brian Coca
9816addcdc removed too generic 'infrastructure' 2016-12-19 15:25:39 -05:00
Brian Coca
e542976bb7 removed redundant else/return 2016-12-19 15:11:29 -05:00
Toshio Kuratomi
226124956c Allow timeout decorator to handle @timeout as well as @timeout() 2016-12-19 15:09:50 -05:00
Brian Coca
b4bd6c80de fixes to facts timeout
also now handle timeout exception correctly everywhere
2016-12-19 15:09:50 -05:00
Brian Coca
f533f6603c show filename for module 2016-12-19 14:48:19 -05:00
Rob
cfa8ce767b Add new parameters to taskdefinition module - network_mode and task_r… (#19493)
* Add new parameters to taskdefinition module - network_mode and task_role_arn

* Add version_added field for doco

* Change version_added parameter to 2.3
2016-12-19 18:16:35 +00:00
Fabio Alessandro Locati
a080d44a47 Improve YAML examples - system/solaris_zone.py (#19410) 2016-12-19 16:49:47 +00:00
Peter Sprygada
7814546735 cast injected json string to bytes in local modules (#19519)
this change will cast the locally injected ansible args to bytes
from string
2016-12-19 11:34:18 -05:00
Peter Sprygada
2a5a2773c8 adds new module net_command for network devices (#19468)
* new module net_command for sending a command to a network device
* adds unit test cases for module
* only works with connection=network_cli
2016-12-19 11:21:37 -05:00
Rob
b77ab1a6c9 Add support to ec2_eip to associate with a secondary ip address (#19484) 2016-12-19 15:45:38 +00:00
Ken Evensen
58b067532f gconftool2 module (#19461)
* Pull #19267 broke sysctl module.  Minor corrections

* Commit of gconftool2 module
2016-12-19 14:57:31 +00:00
Alex Sergeyev
28a3a13656 Support MariaDB engine version 10.1 (#19483) 2016-12-19 14:28:29 +00:00
redbloodmage
0568adc272 Added some clarity on the token confusion. (#19473) 2016-12-19 13:42:31 +00:00
Peter Sprygada
8f97ddd98a removes network os guess static method (#19467)
For devices that do not support mutliplexing, we cannot automatically
determine the network os.  This removes the os guess static method
from the terminal plugin.  For this devices, the network_os
value must be configured
2016-12-19 07:47:29 -05:00
Matthew
c58461596a Support pacman packages using different types of compression (#19503)
It's possible to compress packages using several different compression
methods, or not compressed at all. Previously, the pacman module only
supported files compressed using xz. This update ensures that all
compression types currently supported by pacman are supported by the
ansible pacman module.

The list of supported compression methods at the time of writing can be
found here:
https://git.archlinux.org/pacman.git/tree/scripts/makepkg.sh.in#n747
2016-12-19 12:08:45 +00:00
Will Thames
87c0c33241 Fix include_role docs to be valid YAML (#19506)
Remove the colon from one of the documentation notes, which was
causing documentation schema validation to fail.
2016-12-19 10:45:01 +00:00
Brian Coca
48dee1b6d0 still needs static for task object 2016-12-16 23:52:11 -05:00
Dag Wieers
39c9c6b942 Ensure that command/shell errors are displayed
This fix ensures that if there are specific module errors (in our case
the python interpreter was not found) then command and shell returns a
proper error.

It also fixes a few other imperfections that we noticed during
troubleshooting:

- Return the real RC if it were available
- Improve a dictionary evaluation using .get()
- Return an RC of -1 if it is unknown (instead of returning 0)

This fixes #18846
2016-12-16 21:46:02 -05:00
Dag Wieers
41614fd8e6 Display proper error on group_vars syntax error
This fix ensures a proper error is shown when a group_vars files cannot
be parsed correctly. Without this patch you get:

```
[dag@moria ansible.testing]$ ansible-playbook test132.yml
ERROR! Unexpected Exception: dictionary update sequence element #0 has length 1; 2 is required
to see the full traceback, use -vvv
```

With this patch you get:
```
[dag@moria ansible.testing]$ ansible-playbook test132.yml
ERROR! Problem parsing file '/home/dag/home-made/ansible.testing/group_vars/test135': line 1, column 1
```

This fixes #18843
2016-12-16 21:13:41 -05:00
Brian Coca
5d82fe545f minor docs and option fixes 2016-12-16 16:17:52 -05:00
Brian Coca
884b529195 removed unused 'static' option
the task level directive is what actually controls this, this option was never used
2016-12-16 15:23:36 -05:00
Jake Morrison
00859a4ced Handle inability to read /proc for ansible_service_mgr. Fixes #18957 2016-12-16 12:28:13 -05:00
Adrian Likins
5cd7a08418 Check solaris 'smbios' is exists before running it
smbios could potentially be None here, possibly causing
the solaris 8/9 failures seen at #19282

Fixes #19282
2016-12-16 12:10:16 -05:00
Ryan S. Brown
5204024f35 s3_sync module: Add ANSIBLE_METADATA parameter 2016-12-16 09:28:45 -05:00
tedder
be7a568b33 New module s3_sync: boto3-powered s3 synchronization
Syncs groups of files faster than the `s3` module and support content
type detection/overriding and globbing.
2016-12-16 09:26:30 -05:00
Fabio Alessandro Locati
f1b5dde4cb Improve YAML examples - packaging/kibana_plugin.py (#19409) 2016-12-16 09:08:38 +00:00
Dag Wieers
2f90091f0a Add an important example for SSHd
Sudoers is a great example to show how you can prevent shutting yourself
out. But SSHd is at least as important to avoid syntax errors causing a
lot of grieve. So I think it deserves a spot in this list :-)
2016-12-15 20:42:51 -05:00
Fabio Alessandro Locati
fb0779f657 Improve YAML examples - windows/win_regedit.py (#19400) 2016-12-15 15:05:18 -08:00
Fabio Alessandro Locati
b6f2565d60 Improve YAML examples - windows/win_template.py (#19408) 2016-12-15 15:04:49 -08:00
Fabio Alessandro Locati
beb6ed08cd Improve YAML examples - windows/win_owner.py (#19406) 2016-12-15 15:00:28 -08:00
Fabio Alessandro Locati
12205598c3 Improve YAML examples - windows/win_acl_inheritance.py (#19405) 2016-12-15 15:00:03 -08:00
Fabio Alessandro Locati
5a87f26658 Improve YAML examples - windows/win_get_url.py (#19404) 2016-12-15 14:59:07 -08:00
Fabio Alessandro Locati
5f8f1fa782 Improve YAML examples - windows/win_iis_webapppool.py (#19403) 2016-12-15 14:57:26 -08:00
Fabio Alessandro Locati
83d0f621da Improve YAML examples - windows/win_iis_webapplication.py (#19402) 2016-12-15 14:56:29 -08:00
Fabio Alessandro Locati
f57418c2c1 Improve YAML examples - windows/win_user.py (#19401) 2016-12-15 14:56:04 -08:00
Fabio Alessandro Locati
9b3d9e1780 Improve YAML examples - windows/win_file_version.py (#19399) 2016-12-15 14:54:12 -08:00
Fabio Alessandro Locati
0aa16b36b7 Make the example in proper yaml format - windows/win_iis_virtualdirectory.py (#18829)
* Make the example in proper yaml format

* Add r
2016-12-15 14:53:30 -08:00
Fabio Alessandro Locati
75bcec0ef5 Fix conflict and typos (#18831) 2016-12-15 14:50:22 -08:00
Nathaniel Case
2405c0bbef Hopefully clear up some junos issues. (#17616) 2016-12-15 17:07:19 -05:00
Eric Beahan
dce8f3899e Modify an initial value causing exception when vlan_range param is present (#19019) 2016-12-15 16:31:34 -05:00
Tim Rupp
e0e1d3b561 Adds description parameter to pools (#19362)
This patch adds the description parameter as a supported param of
the bigip_pool module.

Tests for this change are available here

https://github.com/F5Networks/f5-ansible/blob/master/roles/bigip_pool/tasks/main.yaml#L732
2016-12-15 16:28:30 -05:00
Nathaniel Case
7900319fc3 Assorted python3 fixes for network code. (#18777) 2016-12-15 16:25:03 -05:00
ikelos
c49eac5645 Fix the junos zeroize function (#19142)
Currently this function directs to the standard NetworkModule,
whose run_commands function takes no arguments (other than self).

This directs the call to the connection's cli method to run the command
directly on the device.
2016-12-15 16:23:04 -05:00
Ganesh Nalawade
ee5d5c3e84 Fix #4103 Support json format in junos_command module (#19045) 2016-12-15 16:01:23 -05:00
Peter Sprygada
ad99d52679 adds feature to allow connection to set action plugin (#18762)
Connection plugin can define default action plugin to use by providing
action_handler instance variable.  This will override the default
action plugin normal
2016-12-15 15:47:39 -05:00
Peter Sprygada
0cef38cf02 adds feature to all modules to be run locally (#18763)
* adds new error AnsibleModuleExit to handle module returns
* adds new action plugin network for attaching connection to network modules
* adds new shared module local to receive connection
* splits out function to update task_args with common updates

This commit provides a mechansim for running local modules that require
a connection object for interative commands tyically implemented for
network devices.  It provides a way to locally import modules (post fork)
and run them using exception handling to exit.
2016-12-15 15:47:29 -05:00
Fabio Alessandro Locati
066872cdc6 Improve examples (#18830) 2016-12-15 10:43:50 -08:00
Fabio Alessandro Locati
8dc3b60d0f Remove unneeded quotes - windows/win_uri.py (#18828) 2016-12-15 10:38:02 -08:00
Fabio Alessandro Locati
cf5449c5d9 Remove unneeded quotes - windows/win_unzip.py (#18827) 2016-12-15 10:37:02 -08:00
Fabio Alessandro Locati
439f98005f Highly rewrite and fix the examples - windows/win_iis_webbinding.py (#18823) 2016-12-15 10:34:20 -08:00
Artur Molchanov
a8d5358d7f systemd module: Allow to stop activating service (#19383)
* systemd module: Allow to stop activating service

Allow to stop service with ActiveState=activating.

* systemd: Fix incompatibility with Python 2.4
2016-12-15 11:14:33 -05:00
John R Barker
7dc86648c4 Docs typo (#19380) 2016-12-15 13:32:28 +00:00
Ryan S. Brown
197658aff4 Handle when the AMI launch permissions are unset.
Use an empty list to avoid a TypeError because `'NoneType' is not iterable``
2016-12-14 19:45:14 -05:00
Michael Gugino
250f862573 Fix bug #5328 apache module loading (#19355)
* Fix bug #5328 apache module loading

Currently, the apache2_module module parses apache configs
for correctness when enabling or disabling apache2 modules.

This behavior introduced a conflict condition when transitioning
between mpm modules, such as mpm_worker and mpm_event.

This change accounts for the specific error condition raised
by ``apachectl -M``:
``AH00534: apache2: Configuration error: No MPM loaded.``
When loading or unloading a module with a name that contains 'mpm_',
apache2_module will ignore the error raised by apachectl if stderr
contains 'AH00534'.

Fixes #5328

* Add AH00534 warning

* Added changes from PR #5629

* Modified ignore_configcheck behavior
2016-12-14 13:18:19 -08:00
Toshio Kuratomi
0b440a9289 Code smell test for iteritems and itervalues (#19292)
* Code smell test for iteritems and itervalues

* Change the keydict object in authorized_keys so it doesn't throw a false postive

keydict is a bad data structure anyway.  We don't use the iteritems and
itervalues methods so just disable them so that the code-smell tests do
not trigger on it.

* Change release templates so they work with py3
2016-12-14 12:16:16 -08:00
Brian Coca
f550b4541f bad/missing fact plugin is a warning (#19350) 2016-12-14 14:25:19 -05:00
Steve Kuznetsov
d5324c11a0 Factored polling std{out,err} reads into a function
The process to poll for data in the stdout and/or stderr pipes during a
low-level command execution was repetitive. Factoring this out into a
function DRYs out the code.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2016-12-14 10:14:31 -08:00
Tim Rupp
362c86d323 Fixes map call usage
For the comparisions that need to be done, this map call needs
to convert to a list because the six import in ansible changes
the behavior of map to return an iterator instead of a list
2016-12-14 10:00:47 -08:00
Ondra Machacek
f84f97d035 cloud: ovirt: Add support to upload/copy/move disks (#19337) 2016-12-14 12:43:25 -05:00
Brian Coca
ed933421fe correct template lookup path
now all paths get 'templates/'
2016-12-14 12:25:08 -05:00
Ondra Machacek
5400a06ac4 cloud: ovirt: Various fixes for oVirt modules (#19141)
*  cloud: ovirt: fix various issues in ovirt modules

* cloud: ovirt: add support for nfs version

* cloud: ovirt: Fix facts documentation

* Add proper documentation fragmet
* Add proper argument_spec
* Fix return values

* cloud: ovirt: fix pep8
2016-12-14 11:42:15 -05:00
Robin Roth
afca957396 Fix UnboundLocalError remote_head in git (#19057)
* Fix UnboundLocalError remote_head in git

Fixes #5505

The use of remote_head was a leftover of #4562.
remote_head is not necessary, since the repo is unchanged anyway and
after is set correctly.

Further changes:
* Set changed=True and msg once local_mods are detected and reset.
* Remove need_fetch that is always True (due to previous if) to improve
clarity
* Don't exit early for local_mods but run submodules update and
switch_version

* Add test for git with local modifications
2016-12-14 08:36:15 -08:00
Ondra Machacek
fa96438f4c cloud: ovirt: Add support to list nested entities parameters (#19300) 2016-12-14 11:15:50 -05:00
Andrea Tartaglia
59227d8c31 Removed dict.iteritems() in several other files.
This is for py3 compatibility #18506
2016-12-14 08:01:45 -08:00
Dag Wieers
7c71c678fa Fix regression in search path behaviour
This PR fixes a few issues:

- Missing role parent directory for relative paths
- Fix integration tests (add missing stage)
- Redesign integration tests
- Incorrect order with tasks-lookups
- Duplicate paths are listed
- Repetitive tasks/tasks or files/files were possible

==== using copy with test.txt
Before:
```
   491 1481281038.29393: search_path:
        /home/dag/home-made/ansible.testing/roles/test134/files/test.txt
        /home/dag/home-made/ansible.testing/roles/test134/tasks/test.txt
        /home/dag/home-made/ansible.testing/roles/test134/tasks/files/test.txt
        /home/dag/home-made/ansible.testing/roles/test134/tasks/tasks/test.txt
        /home/dag/home-made/ansible.testing/files/test.txt
        /home/dag/home-made/ansible.testing/test.txt
```

After:
```
 32505 1481280963.22418: search_path:
        /home/dag/home-made/ansible.testing/roles/test134/files/test.txt
        /home/dag/home-made/ansible.testing/roles/test134/test.txt
        /home/dag/home-made/ansible.testing/roles/test134/tasks/files/test.txt
        /home/dag/home-made/ansible.testing/roles/test134/tasks/test.txt
        /home/dag/home-made/ansible.testing/files/test.txt
        /home/dag/home-made/ansible.testing/test.txt
```

==== Using copy with files/test.txt

Before:
```
 31523 1481280499.63052: search_path:
        /home/dag/home-made/ansible.testing/roles/test134/files/test.txt
        /home/dag/home-made/ansible.testing/roles/test134/tasks/files/test.txt
        /home/dag/home-made/ansible.testing/roles/test134/tasks/files/test.txt
        /home/dag/home-made/ansible.testing/roles/test134/tasks/tasks/files/test.txt
        /home/dag/home-made/ansible.testing/files/files/test.txt
        /home/dag/home-made/ansible.testing/files/test.txt
```

After:
```
 31110 1481280299.38778: search_path:
        /home/dag/home-made/ansible.testing/roles/test134/files/test.txt
        /home/dag/home-made/ansible.testing/roles/test134/tasks/files/test.txt
        /home/dag/home-made/ansible.testing/files/test.txt
```

==== Using template with files/test.txt.j2
Before:
```
 30074 1481280064.15191: search_path:
        /home/dag/home-made/ansible.testing/roles/test134/templates/files/test.txt.j2
        /home/dag/home-made/ansible.testing/roles/test134/tasks/files/test.txt.j2
        /home/dag/home-made/ansible.testing/roles/test134/tasks/templates/files/test.txt.j2
        /home/dag/home-made/ansible.testing/roles/test134/tasks/tasks/files/test.txt.j2
        /home/dag/home-made/ansible.testing/templates/files/test.txt.j2
        /home/dag/home-made/ansible.testing/files/test.txt.j2
```

After:
```
 29201 1481279823.52752: search_path:
        /home/dag/home-made/ansible.testing/roles/test134/templates/files/test.txt.j2
        /home/dag/home-made/ansible.testing/roles/test134/files/test.txt.j2
        /home/dag/home-made/ansible.testing/roles/test134/tasks/templates/files/test.txt.j2
        /home/dag/home-made/ansible.testing/roles/test134/tasks/files/test.txt.j2
        /home/dag/home-made/ansible.testing/templates/files/test.txt.j2
        /home/dag/home-made/ansible.testing/files/test.txt.j2
```

This fixes #19048
2016-12-14 10:33:14 -05:00
René Moser
18b7852940 cloudstack: utils: fail friendlier if no zones available (#19332) 2016-12-14 11:37:26 +01:00
Toshio Kuratomi
c6b42028c4 Fixes for uri under python3 and local (non-httptester) testing 2016-12-13 15:46:07 -08:00
Simon Li
de714e5af8 Use volume as input parameter name to match image. 2016-12-13 23:25:21 +00:00
Simon Li
9bfa2963b6 Add version_added 2.3 as suggested by shippable 2016-12-13 23:25:20 +00:00
Simon Li
178811d174 Return an error if volume_src wasn't found 2016-12-13 23:25:20 +00:00
Simon Li
e861195773 Add volume_src to os_volume
Depending on the OpenStack installation it may be quicker to create a volume from an existing volume (copy-on-write) compared to from a snapshot (allocating a completely new volume).

This adds a new `volume_src` parameter to the `os_module` which accepts a volume id or name.
2016-12-13 23:25:19 +00:00
Ken Evensen
6b62b9f48c Adding pamd module for Ansible (#19029) 2016-12-13 15:34:44 -05:00
Adrian Likins
08a5d506bb Fix errors on 'ansible-playbook --flush-cache' (#18754)
Add a unit test, and split out the flush cache logic to
it's own method.
Fixes #18708
2016-12-13 14:35:15 -05:00
Adrian Likins
6c4f554f5a Provide slightly better msg on fact cache error (#18759)
If the configured fact_cache plugin (fact_caching config)
fails, raise a fatal error instead of failing mysteriously
later.

Fixes #18751
2016-12-13 14:34:58 -05:00
Carlos E. Garcia
0b8011436d minor spelling changes 2016-12-13 13:51:13 -05:00
Michael Scherer
054a3fccf8 Cleanup import for sysctl module 2016-12-13 13:26:54 -05:00
Michael Scherer
f9460f3c80 Use type='path' instead of 'str' for deploy_helper 2016-12-13 13:25:45 -05:00
Michael Scherer
db8719cf8b Add support for NetBSD
While I only checked on NetBSD 7.0, it seems to use the same
rc system as FreeBSD so it should be working for now.
2016-12-13 13:24:34 -05:00
Michael Scherer
6ffd494efb Cleanup imports for user
Some class use shutil, who was not imported, and we want to
avoid '*' for future refactoring.
2016-12-13 11:53:18 -05:00
Lumír 'Frenzy' Balhar
84544ee8fd Fix AST nodes for Python 3 and enable dependent test_uri (#18597)
* Enable tests on python 3 for uri

* Added one more node type to SAFE_NODES into safe_eval module.

ast.USub represents unary operators. This is necessary for
parsing some unusual but still valid JSON files during testing
with Python 3.
2016-12-13 07:37:39 -08:00
Ondra Machacek
95ef9fd9f9 cloud: ovirt: Add ovirt_tags and ovirt_tags_facts modules (#19295) 2016-12-13 09:14:09 -05:00
Toshio Kuratomi
51491c9904 Remove itervalues (not available on py3) 2016-12-13 05:40:48 -08:00
Toshio Kuratomi
a8af6c6baf Fix some SSL errors in mail.py causing SMTP Syntax Errors (Rebase of https://github.com/ansible/ansible-modules-extras/pull/708 ) (#19253)
* Rebase of https://github.com/ansible/ansible-modules-extras/pull/708

708 was full of extraneous merge commits interwoven with commits to
implement the feature. In the end the only way I could clean this up
in reasonable time was to just take a regular diff between the PR and
the base.  This lost the history of intermediate commits but I've
preserved attribution to @dayton967 via git's --author field.

Although I preserved the logic of the PR, there were a few additional
things that I cleaned up:

* Fixed import of email.mime.multipart
* Used the argspec to set port and timeout to integers instead of having
  ad hoc code inside of the module.
* Used argspec's choices for secure instead of ad hoc code inside of the
  module.
* Removed some unused variables
* Made secure_state a python boolean instead of using 0 and 1
* Used secure with string comparisons instead of turning it into an
  integer code.  This is much more readable.
* Fixed catching of SMTPExceptions (SMTPException wasn't imported
  directly so it needed to use the smtplib namespace.)
2016-12-13 04:28:24 -08:00
René Moser
a28d898c29 cloudstack: cs_securitygroup_rule: fix impossible to set icmp_code and icmp_type to 0 (#19258) 2016-12-13 06:58:17 +01:00
Andrea Tartaglia
ef391a11ec Removed dict.iteritems() in modules. (#18859)
This is for py3 compatibility, addressed in #18506
2016-12-12 15:16:23 -08:00
Vlad Glagolev
4b27d08643 dropped 'BOOLEANS' choices, converted env vars to str 2016-12-12 14:25:19 -08:00
Clark Boylan
a65e34ce77 Fix synchronize retries (#18535)
* Fix synchronize retries

The synchronize module munges its task args on every invocation of
run(). This was problematic because the munged data was not fit for use
by a second pass of the synchronize module. Correct this by using a copy
of the task args on every invocation of run() so that the original args
are not affected.

Local testing using this playbook seems to confirm that things work as
expected:

  - hosts: all
  tasks:
    - delay: 2
      register: task_result
      retries: 1
      until: task_result.rc == 0
      synchronize:
        dest: /tmp/out
        mode: pull
        src: /tmp/nonexistent/

fixes #18281

* Update synchroncization fixture assertions

When we started operating on a copy of the task args the test assertions
were no longer asserting things about the munged state but of the
pristine state. Convert the copy of task args to a class member so that
it can be compared against later in testing and update the assertions to
check this munged copy.
* Shuffle objects around for cleaner testing

Attach the temporary args dict to the task rather than the action as
this makes updating the existing tests cleaner.
2016-12-12 13:33:30 -08:00
ikelos
9e5d4de49a Fix overwrite parameter in module_utils.junos (#18671)
The overwrite parameter is forcibly set to false, meaning a module
passing that parameter will have no effect.  The overwrite facility
is necessary to ensure that conflicting options can be written the
configuration (which, in replace mode, they cannot).

This change ensures that if overwrite is set, it will not be changed
to False in the logic.
2016-12-12 15:57:29 -05:00
Patrick Ogenstad
05e5474c52 Disable CLI errors when typing enable (#18531) 2016-12-12 15:55:22 -05:00
Juan Antonio Valiño García
40ddbe026d Fixes #18663. Bad handling of existing config in dellos9 module. (#18664)
* Fixes #18663. Bad handling of existing config in dellos9 module.

The dellos9 module doesn't build correctly the internal
structures used to represent the existing config of the managed
network device. This leads to apply changes every time the
playbook is run, even if the existing config is the same that the
one you are trying to push into the device.

Probably this problem exist also in the dellos6 and dellos10
modules, but I only fixed it in the dellos9 module.

The fix modifies two methods. The first one is `get_config`,
where the return clause didn't work correctly when the flow
doesn't enter in the `if` block. In that case the `contents`
variable is not an array an this should be handled.

The second fix is in the `get_sublevel_config` method. In this
case the indentation whitespaces of the parents should be rebuild
because further functions and methods required it to handle
correctly comparisons used to check if changes should be pushed
into device.

* Fixes #18663 for dellos10 module with the same patches as dellos9.
2016-12-12 15:51:32 -05:00
Matt Clay
43785aa246 Add --all option to ansible-doc. 2016-12-12 12:16:29 -08:00
Nehal J Wani
ead0022255 Open temp file only once
mkstemp() returns a tuple containing an OS-level handle to an open file
(as would be returned by os.open()) and the absolute pathname of that
file, in that order.

This patch makes sure that the fd opened by tempfile.mkstemp() is
re-used and closed properly.
2016-12-12 10:11:46 -08:00
Fabio Alessandro Locati
470d1e3aea Remove unused quotes (#19207) 2016-12-12 14:07:03 +00:00
Fabio Alessandro Locati
4b9a65fd7c Improve quotes - notification/hall.py (#19166) 2016-12-11 22:16:42 +00:00
Fabio Alessandro Locati
64e4c2798c Improve quotes - notification/nexmo.py (#19168) 2016-12-11 22:14:15 +00:00
Fabio Alessandro Locati
5e9b763937 Remove useless quotes - notification/sns.py (#19169) 2016-12-11 22:14:00 +00:00
Fabio Alessandro Locati
3d15f622b0 Always run on localhost - notification/rocketchat.py (#19170) 2016-12-11 22:13:40 +00:00
Fabio Alessandro Locati
cf5424e165 Remove useless quotes - monitoring/statusio_maintenance.py (#19173) 2016-12-11 20:00:11 +00:00
Kevin Burke
114e3cb7a4 Fix typos in git.py (#19186) 2016-12-11 17:17:05 +01:00
Evan Kaufman
aaf13e07fe Handle byte/string conversion on read/write with text module_utils (#19188)
Fixes ansible/ansible-modules-core#5840, moved from ansible/ansible-modules-core#5847
2016-12-11 09:00:01 +01:00
Vlad Glagolev
45b2f4b479 Source Mage GNU/Linux package manager support (#19072)
* added alpha version of the 'sorcery' module

* fully conforming YAML

* use bundled check for executables

* - codex_list(): use commands instead of checksums to get sorcery version and verify codex equality - renamed: - manage_depends() -> match_depends() - tocast -> cast_queue, todispel -> dispel_queue, needs_recast -> depends_ok - SORCERY_LOG -> SORCERY_LOG_DIR, SORCERY_STATE -> SORCERY_STATE_DIR - removed: - SORCERY_VERSION_FILE - CODEX - added commentary to match_depends() and manage_spells() - fixed bug about dropped dependency line for previously existed dependency - fixed bug about not fixing depends for the 'latest' state - simplified several code constructions

* cleaned up some docs

* do not use separate message for Codex update, rely on the 'changed' status instead

* use built-in list conversion (_check_type_list()) for spells

* corrected spell name extraction from list in match_depends()

* avoid non-matching dependencies line duplication in depends file

* added more complex playbook example

* tiny stylistic fix for docs

* replaced ternary construction with a regular statement

* replaced yet another ternary construction with a regular statement

* enable Python 2.4 compatibility by splitting try-finally block

* enable Python 2.4 compatibility by replacing 'with' statement with try-except+try-finally blocks

* unify spells' assign

* replaced one regex with startswith()

* go Ansible 2.1

* added dummy RETURN template

* go Ansible 2.2

* better clarify permissions' requirements

* - updated copyright years - fixed rebuild command bug - re-used run_command_environ_update dict for env var management

* handle Python 3.5

* Revert "handle Python 3.5"

This reverts commit 33a5a0eb64c1193318298e111f063cdd5f93b73a.

* handle Python 3.5 (2nd try)

* go Ansible 2.3

* clarity++
2016-12-10 16:38:15 -05:00
Fabio Alessandro Locati
4bfb83c966 Native YAML - notification/mqtt.py (#19164) 2016-12-10 11:44:59 -08:00
Alexandre Garnier
0f7abad38f Fix python 2.4 compatibility
`start` keyword of `enumerate` is only available since python 2.6
2016-12-10 11:06:11 -08:00
Chris Houseknecht
65491cc839 For docker add --blocking-io only when missing (#19171) 2016-12-10 10:51:03 -05:00
Irina Muchnik
9f58e69d63 Fix secure temp file creation (#19096)
* For realz this time

* Fix tempfile.mkstemp (#2)

* back to square one, removing temp file from the mix

* Adding temp back

* Adding tuple  back

* Adding another tuple back

* Trying to get around weird Jenkins behavior of blowing up when both .hpi and jpi file found

* Incorporating PR feedback

* Delete .hpi file instead of backing it up, some basic clean up

* Moving file deletion to the right location

* Blank lines. They always get me.
2016-12-10 09:33:34 -05:00
Fabio Alessandro Locati
2adde7a6d1 Remove unused quotes - notification/pushbullet.py (#19149) 2016-12-10 09:29:02 -05:00
Fabio Alessandro Locati
c3887138c5 Remove unused quotes (#19150) 2016-12-10 09:28:38 -05:00
Fabio Alessandro Locati
261fad8fee Remove unused quotes - notification/hipchat.py (#19151) 2016-12-10 09:28:15 -05:00
Fabio Alessandro Locati
617e82fe8c Remove unused quotes - notification/twilio.py (#19152) 2016-12-10 09:27:56 -05:00
Fabio Alessandro Locati
e788f13956 Remove unused quotes - files/unarchive.py (#19155) 2016-12-10 09:27:35 -05:00
Fabio Alessandro Locati
90a698c367 Remove unused quotes - notification/rocketchat.py (#19156) 2016-12-10 09:25:25 -05:00
Fabio Alessandro Locati
372352f35d Remove unused quotes - web_infrastructure/deploy_helper.py (#19157) 2016-12-10 09:24:36 -05:00
Fabio Alessandro Locati
e32b0da0b0 Improve examples - monitoring/logicmonitor_facts.py (#19158) 2016-12-10 09:24:13 -05:00
Fabio Alessandro Locati
a8fa008bbe Remove unused quotes - source_control/github_hooks.py (#19159) 2016-12-10 09:23:19 -05:00
Fabio Alessandro Locati
b42cda4dd2 Remove deprecated example (#19161) 2016-12-10 09:21:25 -05:00
Chris Houseknecht
b02491ba70 Add --blocking-io option when docker connection (#19140) 2016-12-10 09:20:35 -05:00
Rene Moser
b1ea79af51 cloudstack: cs_role: doc fixes. 2016-12-10 11:40:30 +01:00
René Moser
a8fc8249b4 cloudstack: new module cs_role (#19134) 2016-12-10 10:33:05 +01:00
Matt Clay
2cb6a10a0e Fix module names in module docs. 2016-12-09 18:13:57 -07:00
Matt Clay
cd47cb2a15 Remove remnants of obsolete fireball mode. 2016-12-09 16:56:34 -07:00
Matt Clay
ac7edef2be Fix modules with documentation errors. 2016-12-09 16:08:26 -07:00
Fabio Alessandro Locati
9a075b5917 Avoid using an object if it does not exists (#19058) 2016-12-09 17:36:39 -05:00
Fabio Alessandro Locati
28a12e8b27 Use dbus only if it is present (#19060) 2016-12-09 17:35:55 -05:00
Fabio Alessandro Locati
3b509b1095 Avoid extending a class if it does not exists (#19059) 2016-12-09 17:31:07 -05:00
Kash
6b1586748f Fixes #4538 passing int params as required by boto (#18999) 2016-12-09 14:39:02 -05:00
Yury V. Zaytsev
395b59ea6c Update ec2_vpc_peer.py (#19069)
Document `peering_id` module parameter.
2016-12-09 11:24:48 -05:00
José Sabater Montes
66ced41485 Add new Amazon EBS volume types. Fixes issue 4041 of ansible-modules-core 2016-12-09 10:27:54 -05:00
Adam Chainz
0b8aada1bc Cloudformation - allow re-using an existing template (#19009)
* Allow re-using an existing template when updating a stack by not passing 'template' or 'template_url'. This is a big one for me as our deploy process creates a new stack and then modifies the old one; to avoid changing the resources inside the old one, we have had to avoid using the Ansible module and use the AWS CLI instead in order to pass `--use-previous-template`.
* Split create and update logic into separate functions
* Remove dead `update` variable
2016-12-09 10:24:10 -05:00
Maarten Bezemer
7b4eb078c6 Leave current secutiry groups as-is if not provided (#19043) 2016-12-09 10:21:16 -05:00
Tom Paine
1d80f5cf0f Update ec2_group.py (#19033)
PR move of https://github.com/ansible/ansible-modules-core/pull/3588

##### ISSUE TYPE
- Docs Pull Request

##### COMPONENT NAME
ec2_group.py

##### ANSIBLE VERSION

```
ansible 2.0.2.0
  config file = /Users/tpai/src/cm-secure/ansible.cfg
  configured module search path = Default w/o overrides
```
##### SUMMARY

Make it clear you can specify the created group in the rules list, allowing idempotent use for group<->group networking rules.

This is a really useful feature that isn't obvious enough in the docs.
2016-12-09 10:11:17 -05:00
Andy Freeland
cb9b5ab146 Include volume encryption status in 'ec2_vol_facts' module (#19017) 2016-12-09 10:01:13 -05:00
Fabio Alessandro Locati
ea46d5548b Native YAML - cloud/softlayer/sl_vm.py (#19056)
* Native YAML - cloud/softlayer/sl_vm.py

* Pointless to delegate/localaction, since we are already running on localhost
2016-12-09 09:11:31 -05:00
Fabio Alessandro Locati
ee27c688fd Unquote strings that do not need quotes and retab - clustering/consul.py (#18834) 2016-12-09 08:49:43 -05:00
Fabio Alessandro Locati
b811350f00 Native YAML - web_infrastructure/jira.py (#18832) 2016-12-09 08:48:59 -05:00
Fabio Alessandro Locati
21940f8c8e Remove unneeded quotes - source_control/bzr.py (#18825) 2016-12-09 08:48:15 -05:00
Fabio Alessandro Locati
19f0b5f1cc Remove unneeded quotes - notification/slack.py (#18826) 2016-12-09 08:46:27 -05:00
Fabio Alessandro Locati
6c06aeb792 Explicitally add the state - system/authorized_key.py (#18837) 2016-12-09 08:40:16 -05:00
Fabio Alessandro Locati
464e1b6a5a Improve the dependency on univention (aka: declare it and fail nicely if it is not present) (#18840) 2016-12-09 08:39:40 -05:00
Fabio Alessandro Locati
60f6bab430 Remove x bit - windows/win_copy.py (#18824) 2016-12-09 08:30:27 -05:00
Fabio Alessandro Locati
013722d974 Inline attays (#19061) 2016-12-09 06:00:34 -05:00
Fabio Alessandro Locati
e5bc2e0570 Put spaces between graphs and var name (#19063) 2016-12-09 05:59:50 -05:00
Andy Freeland
72310ff3e8 Fix wait parameter in ec2 module docs (#19037)
Fixes #18913.
2016-12-09 05:51:43 -05:00
Fabio Alessandro Locati
2b47246e94 Native YAML - source_control/gitlab_user (#19053) 2016-12-09 05:49:00 -05:00
Fabio Alessandro Locati
ba22514d47 Native YAML - source_control/gitlab_group (#19054) 2016-12-09 05:48:33 -05:00
Fabio Alessandro Locati
503f4c48db Inline array in example (#19055) 2016-12-09 05:48:03 -05:00
Fabio Alessandro Locati
3fa1ddc9db Native YAML - source_control/gitlab_project (#19062)
* Native YAML - source_control/gitlab_project

* Use example domain as for RFC2606
2016-12-09 05:44:43 -05:00
René Moser
345e39e1b1 cloudstack: cs_instance: fix userdata not up to date (#18942)
Fixes unnecessary VM restart.

VM userdata is currently not returned by the API listVirtualMachine and task will always be marked as changed in has_changed(), which will result in an unnecessary VM restart if force=true.

Reported by @Mayeu
2016-12-09 07:03:18 +01:00
Matt Clay
1da20c9716 Clean up issue templates. (#19011)
* Remove legacy GitHub templates.
* Remove references to module repos.
2016-12-08 17:18:30 -05:00
Matt Clay
c709b22e5c Fix differences with devel. 2016-12-08 11:35:21 -05:00
James Cammarata
fa5386c488 Some additional module cleanup of mistakes made during merging 2016-12-08 11:35:20 -05:00
James Cammarata
6ba6819446 Re-adding the init py for modules 2016-12-08 11:35:20 -05:00
Matt Davis
cb1888125d add metadata to doc support (#18802)
fix broken module docs
change doc AST id extraction to use == instead of in
2016-12-08 11:35:20 -05:00
Fabio Alessandro Locati
c786f7ca3c Native YAML - monitoring/logicmonitor.py (#18790)
* Native YAML - monitoring/logicmonitor.py

* Fix comments as well

* Fix quotes
2016-12-08 11:35:20 -05:00
Matt Clay
851b264fb0 Add missing znode module description. 2016-12-08 11:35:20 -05:00
Fabio Alessandro Locati
f5da520bbb Consistency in space between parenthesys (#18796) 2016-12-08 11:35:20 -05:00
Fabio Alessandro Locati
f8832bf302 Native YAML - monitoring/boundary_meter (#18791)
* Native YAML - monitoring/boundary_meter

* Fix apikey
2016-12-08 11:35:19 -05:00
Fabio Alessandro Locati
327cff7274 Native YAML - monitoring/pagerduty_alert (#18784) 2016-12-08 11:35:19 -05:00
Toshio Kuratomi
df9059936b Metadata Status needs to be a list, not a scalar.
The default metadata was specified with a string "preview" instead of
the list ["preview"].
2016-12-08 11:35:19 -05:00
James Cammarata
14833f1c7a A few more organizational cleanups from the repo merge 2016-12-08 11:35:19 -05:00
James Cammarata
011ea55a8f Relocating extras into lib/ansible/modules/ after merge 2016-12-08 11:35:18 -05:00
James Cammarata
c65ba07d2c Cleaning up diffs after extras modules merge 2016-12-08 11:35:18 -05:00
Toshio Kuratomi
2cfa25c930 Add metadata for xbps
Pass pyflakes
2016-12-08 11:35:18 -05:00
James Cammarata
d2fc24b771 Removing unnecessary files before repo merge 2016-12-08 11:35:18 -05:00
Toshio Kuratomi
bd12c4bfe7 Refreshed metadata for extras modules 2016-12-08 11:35:18 -05:00
Ryan S. Brown
92588923f4 Style fix for xbps module 2016-12-08 11:35:18 -05:00
Dino Occhialini
3821ea020f Add XBPS module (#1749)
Adds xbps module for managing Void Linux packages.

Currently supports:
* Installation
* Removal
* Updating Specific Packages
* Updating All Packages
* Updating package cache
2016-12-08 11:35:18 -05:00
Slezhuk Evgeniy
867c85af05 Add 'link' action to jira module 2016-12-08 11:35:17 -05:00
Ben Tomasik
62acd6286f Add check mode support (#3523) 2016-12-08 11:35:17 -05:00
0livd
ff4deba55d Fetch vmid from the ProxmoxAPI when not set (#3591)
The vmid is no longer a required parameter
For the 'present' state:
 If not set, the next available one will be fetched from the API
For the 'started', 'stopped', 'restarted' and 'absent' states:
 If not set, the module will try to fetch it from the API based on the hostname
Inspired from the behavior of the proxmox_kvm module
2016-12-08 11:35:17 -05:00
Fabian Krämer
320ae068ed Allow Datadog monitors to be retrieved by id instead of name. (#3456) 2016-12-08 11:35:17 -05:00
David Stygstra
5454c562e9 Fix #3410 (#3411)
A port with the same name as the bridge is implicitly created for every
bridge, but it doesn't show in in `ovs-vsctl list-ports BRIDGE`.
2016-12-08 11:35:17 -05:00
MDCollins
7d8d830aee Update the status codes to look for (#2120)
Creation of a maintenance window returns a 201 (PagerDuty Developer documentation is unfortunately incorrect). Deleting a maintenance window returns a 204.
2016-12-08 11:35:17 -05:00
Colin Walters
5bfbeadca3 yum_repository: use https:// for EPEL examples (#3464)
This whole module is really lacking in security guidelines, but
downloading RPMs via plain `http://` without gpg is quite bad.  Let's
use `https://` for the EPEL examples for a start.
2016-12-08 11:35:17 -05:00
Arthur
9513388819 Update route53_zone.py fix indentation typo in examples (#3255) 2016-12-08 11:35:17 -05:00
Bill Wang
246ce5aa85 improve example for module ec2_vpc_subnet_facts (#3511) 2016-12-08 11:35:17 -05:00
Ondra Machacek
937117d871 Add oVirt ovirt_permissions and ovirt_permissions_facts modules (#3160) 2016-12-08 11:35:17 -05:00
Ondra Machacek
1d7c2eb00d Add oVirt ovirt_external_providers and ovirt_external_providers_facts modules (#3168) 2016-12-08 11:35:17 -05:00
Ondra Machacek
995ac40e8e Add oVirt ovirt_vmpools and ovirt_vmpools_facts modules (#3171) 2016-12-08 11:35:17 -05:00
Ondra Machacek
55274a4eec Add oVirt ovirt_quotas and ovirt_quotas_facts modules (#3172) 2016-12-08 11:35:17 -05:00
Ondra Machacek
f6e257201c Add oVirt ovirt_nics and ovirt_nics_facts modules (#3205) 2016-12-08 11:35:17 -05:00
Ondra Machacek
489272890a Add oVirt ovirt_templates and ovirt_templates_facts modules (#3221) 2016-12-08 11:35:17 -05:00
Ondra Machacek
42737bc7c3 Add oVirt ovirt_storage_domains and ovirt_storage_domains_facts modules (#3222) 2016-12-08 11:35:16 -05:00
Ondra Machacek
190357e51f Add oVirt ovirt_vms_facts module (#3226) 2016-12-08 11:35:16 -05:00
Ondra Machacek
1057c2f89d ovirt_vms: Add new cloud_init_nics parameter (#3557) 2016-12-08 11:35:16 -05:00
Ondra Machacek
370d8332ae Add oVirt ovirt_affinity_labels and ovirt_affinity_labels_facts modules (#3570) 2016-12-08 11:35:16 -05:00
Ondra Machacek
6ade61a3ba Add oVirt users/groups and users_facts/group/facts modules (#3153) 2016-12-08 11:35:16 -05:00
Ondra Machacek
77c3868670 Add ovirt_networks and ovirt_networks_facts modules (#3148) 2016-12-08 11:35:16 -05:00
Ondra Machacek
68e83bba91 Add ovirt_datacenters and ovirt_datacenters_facts modules (#3146) 2016-12-08 11:35:16 -05:00
Ondra Machacek
c12b705df8 Add ovirt_clusters and ovirt_clusters_facts modules (#3138)
* Add ovirt_clusters and ovirt_clusters_facts modules

* Add return values examples

* Improve documentation

* Added all cluster parameters
2016-12-08 11:35:16 -05:00
Krzysztof Magosa
c385c6746a kubernetes: handle situation when target host does not have yaml library (fixes #3301) (#3449) 2016-12-08 11:35:16 -05:00
Ondra Machacek
32c7f1eae7 Add new ovirt_mac_pools module (#3646)
This patch adds new module to manage oVirt MAC pools.
2016-12-08 11:35:16 -05:00
Constantin
4bdbbed49c Fix: convert owner_ids to a list of strings (#3488) 2016-12-08 11:35:16 -05:00
Ben Tomasik
163f16658e Add check mode support (#3522) 2016-12-08 11:35:16 -05:00
Tristan de Cacqueray
8a02b5d702 Use parameters in os_stack update (#3560)
This change makes os_stack module idempotent. Otherwise, re-use of the
module fails with:
Error updating stack: ERROR: The Parameter (...) was not provided.

Fixes #3165.
2016-12-08 11:35:16 -05:00
Fabio Alessandro Locati
7a2d1a4210 Make main() calls conditional - commands (#3655) 2016-12-08 11:35:16 -05:00
Fabio Alessandro Locati
cefb569797 Make main() calls conditional - messaging (#3654) 2016-12-08 11:35:16 -05:00
Fabio Alessandro Locati
6f019c1066 Make main() calls conditional - web_infrastructure (#3653) 2016-12-08 11:35:16 -05:00
Fabio Alessandro Locati
cbe3f4e5e1 Make main() calls conditional - system (#3652) 2016-12-08 11:35:15 -05:00
Fabio Alessandro Locati
45b31fa514 Make main() calls conditional - source_control (#3651) 2016-12-08 11:35:15 -05:00
Fabio Alessandro Locati
007abb5373 Make main() calls conditional - packaging (#3650) 2016-12-08 11:35:15 -05:00
Fabio Alessandro Locati
95be8b8276 Make main() calls conditional - network (#3649) 2016-12-08 11:35:15 -05:00
Fabio Alessandro Locati
9f7ad2ca3b Conditional main - monitoring (#3648) 2016-12-08 11:35:15 -05:00
Fabio Alessandro Locati
e788ce068a Make main() calls conditional - clustering (#3647) 2016-12-08 11:35:15 -05:00
Fabio Alessandro Locati
96780cf035 Make main() calls conditional - notifications (#3656) 2016-12-08 11:35:15 -05:00
Fabio Alessandro Locati
afa6fa9a89 Make main() calls conditional - cloud (#3657) 2016-12-08 11:35:15 -05:00
Fabio Alessandro Locati
11e3ec26ea Make main() calls conditional - files (#3658) 2016-12-08 11:35:15 -05:00
Fabio Alessandro Locati
06bf2e1e63 Make main() calls conditional - database (#3659) 2016-12-08 11:35:15 -05:00
Ondra Machacek
103e3341f5 ovirt_vms: Add support to specify template version (#3567) 2016-12-08 11:35:15 -05:00
René Moser
3c48b4a7a1 cloudstack: cs_ip_address: implement VPC support (#3403) 2016-12-08 11:35:15 -05:00
René Moser
93ebe0f7c1 cloudstack: cs_staticnat: implement VPC support (#3409) 2016-12-08 11:35:15 -05:00
Fabio Alessandro Locati
7d1a006629 Native YAML, improve quotation (#3643) 2016-12-08 11:35:15 -05:00
Fabio Alessandro Locati
8b31d48410 Native YAML - monitoring/sensu_check (#3635) 2016-12-08 11:35:14 -05:00
Fabio Alessandro Locati
3b5826b828 Native YAML - monitoring/datadog_event (#3637) 2016-12-08 11:35:14 -05:00
Fabio Alessandro Locati
616752c2e3 Correct indentation in examples - files/blockinfile.py (#3630)
* indentation in with_items section is out, correct that.
2016-12-08 11:35:14 -05:00
Matthew Krupcale
a6f0a279a9 FreeIPA module polymorphic restructuring and small fixes. (#3485)
* Moved JSON-RPC client IPAClient class to ansible.module_utils.ipa, which is extended by all ipa modules
* ipa_user: incorporate displayname and userpassword attributes in module_user
* ipa_user: capitalized "I" in comment
* ipa_user: updated get_ssh_key_fingerprint to include possibility of the uploaded SSH key including user@hostname comment, which also appears in the queried fingerprint. This fixes a mismatch in the calculated and queried SSH key fingerprint in the user_diff calculation when the user already exists.
* ipa_hbacrule: ipaenabledflag must be 'TRUE' or 'FALSE', not 'NO'
* ipa_sudorule: ipaenabledflag must be 'TRUE' or 'FALSE', not 'NO'
* Add author to files missing it
2016-12-08 11:35:14 -05:00
Fabian von Feilitzsch
92a53a7182 Check values for vm_id and vm_names instead of keys (#3621) 2016-12-08 11:35:14 -05:00
Jon Hawkesworth
50deb312fe Fix documentation error on read message from file example. 2016-12-08 11:35:14 -05:00
Fabio Alessandro Locati
2ea57deb72 Native YAML - cloud/centurylink/clc_loadbalancer.py (#3632) 2016-12-08 11:35:14 -05:00
Fabio Alessandro Locati
cc25f24475 Native YAML - system (#3625)
* Native YAML - system

* Remove comment that is not applicable to the code
2016-12-08 11:35:14 -05:00
Fabio Alessandro Locati
737c6afb54 Native YAML - database/misc/mongodb_user.py (#3631) 2016-12-08 11:35:14 -05:00
Fabio Alessandro Locati
cd54cd973a Native YAML - cloud/amazon/lambda.py (#3628) 2016-12-08 11:35:14 -05:00
Fabio Alessandro Locati
723556fc98 Native YAML - notification leftovers (#3626) 2016-12-08 11:35:14 -05:00
Fabio Alessandro Locati
2f369dff88 Native YAML - cloud/misc (#3615)
* Native YAML - cloud/misc

* Fix mistake
2016-12-08 11:35:14 -05:00
Fabio Alessandro Locati
75f9cb30e1 Add quotes for non-floats decimals (#3609) 2016-12-08 11:35:14 -05:00
Fabio Alessandro Locati
d9231d065e Native YAML - cloud/openstack (#3614) 2016-12-08 11:35:14 -05:00
Fabio Alessandro Locati
fb2ddac407 Native YAML - database/postgresql/postgresql_ext (#3617) 2016-12-08 11:35:14 -05:00
Fabio Alessandro Locati
c284125e66 Native YAML - cloud/serverless (#3618) 2016-12-08 11:35:13 -05:00
Fabio Alessandro Locati
d11a5bd492 Native YAML - windows (#3602)
* Native YAML - windows

* Fix baskslash

* Sorry
2016-12-08 11:35:13 -05:00
Fabio Alessandro Locati
684045a316 Fix spacing (#3616) 2016-12-08 11:35:13 -05:00
Fabio Alessandro Locati
4561c75d1c Normalize YAML - Cloud/VMWare (#3612) 2016-12-08 11:35:13 -05:00
Fabio Alessandro Locati
1a7b9090df Native YAML - cloud/cloudstack (#3613) 2016-12-08 11:35:13 -05:00
Fabio Alessandro Locati
00eb0d27d9 Cloud lxc (#3611)
* Native YAML - cloud/lxc

* debug var uses naked vars
2016-12-08 11:35:13 -05:00
Fabio Alessandro Locati
1e9333f822 Cloud amazon and azure (#3610)
* Native YAML - cloud/amazon

* Native YAML - cloud/azure
2016-12-08 11:35:13 -05:00
Fabio Alessandro Locati
06a8f1d79b Use native YAML - Packaging (#3588)
* Fix kibana

* More native YAML

* More native YAML

* More native YAML

* More native YAML. Now only languages/ is missing

* Use native yaml sintax for packaging/languages as well

* Some more and quote fixes

* Fix wrong grouping
2016-12-08 11:35:13 -05:00
Fabio Alessandro Locati
d344d7863a Native YAML - files (#3608) 2016-12-08 11:35:13 -05:00
Fabio Alessandro Locati
47442b7c22 Native YAML - databases/pgsql (#3606) 2016-12-08 11:35:13 -05:00
Fabio Alessandro Locati
51798cba0e Native YAML - Databases/mysql (#3605) 2016-12-08 11:35:13 -05:00
Fabio Alessandro Locati
13b970d04b Native YAML - Databases/MsSQL (#3604) 2016-12-08 11:35:13 -05:00
Fabio Alessandro Locati
7ac053576e Native YAML - Database/musc (#3603) 2016-12-08 11:35:13 -05:00
Fabio Alessandro Locati
fb50f129ea Native YAML - remote_management (#3601) 2016-12-08 11:35:13 -05:00
Fabio Alessandro Locati
8a6df38cc5 Native YAML - messaging (#3599) 2016-12-08 11:35:12 -05:00
Fabio Alessandro Locati
5209969a7c Native YAML - Web infrastructure (#3594)
* Native YAML

* YAML for jira as well

* Native YAML for Jboss

* Fix missing spaces
2016-12-08 11:35:12 -05:00
Dag Wieers
367a0c5d99 Bugfix for newer policycoreutils-python (eg. RHEL7) (#3569)
The policycoreutils python API for RHEL6 and RHEL7 are sufficiently
different, requiring some additional definitions and specific conversion
that works on old and new implementations.

It also implements a fix for non-ascii error messages (like when using a
French locale configuration).

This fixes #3551.
2016-12-08 11:35:12 -05:00
Shinichi TAMURA
335a28443d timezone: Fix TypeError
closes #3337
2016-12-08 11:35:12 -05:00
Fabio Alessandro Locati
75563d5325 Native YAML - notifications (#3598) 2016-12-08 11:35:12 -05:00
Fabio Alessandro Locati
951b87492a Native YAML (#3596) 2016-12-08 11:35:12 -05:00
Fabio Alessandro Locati
f4a4492992 bigpanda: Use delegate_to (over local_action) (#3586)
* Fix YAML, naed variables

* Fix spaces
2016-12-08 11:35:12 -05:00
Fabio Alessandro Locati
f8f0893922 Native YAML (#3583) 2016-12-08 11:35:12 -05:00
Fabio Alessandro Locati
cb1b8edfa9 Native YAML - Network (#3587)
* Fix citrix native yaml

* Fix snmp native yaml and connectio

* Fix more native syntax

* More native syntax

* Fix openvswitch native syntax

* More YAML code !

* More fixes

* Improve nmcli
2016-12-08 11:35:12 -05:00
Fabio Alessandro Locati
d092d53198 Native YAML (#3584) 2016-12-08 11:35:12 -05:00
Fabio Alessandro Locati
b6cf2e422d Native YAML + add comments (#3582) 2016-12-08 11:35:12 -05:00
Fabio Alessandro Locati
c40bb574c6 Native YAML (#3581) 2016-12-08 11:35:12 -05:00
Fabio Alessandro Locati
f85fd14242 Native YAML (#3580) 2016-12-08 11:35:12 -05:00
Fabio Alessandro Locati
c2474b8a3f Native YAML (#3579) 2016-12-08 11:35:12 -05:00
Fabio Alessandro Locati
23cfa31a7b Native YAML (#3578) 2016-12-08 11:35:12 -05:00
John R Barker
1684792efa nagios - Better comment: example (#3595) 2016-12-08 11:35:12 -05:00
Fabio Alessandro Locati
45c55607f1 Native YAML (#3577) 2016-12-08 11:35:11 -05:00
Fabio Alessandro Locati
79e1e01e4c Native YAML (#3576) 2016-12-08 11:35:11 -05:00
Fabio Alessandro Locati
9a399d9945 Native YAML (#3575) 2016-12-08 11:35:11 -05:00
Fabio Alessandro Locati
ccb9cb38d9 Native YAML (#3574) 2016-12-08 11:35:11 -05:00
Fabio Alessandro Locati
53448af053 Native YAML (#3573) 2016-12-08 11:35:11 -05:00
Fabio Alessandro Locati
dfb6861a94 Native YAML (#3593) 2016-12-08 11:35:11 -05:00
Fabio Alessandro Locati
34a504ea10 Native YAML (#3585)
* Native YAML

* Fix YAML lists
2016-12-08 11:35:11 -05:00
dimid
0c320e1c17 Fix name/package parameter convert when passed list of values using with_items. (#3556) 2016-12-08 11:35:11 -05:00
René Moser
c3c2427cbb cloudstack: new module cs_region (#3568) 2016-12-08 11:35:11 -05:00
Fabio Alessandro Locati
aef588f3a3 Use native YAML (#3440)
* Use native YAML

* Add comment on quotes and column
2016-12-08 11:35:11 -05:00
Dorian Dietzel
1f32d68310 Added new option to select the active a10 partition (#2628)
* Added new option to select the active a10 partition

* added version_added to the description of the new option

* added RETURN documentation

* fixed indents

* Removed empty cases, removed unneeded aliases

* removed artifacts from merging

* updated version_added to 2.3

* removed host, username and password option

* removed write_config and validate_certs documentation
2016-12-08 11:35:11 -05:00
Aaron Chen
fa4b353da8 elasticsearch-plugin: fix local variable 'name' referenced before assignment (#3431) 2016-12-08 11:35:11 -05:00
Toshio Kuratomi
82475637ef Remove iteritems from portage module for python3 2016-12-08 11:35:11 -05:00
William L. Thomson Jr
e95641f371 Portage module improvements (#3520)
* packaging/os/portage.py: Added portage parameter --keep-going

* packaging/os/portage.py: Added portage parameter --load-avg [FLOAT]

* packaging/os/portage.py: Added portage parameter --jobs[=INT]

* packaging/os/portage.py: Added myself to Authors
2016-12-08 11:35:11 -05:00
Matt Clay
380ce0c3a7 Fix ast parse issue for python 2.6. 2016-12-08 11:35:11 -05:00
Jesse Keating
f6e47e4055 Handle empty datadog_monitor message (#3468)
Since message is not required, it may be of type None, which cannot have
a replace() called on it.
2016-12-08 11:35:10 -05:00
John R Barker
7e6fe97f57 Update version_added, update docs (#3542)
k: v in docs now

Minor tweaks after https://github.com/ansible/ansible-modules-extras/pull/1883
2016-12-08 11:35:10 -05:00
Dorn-
fb610b7d07 Add a new module to handle schema with postgres (#1883) 2016-12-08 11:35:10 -05:00
Eric Chou
c570d533b9 add a10_server_axapi3 module (#3239)
* add a10_server_axapi3 module

* added return documentation

* modified a10_server_axapi3.py per feedback

* fixed line 60 s/action/operation/

* modified a10_server_axapi3.py per feedback

* modified a10_server_axapi3.py per feedback

* corrected YAML format error in documentation

* removed slp_server_ip and slp_server check in code since the arguments are labeled as required, per feedback

* 	modified:   a10_server.py
	modified:   a10_service_group.py
	modified:   a10_virtual_server.py

Changed main() block, restricted import to only functions used.

* removed space for main() to be last line

* removed invalid lines

* Modified Documentations for a10_server.py, a10_service_group.py, a10_virtual_server.py

* Take out alias:[] and choices:[] in Documentation from a10_service_group.py and a10_virtual_server.py since they are now the default

* deleted a10_server.py, a10_service_group.py, a10_virtual_server.py

* deleted 'version_last_modified' line in Documentation across a10_server.py, a10_service_group.py and a10_virtual_server.py as they were added in error, change validate_certs version_added in a10_server.py

* added newline after main()

* added newline after main() for a10_server_axapi3.py
2016-12-08 11:35:10 -05:00
Alexey Kostyuk
d1304eb749 Add ipinfoio_facts module (#3497)
* Add ipinfoio_facts module

* Updated ipinfoio_facts module docs
2016-12-08 11:35:10 -05:00
Andrea Tartaglia
a6c0227a8f py3 - ported ec2_vpc_route_table iterkeys to dict.keys() (#3503)
* ported ec2_vpc_route_table iterkeys to dict.keys() for py3

Addresses ansible/ansible#18507

* Removed '.keys()'
2016-12-08 11:35:10 -05:00
René Moser
5374c7cd09 cloudstack: cs_instance: implement vpc support (#3402)
* cloudstack: cs_instance: implement vpc support

* cloudstack: cs_instance: distinguish VPC and non VPC VMs
2016-12-08 11:35:10 -05:00
René Moser
46e1380532 cs_snapshot_policy: extend volume determination (#3500) 2016-12-08 11:35:10 -05:00
Saravanan K R
b8a93bcfe1 Update the code fragment contents to have correct format (#3342) 2016-12-08 11:35:10 -05:00
René Moser
3b60cb3847 cloudstack: cs_snapshot_policy: ignore intervaltype in has_changed (#3499)
Fixes ValueError: invalid literal for int() with base 10: 'daily'
2016-12-08 11:35:10 -05:00
Ryan Brown
5940c705a3 Create serverless module for handling Serverless Framework deploys (#3352)
* Create `serverless` module for handling deploys on the Serverless Framework

* fix interpreter line

* Successfully exit when a stage is already absent
2016-12-08 11:35:10 -05:00
Jiri Tyr
c7ae273f13 Making yum_repository module compatible with Python 3 (#3487) 2016-12-08 11:35:10 -05:00
Ondra Machacek
36f1ecc5be Add oVirt ovirt_hosts and ovirt_storage_hosts_facts modules (#3225) 2016-12-08 11:35:10 -05:00
Ondra Machacek
b4716df3ef Add oVirt ovirt_host_networks modules (#3227) 2016-12-08 11:35:10 -05:00
Ondra Machacek
7da62366ed Add oVirt ovirt_host_pm module (#3253) 2016-12-08 11:35:10 -05:00
Berislav Lopac
7f351a46e5 replace iteritems with items to ensure python3 compatibility 2016-12-08 11:35:10 -05:00
Andy Dirnberger
3a26a1bfcc Make Homebrew-related modules run on Python 3
Both the `homebrew` and `homebrew_cask` modules iterate over
dictionaries using `iteritems`. This is a Python 2-specific method whose
behavior is similar to `items` in Python 3+. The `iteritems` function in
the six library was designed to make it possible to use the correct
method.
2016-12-08 11:35:09 -05:00
Michael Scherer
64c994c641 Make the 'make' module run on python 3
Traceback:

    Traceback (most recent call last):
      File \"/tmp/ansible_d28_6uwl/ansible_module_make.py\", line 153, in <module>
        main()
      File \"/tmp/ansible_d28_6uwl/ansible_module_make.py\", line 119, in main
        rc, out, err = run_command(base_command + ['--question'], module, check_rc=False)
      File \"/tmp/ansible_d28_6uwl/ansible_module_make.py\", line 79, in run_command
        return rc, sanitize_output(out), sanitize_output(err)
      File \"/tmp/ansible_d28_6uwl/ansible_module_make.py\", line 95, in sanitize_output
        return output.rstrip(b(\"\\r\\n\"))
    TypeError: rstrip arg must be None or str

There is also a six.iteritems issue, fixed using six.
2016-12-08 11:35:09 -05:00
Rene Moser
583944207d redshift: fix version added 2016-12-08 11:35:09 -05:00
Koki Nomura
8ccf166a56 blockinfile: Fixes #1926 by comparing a marker to a whole line instead of a line prefix (#3339) 2016-12-08 11:35:09 -05:00
Marius Gedminas
cffd5601b6 letsencrypt: Locale-independent date parsing (#3314)
Should fix #3155.
2016-12-08 11:35:09 -05:00
Jiri Tyr
9453f6b97a yum_repository: Add diff support (#3460) 2016-12-08 11:35:09 -05:00
Jens Carl
90e0dc2a89 redshift: Fix error with boolean parameters (#3467) 2016-12-08 11:35:09 -05:00
Matthew Krupcale
cb765ce590 gluster_volume: Fixes gluster peer probe / volume creation issue. (#3486)
* gluster_volume: Fixes issue when creating a new volume failing due to peers not being present. The peers which are not 'localhost' should invoke wait_for_peer, but the find method returns -1 (not 0) on non-localhost peers.
2016-12-08 11:35:09 -05:00
Dag Wieers
c8a700834c Performance improvement using in-operator for hash lookups
Just a small cleanup for the existing occurrences.

Using the in-operator for hash lookups is faster than using .has_key()
http://stackoverflow.com/questions/1323410/has-key-or-in
2016-12-08 11:35:09 -05:00
Dag Wieers
a417a4f4b3 Performance improvement using in-operator on dicts
Just a small cleanup for the existing occurrences.

Using the in-operator for hash lookups is faster than using .keys()
http://stackoverflow.com/questions/29314269/why-do-key-in-dict-and-key-in-dict-keys-have-the-same-output
2016-12-08 11:35:09 -05:00
Nijin Ashok
b06003e5d2 Fix issue in adding RAW disk in block storage domain (#3432)
By default, sparse option is true in ovirt. So the raw disk
    creation in a block storage domain will fail with error "Disk
    configuration (RAW Sparse) is incompatible with the storage domain
    type".

    The commit adds sparse option where it is send as False when
    format is raw and True when format is qcow2
2016-12-08 11:35:09 -05:00
Maarten Bezemer
dd51ec94e7 mongodb_user: Allow pymongo version 3.2 in combination with mongodb 3.2 (#3474) 2016-12-08 11:35:09 -05:00
René Moser
ae9bc0cded cloudtack: cs_instance: doc fix for missing tag alias (#3484) 2016-12-08 11:35:09 -05:00
René Moser
a0c8b598ff cloudstack: fix state=absent, ip_address not None but falsy (#3483) 2016-12-08 11:35:09 -05:00
Abdoul Bah
318a06f6d6 New module proxmox_kvm (#3292)
* New module proxmox_kvm

* fixed qxl value vor vga param

> | Name | Type | Format | Description |
> |------|------|--------|-------------|
> | vga | enum | std \| cirrus \| vmware \| qxl \| serial0 \| serial1 \| serial2 \| serial3 \| qxl2 \| qxl3 \| qxl4 | Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal. |

* Fix create_vm() fail on PV 4.3

* Set default for force as null in doc

* proxmox_kvm: revision fixes

* proxmox_kvm: more revision fixes

* Fix indentation

* revision fixes

* Ensure PEP-3110: Catching Exceptions

* KeyError, to KeyError as -- PEP-3110: Catching Exceptions

* Fix Yaml document syntax; Notes: => Notes -

* Refix documentation issue

* Fix Documentation

* Remove Notes: in description

* Add current state and it return value

* Update documentation

* fixed local variable 'results' referenced before assignment

* Fix fixed local variable 'results' referenced before assignment

* minor fixes in error messages

* merge upstream/devel int devel

* minor fixes in error messages

* Fix indentation and documentation

* Update validate_certs description
2016-12-08 11:35:09 -05:00
Brian Haggard
84e79770b3 Required and default are mutually exclusive (#3475) 2016-12-08 11:35:09 -05:00
René Moser
72eb8c7be9 ipify_facts: implement timeout (#3369) 2016-12-08 11:35:08 -05:00
jctanner
d2bb9c1298 vmware_guest: Fix the esxi_hostname docstring to match the arg dict's required= (#3479)
Fixes #3476
2016-12-08 11:35:08 -05:00
Davis Phillips
c2dcf62aee removed tabs and fixed formatting 2016-12-08 11:35:08 -05:00
Davis Phillips
24e8428a7b mend 2016-12-08 11:35:08 -05:00
Davis Phillips
e51f6c18eb added vDS support for config spec and note/annotation support 2016-12-08 11:35:08 -05:00
Toshio Kuratomi
4d3fec908b Remove need for translate/maketrans due to py3 differences
* translate() has a different api for text vs byte strings
* maketrans must be imported from a different location on py2 vs py3

Since this is such a small string outside of a loop we don't have to
worry too much about speed so it's better to have a single piece of code
that works on both py2 and py3
2016-12-08 11:35:08 -05:00
Abdul-Anshad-A
c2f4e7c852 Initial effort for pyVmomi snapshot ops
Make description optional during snapshot create
2016-12-08 11:35:08 -05:00
Davis Phillips
ce7c7b6804 Removed list value from description in dns_servers 2016-12-08 11:35:08 -05:00
Davis Phillips
bb017c4af8 updated version_added to 2.3 2016-12-08 11:35:08 -05:00
Davis Phillips
ae9aa2390f Added version_added to all the new params 2016-12-08 11:35:08 -05:00
Davis Phillips
ebdd9cf1a5 remove commented code and fixed formatting 2016-12-08 11:35:08 -05:00
Davis Phillips
995cc2cd2d closes 3305 adds customize support 2016-12-08 11:35:08 -05:00
Rene Moser
e1d79f341e cloudstack: new module cs_vpc 2016-12-08 11:35:08 -05:00
René Moser
8873263894 cloudstack: add new module cs_nic (#3392) 2016-12-08 11:35:08 -05:00
Fabio Alessandro Locati
9a1b5b5e18 Use native YAML (#3435) 2016-12-08 11:35:08 -05:00
Tristan Bessoussa
f68a45ca9a Fixed wrong variable name in the let's encrypt doc (#3398)
It could lead to unwanted error when dummy-paste to try this module.
2016-12-08 11:35:07 -05:00
James Hart
276c3410a5 consul: Pass through service_id if specified on a check (#3295)
Fixes #3249
The python-consul library already supports this, so it is just a simple
case of enablement.
This does not break the current logic in `add` of parsing as a check,
then parsing as a service if that fails… because service_name is
mandatory on a service registration and is invalid on a check
registration.
2016-12-08 11:35:07 -05:00
Fabio Alessandro Locati
39f4e17838 Improve yaml code and add an if to make the import more standard (#3424) 2016-12-08 11:35:07 -05:00
Fabio Alessandro Locati
7af000bdb1 Use native YAML (#3436) 2016-12-08 11:35:07 -05:00
Fabio Alessandro Locati
1e00adefd5 Use native YAML in the examples (#3441) 2016-12-08 11:35:07 -05:00
Matthieu Dolci
8822021132 ec2_customer_gateway: state present expect bgp_arn instead of bgp_asn (#3366) 2016-12-08 11:35:07 -05:00
Fabio Alessandro Locati
69fa44b6d1 Use native YAML (#3437) 2016-12-08 11:35:07 -05:00
Fabio Alessandro Locati
616c86529f Use native YAML (#3438) 2016-12-08 11:35:07 -05:00
Fabio Alessandro Locati
be834293ed Use native YAML (#3439) 2016-12-08 11:35:07 -05:00
Fabio Alessandro Locati
0a338a11c2 Normalize yaml example (#3426) 2016-12-08 11:35:07 -05:00
Fabio Alessandro Locati
df6200accc Normalize yaml example (#3425) 2016-12-08 11:35:07 -05:00
Fabio Alessandro Locati
07d96b62b5 Use native YAML (#3434) 2016-12-08 11:35:07 -05:00
Fabio Alessandro Locati
47297bb19c Use native YAML (#3433) 2016-12-08 11:35:07 -05:00
mattwwarren
727e533bfc ec2_elb_facts: fix errors with no names input (#3381)
* None being passed around results in a Bad Time (tm)

* need to return the full set of elbs for an empty list

* logic is hard
2016-12-08 11:35:07 -05:00
Jose Armesto
14fee8d5f7 ec2_lc_find: Set default value for AssociatePublicIpAddress, since is missing when is false (#3417) 2016-12-08 11:35:07 -05:00
Thomas Krahn
9814136d3e Ipa bugfixes (#3421)
* ipa_group: Fix: 'list' object has no attribute 'get'

* ipa_hbacrule: Fix: 'list' object has no attribute 'get'

* ipa_host: Fix: 'list' object has no attribute 'get'

* ipa_hostgroup: Fix: 'list' object has no attribute 'get'

* ipa_role: Fix: 'list' object has no attribute 'get'

* ipa_sudocmd: Fix: 'list' object has no attribute 'get'

* ipa_sudocmdgroup: Fix: 'list' object has no attribute 'get'

* ipa_sudorule: Fix: 'list' object has no attribute 'get'

* ipa_user: Fix: 'list' object has no attribute 'get'

* ipa_sudorule: Fix: invalid 'cn': Only one value is allowed

* ipa_hostgroup: module returns changed if assigned hosts or hostgroups are not in lowercase
2016-12-08 11:35:06 -05:00
Jason Ritchie
0f6aa07d88 Detect and correct PowerShell mishandling nssm Unicode output as UTF8 (#2867)
* extra detail on which step triggered 'change', detect and handle powershell mishandling nssm's unicode as utf8

* Simpler handling of nssm output encoding

Thanks @nitzmahone for a cleaner way to control PowerShell's behavior
2016-12-08 11:35:06 -05:00
Henrique Rodrigues
54c5ebf697 New ec2_group_facts module to be able to get facts from EC2 security groups (#2591)
Add `ec2_group_facts` module to gather facts from EC2 security groups
2016-12-08 11:35:06 -05:00
Andrew Gaffney
a8d80f7165 Fix bare variable references in docs 2016-12-08 11:35:06 -05:00
Krzysztof Magosa
c6b08ca623 tempfile: simple module creating temporary files/directories in OS-independent manner (#2991) 2016-12-08 11:35:06 -05:00
René Moser
de3aea7c36 cloudstack: cs_ip_address: fix returns on state=present (#3406)
In case poll_job=false the return must be None
2016-12-08 11:35:06 -05:00
René Moser
0324d7a681 new module nginx_status_facts (#3286)
* new module nginx_status_facts

* nginx_status_facts: remove requirement

* nginx_status_facts: implement timeout param

* nginx_status_facts: update example docs
2016-12-08 11:35:06 -05:00
jctanner
46174588ca Refactor usage of type() (#3412)
Addresses https://github.com/ansible/ansible/issues/18440
2016-12-08 11:35:06 -05:00
Jeremy Olexa
e44362b6f8 consul_kv, consul_acl: fix missing types bool (#3327)
* Specify bool in consul_kv: validate_certs param
* Specify bool in consul_acl: validate_certs param
* Specify bool in consul_kv: retrieve param
2016-12-08 11:35:06 -05:00
Christophe Biocca
55130b960b haproxy: Fix compatibility when map is actually imap. (#3350)
While I still have no idea why or how the `map` call is being swapped out while still running in python 2.7, this change will fix the following error, as well as improve py3 compatibility.
2016-12-08 11:35:06 -05:00
jctanner
b3795322e9 More isinstance fixes (#3405)
* More isinstance fixes
* Use double types
2016-12-08 11:35:06 -05:00
Thomas Krahn
32fef233f2 Add FreeIPA modules (#3247)
* Add FreeIPA modules

* Update version_added from 2.2 to 2.3

* ipa_*: Use Python 2.4 syntax to concatenate strings

* ipa_*: Replace 'except Exception as e' with 'e = get_exception()'

* ipa_*: import simplejson if json can't be imported

* ipa_hbacrule: Fix: 'SyntaxError' on Python 2.4

* ipa_sudorule: Fix: 'SyntaxError' on Python 2.4

* ipa_*: Fix 'SyntaxError' on Python 2.4

* ipa_*: Import get_exception from ansible.module_utils.pycompat24

* Add FreeIPA modules

* Update version_added from 2.2 to 2.3

* ipa_*: Fix 'SyntaxError' on Python 2.4

* ipa_*: Replace Python requests by ansible.module_utils.url

* ipa_*: Replace Python requests by ansible.module_utils.url

* ipa_*: Add option validate_certs

* ipa_*: Remove requests from Ansible module documentation requirements

* ipa_sudorule: Remove unnecessary empty line

* ipa_sudorule: Remove markdown code from example

* ipa_group: Add choices of state option

* ipa_host: Rename options nshostlocation to ns_host_location, nshardwareplatform to ns_hardware_platform, nsosversion to ns_os_version, macaddress to mac_address and usercertificate to user_certificate and add aliases to be backward compatible
2016-12-08 11:35:06 -05:00
Kei Nohguchi
cc95bc4935 openvswitch_bridge: Check VLAN ID only under fake bridge (#3374) 2016-12-08 11:35:06 -05:00
jctanner
6cfb44b4bb replace type() with isinstance() (#3404)
Replace use of type() with isinstance()

Addresses https://github.com/ansible/ansible/issues/18310
2016-12-08 11:35:06 -05:00
Michael Scherer
81286b8912 Fix chdir argument to be 'path' 2016-12-08 11:35:06 -05:00
René Moser
e1c0d2dd09 cloudstack: cs_network: cleanup dublicate VPC code (#3393)
Code has been moved to module utils, also see fe05c5e35a
2016-12-08 11:35:06 -05:00
Rene Moser
e93bdb80d3 cloudstack: fix VPC doc 2016-12-08 11:35:05 -05:00
Jens Carl
a79386f2f5 Add support for current Redshift node types (#3328) 2016-12-08 11:35:05 -05:00
Steve Gargan
687aaa197b consul_kv: remove default token (#3373)
changes default token from "anonymous" to None. Fixes #792
2016-12-08 11:35:05 -05:00
Steve Gargan
314f1ea15a allow services to be removed by name as well as id (#3372) 2016-12-08 11:35:05 -05:00
Eric
081719cc67 Return actual queue attributes with result from sqs_queue creation/update (#1362)
* Return actual queue attributes with result

Previously this was only returning the desired queue attributes, and not even returning the QueueARN for use elsewhere.  Now it will return "results.attributes" that is retrieved with boto's get_queue_attributes().

* update return structure to reflect current SQS config; add documentation of return values

* Remove redundancy from if/else statement
2016-12-08 11:35:05 -05:00
Ryan Morlok
7095959a55 Enhanced ecs_taskdefinition module.
Added support to explicitly manage task definitions be revision. If the
revision expectations of the ansible task cannot be met, an error is
thrown.

If revision is not explicitly specified, enhanced module to be
idempotent with respect to task definitions. It will search for an
active revision of the task definition that matches the containers and
volumes specified. If none can be found, a new revision will be created.
2016-12-08 11:35:05 -05:00
Nijin Ashok
b55c973444 Fix issue in activating the VM disk while attaching disk
Currently <active> tag is passed within the disk element which is
incorrect. As a result, disk will remain inactive even though the
default option is true.
2016-12-08 11:35:05 -05:00
Travis Truman
80f622a075 Add support for filtering flavors on ephemeral storage 2016-12-08 11:35:05 -05:00
Brian Coca
7de77be7b2 corrected version added 2016-12-08 11:35:05 -05:00
Fabian Krämer
2e2f24447a Add require_full_window option for Datadog monitors (#2653) 2016-12-08 11:35:05 -05:00
Loïc
405c6820b0 Add parameter hash_host (#3204)
* Add parameter hash_host

* Fix version_added

* Remove spurious whitespace
2016-12-08 11:35:05 -05:00
Brian Coca
bd29252ee7 corrected versionadded 2016-12-08 11:35:05 -05:00
Jason Cormie
78e8709085 Allow setting the visible name of a host in zabbix (#2919)
In Zabbix, the visible name defaults to the hostname.  This is not very
useful if you try to manage vmware VMs as the so called host_name within
zabbix must be set to the vcenter UUID.

This patch allows you to provide an alias which will be shown with
zabbix.  If its not supplied it will default to host_name.
2016-12-08 11:35:05 -05:00
Brian Coca
e33303acd5 added version avialable to docs 2016-12-08 11:35:05 -05:00
Trond Hindenes
cc42d7f38c Added support for IIS AppPool identities (#2675) 2016-12-08 11:35:05 -05:00
Iago Garrido
6036bb69d9 Fixes win_uri module ignoring body argument (#2504)
* Fixes win_uri module ignoring body argument

* Added body field of the response to the documentation
2016-12-08 11:35:04 -05:00
Adam Miller
bedf56a7fd provide useful error when invalid service name provided add offline mode to firewalld permanent operations
Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
2016-12-08 11:35:04 -05:00
Tom Paine
9fa6d9eda8 Update letsencrypt.py
Extend `remaining_days` description.
2016-12-08 11:35:04 -05:00
Michael Ansel
52e14bd172 jira: Specify the correct argument type (#3368)
By default, all arguments are considered strings, but the module code expects the `fields` parameter to be a proper Python dictionary.

Fixes #2600
2016-12-08 11:35:04 -05:00
Toshio Kuratomi
138f2cd847 Fix for dnf groupinstall
Previous fix to group install introduced a different bug trying to
strip() group names at the wrong level.  This patch fixes that.

Fixes #3358
2016-12-08 11:35:04 -05:00
Matt Clay
3ec6722a21 Simplify compileall checks. Remove py3 skip list.
Also applied updates to sanity.sh from ansible-modules-core.
2016-12-08 11:35:04 -05:00
Toshio Kuratomi
b82ceae75f Fix python3 syntax for octal numbers 2016-12-08 11:35:04 -05:00
Toshio Kuratomi
58ec3df13d Revert "add support for proxysql (#2917)"
This reverts commit 9d51f82395.

proxysql is breaking docs build.  Reverting until those are fixed
2016-12-08 11:35:04 -05:00
Toshio Kuratomi
5cd11f5e39 Revert "several fixes to doc to avoid breaking doc build"
This reverts commit 6e4a182684.

reverting proxysql modules for owner to fix docs build so reverting this
fix as well.
2016-12-08 11:35:04 -05:00
Brian Coca
15a0cffee0 several fixes to doc to avoid breaking doc build 2016-12-08 11:35:04 -05:00
cameronurnes
ec8bd8ee77 Fix elf and elf_facts documentation formatting (#3348)
* This method breaks the output on the documentation site

* Conflicting quotes

* Conflicting quotes
2016-12-08 11:35:04 -05:00
Toshio Kuratomi
c41c3abb85 Archive is being added in 2.3 rather than 2.2 2016-12-08 11:35:04 -05:00
bmildren
e284af01b1 add support for proxysql (#2917)
* Adding support for proxysql

* Moved and restricted imports, updated exception handling

* Updated version_added, and mysqldb_found constant name

* Removed unnecessary parentheses
2016-12-08 11:35:04 -05:00
Toshio Kuratomi
82d2a4810e Fix installation of environment groups
In dnf, environment groups are separate from groups.  Need to handle
them separately when calling the API.

Fixes #2178

After upstream review, hande dnf-2.0 mandatory packages in groups

If mandatory packages in a group are not installed, a group will report
failure.  Fix this by catching the error and reporting after trying
to install the other packages and groups in the transaction.
2016-12-08 11:35:04 -05:00
Matt Clay
4ada3463ca Removed tests migrated to ansible/ansible repo. (#3330) 2016-12-08 11:35:04 -05:00
Matt Clay
db0ac4936b Skip shard count test in check mode. (#3329)
The shard count is not available in check mode.
2016-12-08 11:35:03 -05:00
Igor Gnatenko
16896194a8 dnf: fix compatibility with DNF 2.0 (#3325)
* dnf: fix compatibility with DNF 2.0

* Reimplement (copy) old dnf.cli.commands.parse_spec_group_file(),
  upstream uses argparse since 2.0.
* add_remote_rpm() has been changed to the add_remote_rpms()

Closes: https://github.com/ansible/ansible-modules-extras/issues/3310
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>

* fixup! dnf: fix compatibility with DNF 2.0
2016-12-08 11:35:03 -05:00
Scott Butler
5cb9bbbd18 Typo fix requested by marketing. 2016-12-08 11:35:03 -05:00
Andrew Gaffney
c238d3070a Minor fixes for openwrt_init for busybox ps and worthless exit codes 2016-12-08 11:35:03 -05:00
Yevgeniy Valeyev
e064fd3256 cloudtrail: Fix error on existing trail without S3 prefix (#2939) 2016-12-08 11:35:03 -05:00
Mike Rostermund
d50e2c654f lxd_container: doc: Correct name and state for example of deleting (#3299) 2016-12-08 11:35:03 -05:00
Thierno IB. BARRY
b09291be2c elasticsearch_plugin: add check mode support (#3043) 2016-12-08 11:35:03 -05:00
Andrew Gaffney
b69fb8a1ca Add openwrt_init module for managing services on OpenWrt (#3312) 2016-12-08 11:35:03 -05:00
Toshio Kuratomi
09c56140cd * Fix for spaces in the package spec. * Fix for python-2.6 compat 2016-12-08 11:35:03 -05:00
Toshio Kuratomi
d558c55cee install dnf python bindings if possible
Fixes #14427
2016-12-08 11:35:03 -05:00
Yanis Guenane
f9a36962bd network: Add new module openssl_privatekey
This module aims to allow a user to manage the lifecycle of OpenSSL
private keys. Internally it relies on the pyOpenSSL python library
to interact with openssl.

A user is able to specify :

  * key size (via `size` parameter)
  * key algorithm (via `type` parameter)
  * key location (via `path` parameter)

The most simple use case is:

```
- name: Generate ansible.com.pem SSL private key
  openssl_privatekey: name=ansible.com.pem
                      path=/etc/ssl/private
```

A user can speficy more settings:

```
- name: Generate ansible.com.pem SSL private key
  openssl_privatekey: name=ansible.com.pem
                      path=/etc/ssl/private
                      size=2048
                      type=DSA
```

A user can also force the regeneration of an SSL key:

```
- name: Generate ansible.com.pem SSL private key
  openssl_privatekey: name=ansible.com.pem
                      path=/etc/ssl/private
                      force=true
```
2016-12-08 11:35:03 -05:00
Hans-Joachim Kliemeck
1b4eea79d8 win_nssm: set application directory on change of application binary (#3267) 2016-12-08 11:35:03 -05:00
Scott Butler
8745feb567 Clarifies description of path parameter. 2016-12-08 11:35:03 -05:00
Grégory
c2a921ab7c Change azure default deployment mode to incremental (#3023)
* Changed default deployment mode to match with azure -cli behaviour. "Complete" mode by default is too dangerous.

* Set incremental as default behaviour for deployment mode.
2016-12-08 11:35:03 -05:00
Michal Klempa
39e3c530c0 maven_artifact: fix download of SBT published snapshot artifact (#3085)
Fixes #1717
2016-12-08 11:35:03 -05:00
Tim Rupp
9efcfaff48 Adds bigip_sys_global module (#3271)
This module can be used to change a variety of system parameters
typically used for bootstrapping.

Tests for this module can be found here

https://github.com/F5Networks/f5-ansible/blob/master/roles/bigip_sys_global/tasks/main.yaml

Platforms this was tested on are

12.1.0-hf1
2016-12-08 11:35:02 -05:00
Tim Rupp
10697854e0 Adds route_domain parameter to the selfip module. (#3272)
This patch allows one to specify a route_domain to create the
selfip in.
2016-12-08 11:35:02 -05:00
Tim Rupp
a27de3adcc Adds route advertisement state to the bigip_virtual_server module (#3273) 2016-12-08 11:35:02 -05:00
Ryan Conway
15f32cf3d5 Adds support for setting a virtual server's "source address translation" policy to a specific SNAT pool, in addition to the 'None' or 'Automap' options. (#3158) 2016-12-08 11:35:02 -05:00
Jens Carl
f60e0d88da Fix typo (#3289) 2016-12-08 11:35:02 -05:00
John R Barker
9fa1afc39f a10 - Use docs_fragments (#3281)
Remove duplicated documentation (common options defined in module_utils/a10.py).
Also tidy up formatting.
2016-12-08 11:35:02 -05:00
Tim Rupp
0055360315 Make irules module idempotent (#3175)
The irules module was failing to strip whitespace that is, for some
reason, automatically inserted by BIG-IP. This patch adds necessary
strips
2016-12-08 11:35:02 -05:00
Rene Moser
960f28692e docs: adjust version_added 2016-12-08 11:35:02 -05:00
Thierno IB. BARRY
60a32ba77f openvswitch_bridge: add fake bridge support (#3054)
* openvswitch_bridge: add fake bridge support

* openvswitch_bridge: check if vlan is between 0 and 4095
2016-12-08 11:35:02 -05:00
Andrea Scarpino
9b9ea97706 maven_artifact: Allow to specify a custom timeout (#2526) 2016-12-08 11:35:02 -05:00
Rowan
713b9bbdf3 Added proxied option to cloudflare_dns (#2961) 2016-12-08 11:35:02 -05:00
Pitsanu Swangpheaw
034f7d8b52 support proxmox resource pool (#2859) 2016-12-08 11:35:02 -05:00
Matthew Treinish
cbde91d765 Add TLS encyrption support to MQTT (#2700)
This commit adds module settings for configuring TLS encyption on the
mqtt notification module. Previously there was no way to configure
sending the messages encrpyted to mqtt.
2016-12-08 11:35:02 -05:00
jctanner
94175476b7 Implement a workaround for broken FindByInventoryPath method in pyvmomi (#3243)
* Add initial support for using a cluster instead of an esxi hostname
* FindByInventoryPath doesn't always work, so implement a fallback method to match the path
2016-12-08 11:35:02 -05:00
Michael Scherer
ceec679302 Make blockinfile work with python3
Traceback (most recent call last):
      File \"/tmp/ansible_ueg52c0b/ansible_module_blockinfile.py\", line 319, in <module>
        main()
      File \"/tmp/ansible_ueg52c0b/ansible_module_blockinfile.py\", line 259, in main
        if line.startswith(marker0):
    TypeError: startswith first arg must be bytes or a tuple of bytes, not str

Also clean imports while on it.
2016-12-08 11:35:02 -05:00
John Barker
7b94e3de38 Conditional main()
This is needed to allow the debugger work
2016-12-08 11:35:02 -05:00
Georg
be9fb2aa7d Update to firewalld doc
Missinformation about where available firewalld services are listed
2016-12-08 11:35:01 -05:00
Rene Moser
952add5920 docs: ec2_lc_facts: adjust version_added 2016-12-08 11:35:01 -05:00
Loïc
2e72ec40ae New module ec2_lc_facts (#2325)
New module to gather facts about AWS Autoscaling Launch Configurations
2016-12-08 11:35:01 -05:00
Steve Kuznetsov
c496c1b08e make: Expose std{out,err} of successful make commands (#3074)
When using the `make:` extras module, often the action taken
by the Make target is large. It is useful, therefore, to see
the output that `make` had to std{out,err} during execution
even when the target did not fail.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2016-12-08 11:35:01 -05:00
YAEGASHI Takeshi
8bb9149a10 blockinfile: Add a newline at EOF when the file is newly created (#3174)
Ref: #2687
2016-12-08 11:35:01 -05:00
Brian Coca
9ca2fef23a corrected version 2016-12-08 11:35:01 -05:00
jhawkesworth
4a8fc74288 Win say (#2866)
* Add a text-to-speech module for windows.

* Fix documentation
2016-12-08 11:35:01 -05:00
Kevin Maris
0d8ceefd48 Respect include.* directives by default. 2016-12-08 11:35:01 -05:00
Toshio Kuratomi
ea05c56a41 Fix remaining python3 compile problems 2016-12-08 11:35:01 -05:00
Toshio Kuratomi
3901fe72d3 Fix amazon extras modules to compile under python3 2016-12-08 11:35:01 -05:00
Toshio Kuratomi
46a1f73778 Fix remaining centurylink modules for py3
Also update the imports to take advantage of the Ansiballz imports
2016-12-08 11:35:01 -05:00
Michael Scherer
8fb4fd6736 Fix pkgng on python 3
Fail with:

    Traceback (most recent call last):
      File \"/tmp/ansible_2rsl4fg1/ansible_module_pkgng.py\", line 353, in <module>
        main()
      File \"/tmp/ansible_2rsl4fg1/ansible_module_pkgng.py\", line 330, in main
        _changed, _msg = install_packages(module, pkgng_path, pkgs, p[\"cached\"], p[\"pkgsite\"], dir_arg)
      File \"/tmp/ansible_2rsl4fg1/ansible_module_pkgng.py\", line 161, in install_packages
        old_pkgng = pkgng_older_than(module, pkgng_path, [1, 1, 4])
      File \"/tmp/ansible_2rsl4fg1/ansible_module_pkgng.py\", line 121, in pkgng_older_than
        while compare_version[i] == version[i]:
    TypeError: 'map' object is not subscriptable
2016-12-08 11:35:01 -05:00
Alexandre Garnier
945ac72217 Really fix python 2.4 compatibility
PR #1544 didn't remove the keyword argument 'delete' not existing in `tempfile.NamedTemporaryFile()` in python 2.4
2016-12-08 11:35:01 -05:00
Steyn Huizinga
c21dd8c13b Fix for ansible/ansible-modules-extras#3173 (#3203) 2016-12-08 11:35:01 -05:00
James Kassemi
f4faf9842f Fix issue with multiple pages of results in ec2_lc_find (#3090) 2016-12-08 11:35:00 -05:00
Jeff
d8efe53d7c logicmonitor: Documentation and logging updates based on feedback (#2756) 2016-12-08 11:35:00 -05:00
Nick Piper
491b136f6e doc: Correction for spelling of 'azure_rm_deployment' in example (#3212) 2016-12-08 11:35:00 -05:00
matt colton
93627a1f0f sl_vm: update datacenter, cpu and memory options (#3236) 2016-12-08 11:35:00 -05:00
Michael Scherer
4bbfe36a6e Refactor some code in timezone module 2016-12-08 11:35:00 -05:00
Morgan Jones
be19af02f7 azure_rm_deployment: fix rg issue with _nic_to_public_ips_instance() (#2950)
Fix an issue with _nic_to_public_ips_instance() function. There was an assumption in the code that the Public IP sits in the same resource group, this isn't always the case.
2016-12-08 11:35:00 -05:00
Jonathan Sokolowski
90cc40e105 lvg: Initialise device list (#3141) 2016-12-08 11:35:00 -05:00
Michael Scherer
9bdb567c56 Make netscaler pass python3 sanity check 2016-12-08 11:35:00 -05:00
Michael Scherer
04996c3720 Make nmcli pass py3 sanity check
Cleanup include, do not use '*' for future refactoring.

Since nmcli is not present on EL5, we can safely use python
2.6 syntax only.
2016-12-08 11:35:00 -05:00
John R Barker
32c4190ac8 Remove reference to ansible-validate-modules (#3256)
ansible-validate-modules is now in ansible/ansible

During 2.3 we will be merge the modules into ansible/ansible so this file will go away.

The new testing documentation will refer to `ansible-test` which will wrap up the unit, integration, and ansible-validate-modules. So no need to document here.
2016-12-08 11:35:00 -05:00
John R Barker
3472cc6f3a Run validate-modules from ansible/ansible (#3242)
* Run validate-modules from ansible/ansible

* Update sanity.sh
2016-12-08 11:35:00 -05:00
Tim Rupp
56147c3771 Adds module to manage SNAT pools on a BIG-IP (#3217)
This module adds the ability to manage the lifecycle of SNAT pools on a BIG-IP.

Tests for this module can be found here

https://github.com/F5Networks/f5-ansible/blob/master/roles/bigip_snat_pool/tasks/main.yaml

Platforms this was tested on are

12.1.0 HF1
2016-12-08 11:35:00 -05:00
Tim Rupp
7bfb491ba5 Adds the bigip_hostname module (#3216)
This module can be used to change the hostname on a bigip. The
hostname must be set via the tmsh or API methods or else it will
not reflect properly in the config.

Tests for this module can be found here

https://github.com/F5Networks/f5-ansible/blob/master/roles/bigip_hostname/tasks/main.yaml

Platforms this was tested on are

12.0.0
12.1.0 HF1
2016-12-08 11:35:00 -05:00
Tim Rupp
5d3dafc02e Adds bigip_gtm_facts module (#3232)
This patch adds support for querying the GTM(DNS) facts from a
BIG-IP. This completes a previous PR that was requested but not
finished.

Tests for this module can be found here

https://github.com/F5Networks/f5-ansible/blob/master/roles/bigip_gtm_facts/tasks/main.yaml

Platforms this was tested on are

11.6.0
12.1.0 HF1
2016-12-08 11:35:00 -05:00
Michael Scherer
50b31a2343 Do not import splitter, since we do not use it 2016-12-08 11:35:00 -05:00
Michael Scherer
7f4fdba0c6 Make openvswitch* pass py3 sanity check 2016-12-08 11:35:00 -05:00
Michael Scherer
2a83eefaae Make consul modules pass sanity test for python 3 2016-12-08 11:34:59 -05:00
Michael Scherer
d4157095f3 Make bigpanda module pass python3 sanity check 2016-12-08 11:34:59 -05:00
Michael Scherer
9cac0b54c6 Make jabber module compile on python 3 2016-12-08 11:34:59 -05:00
Michael Scherer
60b6cb8305 Make mail compile on python 3 2016-12-08 11:34:59 -05:00
Michael Scherer
95929fb79f Make postgresql module in extras compile on py3 2016-12-08 11:34:59 -05:00
Michael Scherer
6963cd8ae7 Make mongodb modules compile on python 3 2016-12-08 11:34:59 -05:00
Michael Scherer
1bca0847a4 Make rax_clb_ssl module pass sanity check for py3 2016-12-08 11:34:59 -05:00
Michael Scherer
2ceb672016 Fix dnsmadeeasy module to pass py3 sanity check 2016-12-08 11:34:59 -05:00
Michael Scherer
b902ea297f Make mqtt pass python3 sanity tests 2016-12-08 11:34:59 -05:00
Toshio Kuratomi
3c1dea1933 Add python-2.6 requirement to the proxmox module 2016-12-08 11:34:59 -05:00
Michael Scherer
573958bd53 Do not leak login_password when using verbose, with no_log 2016-12-08 11:34:59 -05:00
Alex
88e940a3e1 zypper: fix for checking result is None (#3143) 2016-12-08 11:34:59 -05:00
Michael Scherer
1948bcb9e7 Make zabbix modules compile on python 3
Since the module is not compatible with python 2.4, we
do not need to use the get_exception trick
2016-12-08 11:34:59 -05:00
Michael Scherer
c1f7fa2f3b ovirt_auth: fix type and password leak (#3119)
Do not leak the password in log, and verify the path of ca_file
2016-12-08 11:34:59 -05:00
Ville Reijonen
e5688c709a win_scheduled_task: fix days_of_week var command typo (#3198) 2016-12-08 11:34:59 -05:00
Michael Scherer
adc62226d4 Make dnssimple compile on python 3 2016-12-08 11:34:58 -05:00
hyperized
d815890aa6 Update irc.py (#3144)
Proposal to update the example to YAML syntax.
2016-12-08 11:34:58 -05:00
Benjamin Copeland
2796370b57 statusio_maintenance: Fix minor typo (#3137) 2016-12-08 11:34:58 -05:00
Jasper Lievisse Adriaanse
83a6032b7a Remove incorrect statement, uri module doesn't require httplib2 anymore 2016-12-08 11:34:58 -05:00
Michael Scherer
8676924da5 Fix proxmox for python 3
Since it doesn't work on python 2.4, we can use the native
exception handling way for python 3
2016-12-08 11:34:58 -05:00
Michael Scherer
37b62a1db3 Remove gce from the blacklist for python 3 tests, forgot in #3179 2016-12-08 11:34:58 -05:00
Toshio Kuratomi
f77aa869b8 Few more places where gce modules need python3 compat exceptions 2016-12-08 11:34:58 -05:00
Michael Scherer
7ba630eda2 Make xenserver_facts compile on python 3
Since the xenapi is not needed on python 2.4, we can use the
regular exception handling code
2016-12-08 11:34:58 -05:00
Michael Scherer
9f5f85c9f0 Port ovirt to python 3
Since ovirt sdk is not running on python 2.4, we can use python 2.6
syntax directly for exceptions.
2016-12-08 11:34:58 -05:00
Michael Scherer
715b88a8a5 Make redis run on python 3 2016-12-08 11:34:58 -05:00
Michael Scherer
11d88bc1a8 Fix gce module to compile on python 3 (#3179) 2016-12-08 11:34:58 -05:00
Michael Scherer
da6851bdf4 Make expect module compile on python 3 2016-12-08 11:34:58 -05:00
Michael Scherer
415c2d4591 Make sensu_check compile on python 3 (#3177) 2016-12-08 11:34:58 -05:00
Eric D Helms
151c6d2f88 Fix broken entities reference in Katello module (#3136) 2016-12-08 11:34:58 -05:00
Patrik Lundin
896dec44a6 openbsd_pkg: Use correct part of name in match. (#3151)
* openbsd_pkg: Use correct part of name in match.

Previously this part of the code could assume that the name was a stem
with nothing else attached (like "autoconf"). With the introduction of the
branch syntax ("autoconf%2.13") this is no longer true.

Check if the package name was identified as using a "branch" style name,
and base the match on the leading part of the name if that is the case.

While here remove unnecessary "pass" and tidy up debug log message.

Problem reported by @jasperla.

* openbsd_pkg: Add missing "." in comment.
2016-12-08 11:34:58 -05:00
Ryan Currah
00adb6e5d4 Fix mongodb_user.py version detection logic (#3162)
Fix mongodb_user.py version detection logic for mongo srv 2.6 and mongo driver 2.7. The wrong variable was used for detecting the mongo driver version. This fix resolves the error "(Note: you must use pymongo 2.7+ with MongoDB 2.6.. 2.6.11)" no matter what version of pymongo you had installed for mongodb 2.6.
2016-12-08 11:34:57 -05:00
Ryan Brown
bbe8e1f53b Fix archive truncating archived file names based on prefix length (#3124)
When archiving multiple files, the full length of the calculated
`arcroot` would be removed from the beginning of all file names. If
there was no arcroot, the first two characters of all files would be
removed, so `file.txt` would become `le.txt`.

This patch uses the regular expressions substitution anchored to the
start of the string, so the arcroot is only removed if it is actually
present.
2016-12-08 11:34:57 -05:00
Ryan Brown
25da992785 Fix failure to apply bucket policy when creating a bucket from scratch (#3091) 2016-12-08 11:34:57 -05:00
Michael Scherer
9aec480f59 Make irc.py compile on python3 2016-12-08 11:34:57 -05:00
Michael Scherer
1f406d4530 Port virt to python3 (#3167) 2016-12-08 11:34:57 -05:00
Michael Scherer
9be3e67e21 Make sure that the token is not printed in log (#3115) 2016-12-08 11:34:57 -05:00
Michael Scherer
138aaa4ff3 Fix crypttab (#3121)
* Fix error in crypttab doc

* Use path type for file argument

This permit to make sure that $HOME and '~' are properly
expanded, even if in the case of crypttab, this might not make
a lot of sense
2016-12-08 11:34:57 -05:00
Ivan Bojer
3c06e2585a PanOS module for admin password change using PanOS API as the transport (#2930)
* PanOS module that allows admin password change.

* fixed a typo

* empty __init__.py

* added require ansible Python extension .py

* added version string

* added return docstring

* changed version to 2.2

* - changes to the format and module as requested by @privateip

* changed version back to 2.2 as 2.3 was failing automated tests

* Revert "changed version back to 2.2 as 2.3 was failing automated tests"

reverting version info

This reverts commit 71d520f3b4b69eb017c2b9f287a74cb77fae9d1c.
2016-12-08 11:34:57 -05:00
Toshio Kuratomi
badce91e80 Fix a couple undefined variables
One was a typo and one needed to have the variable defined in that scope
2016-12-08 11:34:57 -05:00
Tim Rupp
79895061b4 Fixes broken documentation in two modules (#3150)
The modules listed in this PR were using YAML that resulted in
blockquote tages being inserted into the generated RestructedText.

This PR fixes that so that the documentation once again looks correct
2016-12-08 11:34:57 -05:00
Aleksey Gavrilov
951f1d280c proxmox add exaples static ip (#3092) 2016-12-08 11:34:57 -05:00
Michael Scherer
b52d0f65d6 Fix wrong variable name 2016-12-08 11:34:57 -05:00
Michael Scherer
6769bbf1a6 Do not leak the solaris root password in the log 2016-12-08 11:34:57 -05:00
afunix
60d84aca07 gluster_volume adds replica and stripe arguments when adding bricks [#2754] (#2812) 2016-12-08 11:34:57 -05:00
Michael Scherer
343134bd0f Do not leak the channel token in log (#3117) 2016-12-08 11:34:57 -05:00
Michael Scherer
c50ac02b30 Add verification for the arguments of opendj_backendprop (#3116) 2016-12-08 11:34:56 -05:00
Eric D Helms
f4d83486a9 New module: Manage Foreman and Katello entities (#2450) 2016-12-08 11:34:56 -05:00
Michael Scherer
9ba5218631 Do not leak the newrelic token in log (#3118) 2016-12-08 11:34:56 -05:00
Michael Scherer
b03e95418e Do not leak the password of gitlab_user in log (#3122) 2016-12-08 11:34:56 -05:00
Ryan S. Brown
001cf5cfc5 lambda correct documentation of return output
The returns are actually nested under `configuration` keys, so the docs
need to reflect that. Also add the automatic return of the function
version, so it can be used to feed the `lambda_alias` module.
2016-12-08 11:34:56 -05:00
Ryan S. Brown
b7ca9d6567 lambda Support using the role name
Instead of needing the full role ARN, allow users to specify a role name
as long as the role exists in the same account.
2016-12-08 11:34:56 -05:00
Adam Miller
3ac2a498ae add offline mode to firewalld
Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
2016-12-08 11:34:56 -05:00
Peter Sprygada
00cc7c03fa Revert "update mask_passwords argument to be more descriptive in asa_config (#3109)" (#3110)
This reverts commit 271e300745.
2016-12-08 11:34:56 -05:00
Peter Sprygada
1b6a424375 update mask_passwords argument to be more descriptive in asa_config (#3109)
This changes the passwords argument to mask_passwords to make the
argument more descriptive of its intended function
2016-12-08 11:34:56 -05:00
René Moser
9518290454 cloudstack: cs_portforward: fix rule not found if domain is not account's domain. (#3093)
cs_portforward will not find the rule and tries to create it resulting in an API error.

Thanks to @mostkopf for reporting.
2016-12-08 11:34:56 -05:00
Peter Sprygada
d698a9b5f7 fixes asa_config to allow config to include passwords, defaults or none (#3102)
The fix allows the asa_config module to request the config to contain
all default statements or password information necessary for vpn
tunnel endpoints
2016-12-08 11:34:56 -05:00
Peter Sprygada
817881d64f fixes problem where wrong ACL could be selected (#3099)
This fixes a bug where the wrong acl name could be matched in the running
config if the desired acl name is a starting subset.
2016-12-08 11:34:56 -05:00
Tim Rupp
6f0477a780 Fixes the enabled_vlans argument (#3061)
This argument had a couple of issues with it. First, as it was
being interpreted in the code, it did not check for idempotency.

Second, the model of having the parameters be "all_*" is going to
hinder the ability to "undo", so-to-speak, what the user did while
maintaining legibility.

Consider if the user specified "all_enabled_vlans='net1'" and then
decided they wanted to backout of this decision. What is the proper
argument to fulfill this wish? "all_enabled_vlans='...?'

This patch changes the all_enabled_vlans argument to be "enabled_vlans",
ensures that idempotency works, and also provides for a way to "undo" a
change to the enabled VLANs by allowing the user to specify the special
case VLAN named "ALL" (all capitals).

This makes the parameter more intuitive because the users will specify
which vlans they want to make the virtual available on

  * enabled_vlans="net1"

but also allows them to "undo" what they did by setting it back with
the case of all

  * enabled_vlans="ALL"
2016-12-08 11:34:56 -05:00
Tim Rupp
223d5cc7ee Adds copyright line for F5 contributed modules (#3081)
I was asked to do this as part of the contribution effort in house
2016-12-08 11:34:56 -05:00
Tim Rupp
de08965ab3 Corrects the required SDK version (#3095)
The SDK version that was mentioned originally was incorrect
2016-12-08 11:34:56 -05:00
Pieter Hollants
c2992fbb81 zypper_repository: Prepend --gpg-auto-import-keys before refresh command (#3088)
Fixes #3086.
2016-12-08 11:34:55 -05:00
Robin Roth
48ee364950 Add documention for enabled option in zypper_repository (#3083) 2016-12-08 11:34:55 -05:00
René Moser
d2eeabf129 slack: fix handling of html entities and escaping (#3032)
for < > & ' and "
2016-12-08 11:34:55 -05:00
Jonathan Mainguy
d4b94ec6bb fix timezone for centos6 (#3078) 2016-12-08 11:34:55 -05:00
John R Barker
66eaa464ee Typos in doc's strings (#3071) 2016-12-08 11:34:55 -05:00
Toshio Kuratomi
d52fc0f8a6 Update shippable config (#3063) 2016-12-08 11:34:55 -05:00
THEBAULT Julien
bfb1ad6690 Fix mongodb user compatibility check (#2731)
- Check the compatibility asap
2016-12-08 11:34:55 -05:00
Bryan Hundven
50092ed629 Fix the comment in the example. (#3050)
Fix the typo: `Crate` -> `Create`. Make a complete sentence.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2016-12-08 11:34:55 -05:00
Ryan Brown
cdd874e61d Fix owner on gce_img 2016-12-08 11:34:55 -05:00
Rob
20cfe15e56 If parameters for policy, tags or versioning are not supplied, do not change the existing values defined for the bucket (#2938) 2016-12-08 11:34:55 -05:00
John R Barker
3a3612f57b asa_template is now deprecated (#2992)
* asa_template is now deprecated

* Delete asa_template

Since asa_template was added during 2.2 development, rather than
deprecate them
2016-12-08 11:34:55 -05:00
John R Barker
94bd3a70e5 Correct typos (#3055) 2016-12-08 11:34:55 -05:00
Ondra Machacek
7f51ec8bab ovirt_vms: wait for VM to be created for states stopped/suspended (#3044) 2016-12-08 11:34:55 -05:00
Thierno IB. BARRY
c0cfd1db45 elasticsearch_plugin: rewrite module to not use unsupported parameters (#2839)
* elasticsearch_plugin: rewrite module to not use unsupported parameters (#1785)

Avoid using parameters when they are not needed (#1785)

* elasticsearch_plugin: add version only during plugin installation and parse plugin name for its removal

* elasticsearch_plugin: join command args before running it
2016-12-08 11:34:55 -05:00
Tim Rupp
781dd9c459 Distinguish between untagged and tagged vlans
We were incorrectly making VLANS always be untagged when they could
be either tagged or untagged. This change corrects the arguments to
the vlan module to allow for specifying either untagged or tagged
interfaces. The arguments are mutually exclusive
2016-12-08 11:34:55 -05:00
Michael Scherer
9ec65db778 Use 'path' type for file arguments 2016-12-08 11:34:55 -05:00
Michael Scherer
c8bfab9c08 Add missing deps, since we use openssl to verify the date 2016-12-08 11:34:54 -05:00
Ryan Saunders
b48e1e9b65 Fix documentation typos and broken URL (#3039) 2016-12-08 11:34:54 -05:00