Commit graph

19926 commits

Author SHA1 Message Date
Gaurav Rastogi
8e965c5986 New module to setup WAF profile. (#34363)
* New module to setup WAF profile.

* Update copyright notice.

* updated required fields
2018-01-23 20:22:54 +00:00
Michael Scherer
060001b08d Remove deprecated code (#34828)
* Remove compat code for to_unicode, to_str and to_bytes

Code was marked as deprecated and to be removed after 2.4

* Remove is_encrypted and is_encrypted_file

Code was marked as deprecated after 2.4 release.
2018-01-23 12:02:09 -06:00
Robin Roth
ec80f8ad80 Add identifier option to apache2_module (#33748)
* Add identifier option to apache2_module

There is a convention connecting the name passed to a2enmod and the one
appearing in apache2ctl -M. Not all modules follow this convention and
we have added a growing list of implicit conversions.
As a better long-term solution this adds an "identifier" option to be
able to set both strings explicitly.

* Run debian-specific tests only there

* Improve cleanup after apache2 tests

This is a follow-up/extension of https://github.com/ansible/ansible/pull/33630

* Add example for the new identifier option

* Put all debian tests in a block
2018-01-23 18:56:59 +01:00
Gaurav Rastogi
0d06d7caa0 New module to setup cluster cloud details settings for clouds like Az… (#34366)
* New module to setup cluster cloud details settings for clouds like Azure.

* Update copyright notice.
2018-01-23 17:09:46 +00:00
Dustin Spicuzza
b2dcc9c587 Better error message when file lookup fails (#30894)
* Alert user which debug level will show them useful details
2018-01-23 10:48:35 -06:00
René Moser
a8b9d7f8be iam_role: fix docs, managed_policy not required (#35229) 2018-01-23 11:28:39 -05:00
tomo
ef6b478d2a add rstrip and lstrip bool flags to file lookup plugin (#31738) 2018-01-23 10:14:19 -06:00
Jason Vanderhoof
7c8e365dff Conjur Lookup Plugin (#34280)
* Imported lookup plugin from Role

* Plugin cleanup, including:
* Use existing Python YAML parsing
* Remove environment variables as connection options
* Added initial debugging information

* Reworked the lookup plugin using the Python Request library.  As it's available through Ansible, it makes communication with Conjur much more straight forward.

* Removed un-used libraries

* Fixed linting issues

* Standardized output on `format` and insure it works for 2.6, 2.7, and 3.x.

* Use quote_plus from the six library for improved python 2/3 behavior.

* Refactored identity & configuration to prefer user's file. This also includes a refactor to remove an un-needed dictionary merge method.

* Removed `requests` in favor of `ansible.module_utils.urls`.

* Refactored netrc loading to warn if host is not present.

* Tests and a refactor to support easier testing.

* Added reference to website

* Fixed two linting errors

* Fixed an extra line found by linting

* Updated file write to use binary to insure config files are written correctly

* Resolved linting issues

* Refactored config & identity loading to take advantage of plugin options

* Cleanup a bunch of small items caught by linting

* Removed extra line caught by linting

* Swapped in pytest and added some tests with mocked network responses

* Pushing to see if this approach works better...

* Refactored be open_url mocking based on feedback

* Fixed a couple linting issues & refactored mocking into each method to attempt to resolve a failing test

* Use a generic MagicMock for python 2.6

* Fixes doc typo

require -> required

* Use `type: path` in identity_file and config_file

Also removes `expanduser` calls below (which will now be called automatically on
paths.)

* Defines maintainers for conjur_variable plugin

* BOTMETA.yml:
** defines $team_cyberark_conjur as maintainers of Conjur Variable plugin
** adds myself and @jvanderhoof to that team

* Adds URLs to relevant documentation for Conjur Variable lookup plugin

* Clarifies "the server," "the machine" -> "controlling host"

The machine identity used is that of the Ansible controlling host, not any
server being provisioned or instructed. This documentation change aims to make
that relationship clear.

* Adds response code to exception message on authentication failure

* Enhances exception messages to specify the controlling host

These error messages are less likely to confuse a user as to which machine is
associated with the files, identities, and configurations being described.

* Adds ANSIBLE_METADATA for Conjur variable lookup plugin
2018-01-23 10:04:57 -06:00
David Soper
9c9e692165 Ucs vlans and integration tests (#35071)
* UCS VLANs module and integration tests

* UCS VLANs and integration tests
2018-01-23 16:32:32 +01:00
Abhijeet Kasurde
013190c27b VMware: Add support for datastore cluster (#35230)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-23 10:25:38 -05:00
Abhijeet Kasurde
ca31e59b79 VMware: Add teaming policy for DVS Portgroup. (#35215)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-23 09:51:50 -05:00
Michael
75130b4a4d Support domainname in docker_containers (#32292) 2018-01-23 08:24:37 -06:00
Charl van Niekerk
30ed29ed46 Implement the reduce_on_network method to filter a list of IP addresses on a given range. (#34929) (#34930) 2018-01-23 08:14:56 -06:00
Dhivyap
19ff2f4e8c Ansible 2.5 feature support for dellos9 (#34880)
* Add ansible-2.5 support for dellos9

* Fix ansible-test issues and update copyright

* fix ansible-test errors in dellos9_config

* fix izip attribute error in python3

* fix python3 dict.keys() issue

* Remove waitfor aliases in dellos9_command
2018-01-23 13:59:27 +00:00
Ondra Machacek
9f84a12adf ovirt_vms: Add cpu_threads parameters (#35221) 2018-01-23 08:46:37 -05:00
David Soper
7aa0c929bf Ucs lan connectivity and integration tests (#35137)
* UCS LAN Connectivity Policies and integration tests

* Docs updated

* UCS LAN Connectivity Policy and integration tests

* Fix use of description in docs and argument_spec so validate-modules passes
2018-01-23 14:45:44 +01:00
David Soper
9945d9a720 Ucs vnic template and integration tests (#35136)
* UCS vNIC templates and integration tests

* docs updated

* UCS vNIC template and integration test

* Update docs and argument_spec for description, mtu, and target.
2018-01-23 14:45:31 +01:00
Jordan Borean
9e48cf875f Azure: added auth_source to override the source of the credentials (#35213)
* Azure: added auth_source to override the source of the credentials

* removed broken cli auth and fix some review changes

* missed some more cli auth stuff that isn't required

* Added cli auth back in

* Added docs around cli auth

* fix azure CLI auth issues

* tweak error messages
* fix auto fallback to cli
* fix import issues when azure-cli not installed
2018-01-22 23:38:05 -08:00
Toshio Kuratomi
32eef49062 Make AnsibleActionDone a private exception
We're going to remove this in the future so mark it private so people
are less likely to use it.
2018-01-22 23:36:34 -08:00
Toshio Kuratomi
ca8e4c806a Pass tempdir via module args instead of the environment 2018-01-22 23:36:34 -08:00
Matt Davis
06dc840b51
implement gather_subset on Windows setup (#35212) 2018-01-22 21:10:25 -08:00
Trishna Guha
4083c8e048
Fix nxos terminal plugin regex to support certain commands (#35186)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-01-23 09:04:13 +05:30
Abhijeet Kasurde
c0df05c028
github_release: Fix state returned from module (#33735)
This fix corrects the module state returned by github_module.
Now,
* When the release already exists, state is "ok"
* When the release is created, state is "changed"

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-23 08:37:41 +05:30
Toshio Kuratomi
b151f5d942 Move module_set_locale and module_lang back to global
These config settings are being deprecated so we don't want people to
think they need to implement them for their new shell plugin.
2018-01-22 18:38:15 -08:00
Toshio Kuratomi
62bc714dae Move setting for world-readable-tempfiles back to global config.
The code that depends on this is all in the action plugins so we should
leave it there until we either move that action plugin code over
(fixup_perms2) or we give action plugins the ability to register new
config.
2018-01-22 18:38:15 -08:00
Dag Wieers
64df1a7566
aci_aaa_user_certificate: Rename user parameter to aaa_user (#35207) 2018-01-23 02:23:06 +01:00
Toshio Kuratomi
f94fe61b6b Documentation and changelog for the plugin_filtering config option 2018-01-22 17:13:41 -08:00
Toshio Kuratomi
340a7be7c3 Implement plugin filtering 2018-01-22 16:54:53 -08:00
Toshio Kuratomi
14c3b4d8e5 Move yaml loading functions from DataLoader into a utility module. 2018-01-22 16:54:53 -08:00
Dag Wieers
2a4b3ef0c1 win_product_facts: New module to get Windows product information (#35206)
* win_setup: Add Product ID and Product Key in facts

So this is actually a very nice way to get product key information from
systems collected centrally.

Especially with systems that have been upgraded from Windows 7 or
Windows 8 to Windows 10 may not have a valid Windows 10 product
license key printed anywhere, it was a digital license.

If you ever have to reinstall the system, you may recover the system
from the recovery partition, or the original media, but cannot upgrade
to Windows 10 for free. By collecting the product key, one can always
reinstall your free Windows upgrade.

My only question is, do we want this to be part of the default facts, as
it may be considered important information. Or should we make a special
**win_product_key_facts** ?

* Add ACPI product key support

* Add integration test

* Remove Get-ProductKey function, move inline
2018-01-23 10:44:55 +10:00
Sloane Hertel
4a1cc661c4 add inventory caching & use in virtualbox inventory plugin (#34510)
* Inventory caching

* Add inventory caching for virtualbox

* Don't populate cache for virtualbox with stdout, use a dict of inventory instead

* Fix error creating the cache dir if it doesn't exist

* Keep cache default False and set to True in VariableManager __init__

* Check all groups before determining if a host is ungrouped.
2018-01-22 19:33:14 -05:00
Ben
9fdaa86c9f Fixes issue #34956 (#35149) 2018-01-23 10:25:08 +10:00
René Moser
390f65bd6a [cloud] iam_role: fix docs & default state to present (#35184)
* iam_role: default state to present

* fix yaml
2018-01-22 18:51:11 -05:00
Sloane Hertel
b94198f9de [cloud] New inventory plugin: aws_ec2 (#34416)
aws_ec2 is an inventory plugin intended to replace uses of the `contrib/inventory/ec2.py`
inventory script. 

For advanced grouping, please use the `constructed` inventory plugin.
2018-01-22 18:49:57 -05:00
Adrian Likins
6e585bdf24
Fact collector ordering deps (#31362)
Add deps/requires for fact collectors

Fact collectors can now set a required_facts
class attribute that will be a set of the names
of fact collectors they require to be run first.

ie, if a collector needs to know the ansible_distribution,
it should set it's required_facts to include 'distribution'

        required_facts = set(['distribution'])

If a collector requires another collector, it gets added
to the selected collector names.

We then topological sort the ordering of the collectors
so that deps work out (ie, 'distribution' will run before
'service_mgr')

required_facts were added to the collectors for:

        - network (requires 'distribution', 'platform')
        - hardware (requires 'platform')
        - service_mgr (requires 'distribution', 'platform')

Fix name references for facts (need 'ansible_' prefix)
is service_mgr

Fixes #30753
2018-01-22 18:23:40 -05:00
Marek
5fa29201a7 Port sts_assume_role to boto3 (#32569)
* Ported sts_assume_role to boto3

* Added integration tests
2018-01-22 17:46:08 -05:00
Adrian Likins
ffe0ddea96
add a vault --encrypt-vault-to specify vault id to use for encrypt (#31067)
Enforce that there can be only one --new-vault-id or
--new-vault-password-file and use this instead of
--encrypt-vault-id

* Add a config option for default vault encrypt id
2018-01-22 17:12:10 -05:00
Rob
866239e01a [cloud] Add support for using IP addresses in target groups (#34266)
* Add support for IP based ELB target groups. Fixes #30962

* Add support for using IP addresses in target groups
2018-01-22 16:47:41 -05:00
Aidan Feldman
de60328d94 add documentation around commonly-used Facts for Conditionals (#34263)
* add documentation around commonly-used Facts for Conditionals

There are a few Facts that are often used for Conditionals, so
documenting them on the Conditionals page with their possible values.

* Edit
2018-01-22 13:37:19 -08:00
Dag Wieers
7f6feca82f
Revert "win_setup: Add Product ID and Product Key in facts" (#35200)
* Revert "win_setup: Add Product ID and Product Key in facts (#34097)"

This reverts commit cf1f7b53df.
2018-01-22 22:32:23 +01:00
Peter Sprygada
dd5256f3df adds restart_if_needed argument to nios_zone (#35191)
* adds restart_if_needed argument to nios_zone

* minor updates to the documentation strings
2018-01-22 21:21:07 +00:00
Dag Wieers
d6004852a2
ACI: Move to 'host' parameter instead of 'hostname' (#35161)
* ACI: Move to 'host' parameter instead of 'hostname'

* Update host parameter in documentation fragment too
2018-01-22 22:06:56 +01:00
Dag Wieers
cf1f7b53df win_setup: Add Product ID and Product Key in facts (#34097)
* win_setup: Add Product ID and Product Key in facts

So this is actually a very nice way to get product key information from
systems collected centrally.

Especially with systems that have been upgraded from Windows 7 or
Windows 8 to Windows 10 may not have a valid Windows 10 product
license key printed anywhere, it was a digital license.

If you ever have to reinstall the system, you may recover the system
from the recovery partition, or the original media, but cannot upgrade
to Windows 10 for free. By collecting the product key, one can always
reinstall your free Windows upgrade.

My only question is, do we want this to be part of the default facts, as
it may be considered important information. Or should we make a special
**win_product_key_facts** ?

* Add ACPI product key support
2018-01-22 16:00:45 -05:00
Kairo Araujo
bcd883ce5e Included ansible_devices for AIX facts/hardware (#31546)
* Included ansible_devices for AIX
2018-01-22 14:37:45 -05:00
Toshaan Bharvani
87e82be09f added new IBM Power KVM guest recognisation (#35169)
Signed-off-by: Toshaan Bharvani <tab@toshaan.com>
2018-01-22 14:29:44 -05:00
Josh Souza
1ac715987b Update iam_group to add check mode support (#27589) 2018-01-22 14:29:22 -05:00
Ricardo Carrillo Cruz
b7f4504a36
Add eos_l2_interface module and integration tests (#35162)
* Add eos_l2_interface module and integration tests

* Address PR review comments

* Fix pylint issues
2018-01-22 20:00:39 +01:00
Will Thames
142cacfec3 [cloud] ECS Service load balancer modification graceful fail (#32876)
It is not possible to modify the load balancer configuration
for ECS Service.

As it is possible to detect this, it's nicer to fail gracefully
than return AWS's less meaningful failure message.

Fix PEP8 compliance
2018-01-22 13:37:09 -05:00
Abhijeet Kasurde
b24d502682 VMware: Refactor vmware_dvs_portgroup (#35193)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-22 13:15:18 -05:00
Giovanni Sciortino
b4736a8741 Add rhsm_repository module (#28292)
Add rhsm_repository module
2018-01-22 12:42:29 -05:00
Abhijeet Kasurde
c65842b9d8
Add check mode support in vmware_guest (#32858)
This fix adds check mode support in vmware_guest

Fixes: #32439

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-22 21:16:19 +05:30
Ganesh Nalawade
e8dd01fa5b
Add junos_l2_interface module (#35123)
* Add junos_l2_interface module

*  Implementation for junos_l2_interface module
*  Integration test

* Fix CI issues

* Fix review comments
2018-01-22 20:38:07 +05:30
Abhijeet Kasurde
912729b6a7
VMware: Check if VM is poweredoff before destroy (#35151)
This fix checks if VM is poweredoff before it can be destroyed.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-22 20:17:11 +05:30
Peter Sprygada
8d775a332e Add support for Infoblox NIOS (#35097)
* WIP: initial commit

* update documentation in modules

* fix up sanity check issues

* add unit tests for nios api

* fix up sanity check failures

* fix up EXAMPLES in modules

* mock infoblox_client.connector

* remove unsupported assert statement
2018-01-22 14:25:13 +00:00
abirami-n
775118aae2 2.5 Plugin Environment support and Testcases for dellos6 modules (#34890)
* Dellos6_2.5_support

* cleanup

* Fix pep8

* fix waitfor

* fix_facts

* fix_assert
2018-01-22 12:34:21 +00:00
Alberto Murillo
2018a61489 archive: Add support for xz (#34110)
* Add support for xz format on archive module

Fixes #34037
Fixes #34119

Signed-off-by: Alberto Murillo <albertomurillosilva@gmail.com>
2018-01-22 07:33:07 -05:00
Dag Wieers
39aad91c5c
ACI: Introduce port parameter (#35168)
* ACI: Introduce port parameter

* Add port parameter to documentation
2018-01-22 12:44:02 +01:00
Dag Wieers
46e53f90a7
ACI: Rename aci_intf_policy_* to aci_interface_policy_* (#35170)
* ACI: Rename aci_intf_policy_* to aci_interface_policy_*

* Modify documentation accordingly

* Fix validity ignore file
2018-01-22 12:40:15 +01:00
René Moser
8fdfda76e9
cloudstack: cs_network: implement subdomain_access (#34741) 2018-01-22 12:15:39 +01:00
saichint
4bc22be614 Fix for nxos_pim issues (#35103)
* fix nxos_pim issues

* unused line removed

* unused line removed

* remove unnecessary files
2018-01-22 11:30:52 +05:30
Chetan-CSI
d0a257efad aws-describe-subnets-rate-limit (#35044) 2018-01-22 09:14:22 +10:00
Michael Scherer
8071cc0529 Add support for adding the intermediate cert (#35144)
acme-tiny generate certificate without adding add the LE intermediate
certificate, which make several browsers and curl complain.
2018-01-21 15:39:22 -05:00
Tim Rupp
bff862b05d
Fixes bigip_asm_policy (#35154)
This module had been unable to successfully create policies
on different partitions. This appears to be fixed now
2018-01-21 10:11:27 -08:00
Michael Scherer
347b5d1e50 write need bytes object on python 3 (#35143)
Otherwise, it fail with:

    Traceback (most recent call last):
      File \"/tmp/ansible_c1zmq3i9/ansible_module_openssl_certificate.py\", line 808, in <module>
        main()
      File \"/tmp/ansible_c1zmq3i9/ansible_module_openssl_certificate.py\", line 787, in main
        certificate.generate(module)
      File \"/tmp/ansible_c1zmq3i9/ansible_module_openssl_certificate.py\", line 692, in generate
        certfile.write(str(crt))
    TypeError: a bytes-like object is required, not 'str'
2018-01-21 06:26:32 -05:00
Michael Scherer
f23f277e46 Verify that acme-tiny is present (#35145)
* Verify that acme-tiny is present

* Use run_command rather than subprocess for acme-tiny

Besides consistency with the rest of the code base, this also
add 2 bug fixes:
- ansible should no longer show "warning, junk after json" when using the module
- it also verify the return code of acme-tiny, and so fail when the
verification fail. The previous code didn't check rc, so it would continue
with a empty file
2018-01-21 06:26:18 -05:00
Dag Wieers
fa5adabcbf
aci_rest: Additional notes and simplify examples (#35091)
Add additional notes, improve examples
2018-01-21 10:59:08 +01:00
Dag Wieers
4b8e76747e
aci_config_snapshot: Fix bug with filter_target (#35141) 2018-01-20 22:49:59 +01:00
Dag Wieers
192c0dc9d1
ACI: Fix recently introduced bug (#35139)
This fixes #35135
2018-01-20 22:32:45 +01:00
Adrian Likins
08f92a9f0f
Fix fact deps when 'filter=ansible_fact' is used. (#33441)
The accumulated collected_facts was being update
with new facts _after_ filtering them. So only
facts that pass the filter would ever be passed
to other fact collectors.

For 'filter=ansible_service_mgr', even though it requires
the platform and distribution facts and even collects them,
they would get filtered out and never passed to the other
collectors that need them (service_mgr for ex).

Fix is just to add the unfiltered facts to collected_facts.

Adds unit tests for fact filter and collected_facts.

Fixes #32286
2018-01-20 15:07:27 -05:00
Adrian Likins
ec9769c82f
Facts distribution clear linux 31501 (#32453)
The search string used to look for Clear Linux
was changed in 45a9f96774 to
be more specific, but was too specific. Now finding
a substring match for 'Clear Linux' in /usr/lib/os-release
is enough to consider a match.

Since the details of the full name in os-release varies
('Clear Linux Software for Intel Architecture',
 'Clear Linux OS for Intel Architecture', etc) the
search string match was failing and would fall back to the
'first word in the release file' method resulting in
ansible_distribution='NAME="Clear'

Also add a meta fact indicating which search string
was matched.

Test case info from:
        https://github.com/ansible/ansible/issues/31501#issuecomment-340861535

Fixes #31501
2018-01-20 15:05:53 -05:00
Adrian Likins
fc180a378a
Support using vault password files that are themselves vault encrypted (#27668)
Extract vault related bits of DataLoader._get_file_contents to DataLoader._decrypt_if_vault_data

When loading vault password files, detect if they are vault encrypted, and if so, try to decrypt with any already known vault secrets.

This implements the 'Allow vault password files to be vault encrypted'  (#31002) feature card from
the 2.5.0 project at https://github.com/ansible/ansible/projects/9

Fixes #31002
2018-01-20 14:56:18 -05:00
Tim Rupp
ca8982f96c
Fixes some bugs and things (#35122)
Removes deprecations and fixes bugs.
2018-01-20 10:40:20 -08:00
Chris Houseknecht
a0bb193598
Add K8s inventory plugin (#34920) 2018-01-20 08:50:01 -05:00
Abhijeet Kasurde
04bee050ac
VMware: minor correction in documentation. (#35124)
Fixes: #27176

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-20 16:39:55 +05:30
Tim Rupp
90f0c411e4
Adds module for bigip_device_group_member (#35121)
Module allows for members to be managed in a device group
2018-01-19 20:57:41 -08:00
Tim Rupp
585d8cf4c7
Adds bigip_ucs_fetch module (#35113)
This module can be used to download UCS files from a BIG-IP
2018-01-19 20:25:47 -08:00
Dag Wieers
2cd8a3a9a3
ACI: Make network testing work out-of-the-box (#35116) 2018-01-20 02:47:28 +01:00
Dag Wieers
064aad817d
ACI: Add ACI version information to VMM domain docs (#35114) 2018-01-20 01:15:59 +01:00
Nathaniel Case
bf1580a333
ios_l2_interface (#35054)
* Fix sending 'None' to device on ios

* Add ios_l2_interface module & tests

* Skip l2 tests on non-l2 images

* Allow test to continue on non-L2 hosts
2018-01-19 17:14:32 -05:00
Will Thames
4d58d16793 Add aws_s3 action plugin to find source files as expected (#35028)
People expect to be able to upload files to s3 using standard
locations for files.

Providing an action plugin that effectively rewrites the `src`
key to the result of finding such a file is a great help.

Tests added, and IAM permissions corrected
2018-01-19 17:11:42 -05:00
Jordan Borean
d0e6889f93 win_become: another option to support become flags for runas (#34551)
* win_become: another option to support become flags for runas

* removed uneeded entries

* fixed up whitespace issue

* Copy edit
2018-01-19 13:58:10 -08:00
Bruno
04f1b140d9 added aci_interface_policy_leaf_policy_group module (#34968)
* added aci_interface_policy_leaf_policy_group module

* fixing documentation errors

* fixed argument_spec function and fixing documentation errors

* added documentation extends..

* removed unnecessary aliases, improved notes, improved examples to show optional description

* fixing sanity checks

* fixed proposed changes by dag

* Fix one more leftover
2018-01-19 21:31:25 +01:00
Ganesh Nalawade
b3b3c0ec54
Add regex to catch ios error prompt (#35007)
*  Move the error checking from ios_l3_module
   to ios termianl plugin by adding additional
   regex to catch error prompt.
2018-01-19 23:50:02 +05:30
Dag Wieers
585862e4d0
ACI: Added more VMM providers, doc improvements (#34879)
* Added more VMM providers, doc improvements

This fixes #34211 and others

* Add all VMM providers to other domain-related modules
2018-01-19 18:04:30 +01:00
Christian Giese
2697c0e237 junos scp module (#31950)
* junos_scp module

This module transfers files via SCP from or to remote devices running Junos.

* fix version

* add return documentation

* updated return documentation

* docu, renamed args and exceptions
+ update docu
+ rename arg download to remote_src (simitlar to copy module)
+ exception handling for transfer errors

* add tests

* add test_junos_scp_all

* update to reorganized module utils

* fix unit tests
2018-01-19 11:07:47 -05:00
Xavier Cambar
cea681a5c0 npm module compatible with npm5 (#26582)
* npm module compatible with npm5

Uses the `--long` flag in `npm list` to get the `missing` key back.

* npm: add integration tests

* npm: test the module with npm 4 as well

* Remove debug tasks, use variables

* Use tests instead of filters

* Adds xcambar as a maintainer of the npm module
2018-01-19 15:47:43 +01:00
René Moser
386c6b4051
influxdb: add login aliases (#34599)
influxdb_user module has user_name, user_password which may confuse with existing
login arg username and password. Added aliases prefixed ith login_ to
help distinguish.
2018-01-19 14:54:42 +01:00
Kedar Kekan
719feef2e0
* Fix DCI issues and changes to action plugin & utils (#35083)
* * Fix DCI issues and changes to action plugin & utils

* * Additional check to handle cli only modules for platforms that
support netconf
2018-01-19 16:22:31 +05:30
Felix Fontein
784853da35 Accepting SANs marked as critical (fixes #32767). (#35057) 2018-01-19 04:14:33 -05:00
Felix Fontein
39a7e0a975 Extending documentation (#35077)
- Adding Let's Encrypt production ACME directory URL
- Marking examples as one big example with several alternatives for the first step
- Adding another example which uses aliases for options, and uses DNS-01 challenges
2018-01-19 03:42:44 -05:00
René Moser
1a8bbcf146
vultr: new module vr_dns_record (#34423) 2018-01-19 09:34:23 +01:00
Abhijeet Kasurde
87f2893481
VMware: Get virtual machine object using property (#33525)
This fixes get_vm method to use propertyCollector which
can efficiently find the virtual machine from given VMware
infrastructure using only name.

* VMware: Refactor vmware_guest module
* Add nested paths of datacenter
* Add tchernomax suggestions

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-19 09:50:20 +05:30
Jordan Borean
e5c6708d39 win_updates: added blacklist and whitelist filtering of updates (#34907)
* win_updates: added blacklist and whitelist filtering of updates

* fixed sanity issue with docs

* fix docs typos
2018-01-18 16:29:46 -08:00
nwsparks
beb0fd9b8b win_iis_webbinding: Fix bug with ipaddress * returning multiple bindings (#34721)
* win_iis_webbinding: Fix bug with ipaddress * returning multiple bindings
instead of only the ones defined as *. Address possible future issues around
hostheader * by just disallowing it. Resolves 25473. Added new test for
this case.

Removed all validation for https binding collisions due to difficulty in
validating all cases in which they could or could not collide. As a
result, also removed return values relating to certificate data.

Updated testing and docs appropriately

* win_iis_webbinding: added break to remove binding loops
2018-01-19 10:00:35 +10:00
Jordan Borean
389f4ef1fb
template: change to pass along the correct template path (#35027)
* template: change to pass along the correct template path

* standardise tmp path behaviour

* removed if condition as it should not be needed
2018-01-19 09:51:42 +10:00
tdtrask
676ce74cbf apk: Fix package dependency bugs (#34419)
Fixes: #34325, #35062
2018-01-18 17:20:14 -05:00
Matt Martz
a451613dd1
Make sure we don't try to inspect DOCUMENTATION, if the plugin doesn't have any (#35017) 2018-01-18 15:30:40 -06:00
Felix Fontein
3a4b69096f Clarifying documentation about account key being different from certificate's private key. (#35059) 2018-01-18 16:08:34 -05:00
Matt Martz
d8329e530c
failed, skipped, and unreachable all seem to be needed for various callbacks. Fixes #34716 (#34724) 2018-01-18 14:42:40 -06:00
Abhijeet Kasurde
0a86287a92 Handle facts for HP-UX 9000/785 architecture (#33333)
This fix adds support for HP-UX '9000/785' architecture.

Fixes: #31976

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-18 13:26:42 -05:00
Dag Wieers
2fd5a99989
ACI: Fix validate-module tests E322 and E323 (#35052) 2018-01-18 19:18:43 +01:00
Matt Martz
29c1d5cb5d Ensure that the become password is written on py3 in the ssh connection plugin. Fixes #34727 2018-01-18 09:32:22 -08:00
Ulf Tigerstedt
fb18338cdc Change documentation for path: in openssl_csr to match reality (#35045) 2018-01-18 09:43:05 -05:00
Seuf
9b07746ff1 New module: monitoring/grafana_datasource (#29006)
* Add monitoring/grafana_datasource module

added ds type mysql and postgres + check of parameters

* Added option max_concurrent_shard_requests for es_version >= 5.6
2018-01-18 14:02:21 +00:00
Yanis Guenane
a2b00e9b52 openssl_certificate: Ensure issuer field is set (#34982)
Ensure the Issuer field of the certificate is set when using the
selfsigned backend.

Fixes: https://github.com/ansible/ansible/issues/34963
2018-01-18 13:35:05 +00:00
Abhijeet Kasurde
cf88bfdbbf VMware: Refactor vmware_maintenancemode module (#35000)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-18 04:40:16 -05:00
Trishna Guha
8a6d699198
Enable nxapi nxos_banner test (#35033)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-01-18 11:50:15 +05:30
Abhijeet Kasurde
bf2ce55ca6
VMware: Add new module: vmware_host_config_manager (#34627)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-18 10:00:22 +05:30
Aron Szekely
943730b70c Update pamd.py to allow module path with slashes (#32197) 2018-01-18 09:57:12 +05:30
Jordan Borean
630ae01f91
win_wait_for: fix tests after attempts change (#35026) 2018-01-18 14:15:54 +10:00
Jordan Borean
f0134079e3
win_script: work when argument exceeds stdin buffer size (#33855)
* win_script: work when argument exceeds stdin buffer size

* Added test for large argument being passed
2018-01-18 11:28:33 +10:00
Christopher Warner
e6d01ff7e3 fix for ec2 module terminating instances outside of inventory -- Fixes #19427 (#26621)
* Proposed fix for issue 19427

* Use string_types and to_text for evaluation, if not on empty dict.

* if int, to_text and continue on
2018-01-17 20:15:10 -05:00
Prasad Katti
5a9562a101 Add option to toggle describe_image_attribute lookups (#34977) 2018-01-18 10:20:10 +10:00
Tim Rupp
8cc0e74448
Adds better error handling to f5 api connections (#35020)
Previously, the failure of the API connection would result
in a stack trace. This patch makes the failure capable of exiting
with fail_json
2018-01-17 16:14:35 -08:00
Matt Davis
3371b5eb03
restore format arg to azure_rm_common errmsg 2018-01-17 16:10:17 -08:00
Matt Davis
3e56883c44
zap extra format args from azure_rm_common errmsg 2018-01-17 16:00:45 -08:00
Matt Davis
68ccd5fc00
fix minimum client version checking (#35018)
* bump minimum client versions to match requirements file
* improve prescriptive error messaging to match current recommendations
2018-01-17 15:26:07 -08:00
Elad Alfassa
ea1361a927 modules/na_cdot_lun: properly compare LUN size (#34846)
current_size is returned from the API as string, while self.size
(the requested size) is an integer. This caused the comparison
to always be False, and a resize request to always be sent.
2018-01-17 16:32:54 -05:00
John R Barker
9a32f5c889 Add missing extends_documentation_fragment (#35013)
NXOS modules need more work, though that will all be in
module_docs_fragments/nxos.py
2018-01-17 16:31:53 -05:00
Matt Martz
b20df1be02
Make template action respect local_tmp. Fixes #34941 (#35005) 2018-01-17 14:14:46 -06:00
Jordan Borean
8edd1cf182
changed to enable windows temp path override (#34967) 2018-01-18 05:54:10 +10:00
Matt Clay
f9f6080630 Improve handling of ansible-doc sanity errors. 2018-01-17 11:41:01 -08:00
clarkst
e4f294822f [cloud] kinesis stream server side encryption - fixes #30269 (#30689)
* Moved the encryption to its own action method.

* removed silly default value for encryption type.

* Code formatting issues from pull request ANSIBOT.

* changed version_added to  "2.5"
because of new new options available

* changed version_added to  "2.5"
because of new new options available

* changed version_added to  "2.5"
because of new new options available
2018-01-17 13:23:27 -05:00
Matt Martz
2cb810544c Address missing extends_documentation_fragment (#35008)
* Address missing extends_documentation_fragment

* Document purge_aliases
2018-01-17 13:17:15 -05:00
kokel
66f654cb64 filter ipaddr: add custom delimiter option to ip4_hex(); fix format (#26862) 2018-01-17 12:49:49 -05:00
Tim Rupp
529404adc4
Removes redundant docs (#35006)
bigip_routedomain included docs that are already part of the f5
documentation fragment. This removes the redundant ones.
2018-01-17 09:42:36 -08:00
Tim Rupp
acb26758ef
Adds better cli detection for bigip_command (#34975)
The new detection includes things like provider spec. The action
plugin for bigip generally was changed, so this is a required change
2018-01-17 09:33:20 -08:00
Matt Martz
a352d43824
Compare arg+aliases between docs and argument_spec (#34809)
* compare arg+aliases between docs and argument_spec

* Add some special handling for the network modules provider options that also appear in the top level arg spec

* Fix error code for bigip_hostname

* Address merge conflicts due to changes in f5 modules

* Update validate-modules ignore based off a clean execution

* Address merge conflicts

* Address renamed module

* Address recent changes to modules

* Add ignore for ucs_ip_pool

* Update aci modules to get more reliable documentation comparison, but not mutating the module_utils aci_argument_spec

* Update ignore.txt after recent aci updates

* Add extra guard to ensure we handle provider special only for network modules

* Address additional changes to modules
2018-01-17 10:11:30 -06:00
Will Thames
8d733dbdf0 [cloud] New module cloudfront_distribution (#31284)
* added cloudfont.py, modified cloudfront_facts.py class name and fixed a minor bug

* Improvements to cloudfront_distribution

* Reduce the scope of the cloudfront_distribution module
    * Remove presigning
    * Remove streaming distribution functionality
* Add full test suite for cloudfront distribution
* Meet Ansible AWS guidelines

* Make requested changes

Fix tests

Use built-in waiter

Update copyright
2018-01-17 11:03:23 -05:00
RobReus
53266e31df Work-around for empty changesets with status FAILED being created (#34933)
* Added check to prevent failed empty changesets from being left behind

* Fixing comments from PR 34933, prevent infinte loop and stricter exception catching
2018-01-17 11:00:28 -05:00
Gert Goet
9d4d86237d Logger-process is not considered for pid and state (#34905)
Fixes #34899
2018-01-17 10:50:28 -05:00
Pilou
217ff4498c ansible-config: add simple tests (#34900)
* Revert "Fix ansible-config with python3 (#34673)"

This reverts commit 2a9daaa45b.

* ansible-config: add simple tests

* Fix ansible-config with python3

* ansible-test: don't quote "unusual" characters
2018-01-17 06:33:33 -08:00
Kedar Kekan
93acd7c651 refactor iosxr_system for cliconf and netconf (#34749)
* * refactor iosxr_system for cliconf and netconf

* * Fix unit tests and sanity issues
2018-01-17 07:29:28 -07:00
Kedar Kekan
0f692f1fe7 iosxr_user refactor for cliconf and netconf (#34892)
* * refactor iosxr_user for cliconf and netconf

(cherry picked from commit 5d0994ef598f1601fca00a0c1eff4ebb05ebbf1b)

* * Purge and units test changes
2018-01-17 07:28:58 -07:00
John R Barker
db61f8f967
Clarify which ping module to use (#34935)
* Clarify which ping module to use

Ensure each of the ping modules link to each other

ping - Requires Python on remote-node
nxos_ping - Only on Cisco NXOS
ios_ping - Only on Cisco IOS
net_ping - For network devices
win_ping - only for Windows
2018-01-17 14:02:06 +00:00
Abhijeet Kasurde
4ba7b005f5
VMware: add new module: vmware_host_ntp (#34730)
This module manages NTP configuration for given ESXi server.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-17 18:53:13 +05:30
Abhijeet Kasurde
082654894a VMware: Add ESXi hostname in fact details (#34981)
Fixes: #33972

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-17 06:57:22 -05:00
Felix Fontein
80361ce4da Making letsencrypt module work with Python 3. (#34324) 2018-01-17 05:27:12 -05:00
maorlipchuk
7190b18616 Add missing storage domain properties (#34904)
* Add additional properties to storage domains

* add warn low space for additional storage properties

* Fixing comments

1. Fixing documentation
2. Use default None
3. Remove redundant if condition
4. remove added discard since it was already added

* Apply comments #2

Fix default value to None
Use percentages instead of GB
2018-01-17 04:48:27 -05:00
Felix Fontein
1d26686b09 Secure letsencrypt account_key_content better (#34979)
* Ensure temp account key file cleanup even when module fails.

* Adding warning to documentation on pitfalls of using account_key_content.
2018-01-17 03:02:06 -05:00
saichint
3a144b290d fix for nxos_vxlan_vtep_vni issues (#34946)
* fix vxlan_vtep_vni issues

* pep8 errors
2018-01-17 11:07:29 +05:30
Matt Davis
d7fbc94758
add custom_action support to azure_rm_virtualmachine (#34970)
* Adds custom_data parameter to azure virtual machine resource

Invoke custom_data in an integration test: This invocation of
custom_data should not cause any side effects.

* Bugfix: String encoding now works in both python2 and 3

* Fix pep8 violations

* Use nginx to serve a text file created via custom_data and verify that
that custom_data is working

* fix up azure_rm_virtualmachine custom_data

* tweaks #25924 
* simplify string encoding fun
* don't rely on external packages
2018-01-16 21:05:35 -08:00
Tim Rupp
e9b52aca64
Minor bigip fixes (#34971)
Updating docs in modules. fixing imports
2018-01-16 21:02:33 -08:00
Stéphane Travassac
8f80e6a302 VMware: basic files operations networkless (#33261)
This module adds ability manage file operations with vmware guest using vmware tools.
2018-01-17 09:48:12 +05:30
Jordan Borean
6f9f337a67
standardise the powershell FileUtils (#34969) 2018-01-17 14:16:34 +10:00
Tim Rupp
944ae47701
Detects errors in bigip_config (#34965)
There are changes that the merge config can fail, but the module
will still report success. This adds a blob of code to start
collecting those failures and bubbling up a module failure
accordingly.
2018-01-16 20:10:36 -08:00
Zim Kalinowski
b0625caa5a adding azure_rm_mysqldatabase (#33567)
* adding azure_rm_mysqldatabase

* updates to azure_rm_mysqldatabase

* updates to azure_rm_mysqldatabase

* updates to azure_rm_mysqldatabase

* updates to azure_rm_mysqldatabase

* updates to azure_rm_mysqldatabase

* updates to azure_rm_mysqldatabase

* Updated docs around force_update
2018-01-17 13:17:13 +10:00
Zim Kalinowski
eee29be115 adding azure_rm_postgresqldatabase (#33568)
* adding azure_rm_postgresqldatabase

* updates to azure_rm_postgresqldatabase

* updates to azure_rm_postgresqldatabase

* updates to azure_rm_postgresqldatabase

* updates to azure_rm_postgresqldatabase

* updates to azure_rm_postgresqldatabase

* updates to azure_rm_postgresqldatabase

* Updated docs around force_update
2018-01-17 13:16:27 +10:00
Will Thames
8e48793654 Speed up ec2_ami_facts and handle permissions issue (#34385)
* describe_images is very slow if not filtered to owner accounts
  *or* if the Owners parameter is passed (unless the Owners parameter
  is `self`). Convert Owners parameters to `owner-id` and `owner-alias`
  filters where possible. Tests with CLI show that `--owners self` is
  fast, `--owners 123456789012` is slow (with or without owner-id filter).

* describe_image_attributes fails against accounts other than your
  own. Launch permissions are useful information, but not critical.
2018-01-16 21:33:33 -05:00
Zim Kalinowski
7d05a86bbc [new module] Add Azure Container Instance support - cloud/azure/azure_rm_containerinstance (#32025)
* first dirty container instance

* added my name ;-)

* more updates

* more updates

* removed unnecessary stuff

* container instance updates

* several fixes

* undo changes in common

* removed unnecessary references, fixed delete

* added / updated parameters

* updated samples & comments

* updated docs, comments, samples and added registry credentials

* added ip address and port

* query existing container instance (but result not used yet)

* some major changes to the module

* more fixes

* added requirement for containerinstance module

* adding integration test

* fixes for pull request

* updated version

* updated version to 2.5

* updated version

* updated integration.cloud.azure.txt as requested by test framework

* removed due to merge reasons

* updated requirements-azure.txt

* undone azure-rm-common

* lf

* properly update test requirements

* first dirty container instance

* container instance updates

* several fixes

* review related updates

* review related fixes

* undo changes in common

* added / updated parameters

* query existing container instance (but result not used yet)

* updated version to 2.5

* updated version

* removed due to merge reasons

* updated requirements-azure.txt

* undone azure-rm-common

* properly update test requirements

* minor fix - sanity

* fix one issue after rebasing

* removed files accidentally added while rebasing

* removed checking for changes

* several fixes

* fixed sanity

* updates as requested by reviewers

* removed ci as it doesn't work

* reenabled ci

* renamed container instance, removed required: false

* removed default: null

* final updates according to the review

* one more fix

* first dirty container instance

* added my name ;-)

* more updates

* more updates

* removed unnecessary stuff

* container instance updates

* several fixes

* undo changes in common

* removed unnecessary references, fixed delete

* added / updated parameters

* updated samples & comments

* updated docs, comments, samples and added registry credentials

* added ip address and port

* query existing container instance (but result not used yet)

* some major changes to the module

* more fixes

* adding integration test

* fixes for pull request

* updated version

* updated version to 2.5

* updated version

* updated integration.cloud.azure.txt as requested by test framework

* removed due to merge reasons

* updated requirements-azure.txt

* undone azure-rm-common

* lf

* properly update test requirements

* review related updates

* first dirty container instance

* container instance updates

* several fixes

* review related fixes

* undo changes in common

* added / updated parameters

* query existing container instance (but result not used yet)

* updated version to 2.5

* updated version

* removed due to merge reasons

* updated requirements-azure.txt

* undone azure-rm-common

* properly update test requirements

* minor fix - sanity

* fix one issue after rebasing

* removed files accidentally added while rebasing

* removed checking for changes

* several fixes

* fixed sanity

* updates as requested by reviewers

* removed ci as it doesn't work

* reenabled ci

* renamed container instance, removed required: false

* removed default: null

* final updates according to the review

* one more fix

* changed location as default from resource group can't handle containers

* updates to container instance

* fixed mistakes during merge

* one more fix

* another mistake

* container instance fixes

* several fixes to container instance

* return value fix

* minor update

* just one api version right now

* fixed api version

* container instance does not suppurt api version

* removed unnecessary try blocks

* removed tags related things

* fixed pep8

* final fixes?

* final updates to the module

* more fixes
2018-01-17 10:05:45 +10:00