Commit graph

20539 commits

Author SHA1 Message Date
Grigory Starinkin
2d98a2de68 fix python3 compatibility for znode module
kazoo client requires bytes and not string
2018-03-05 12:00:46 -08:00
David Newswanger
905b3e2f65
fix NIOS DNS lookup example (#36737) 2018-03-05 13:52:02 -05:00
msven
a2b3120e85 ec2_asg: fix #28087 and #35993 (#36679)
Fixes #35993 - Changes to update_size in commit eb4cc31 made it so
the group dict passed into update_size was not modified. As a result,
the 'replace' call does not see an updated min_size like it previously
did and doesn't pause to wait for any new instances to spin up. Instead,
it moves straight into terminating old instances. Fix is to add batch_size
to min_size when calling wait_for_new_inst.

Fixes #28087 - Make replace_all_instances and replace_instances behave
exactly the same by setting replace_instances = current list of instances
when replace_all_instances used. Root cause of issue was that without lc_check
terminate_batch will terminate all instances passed to it and after updating
the asg size we were querying the asg again for the list of instances - so terminate batch
saw the list including new ones just spun up.

When creating new asg with replace_all_instances: yes and lc_check: false
the instances that are initially created are then subsequently replaced.
This change makes it so replace only occurs if the asg already existed.

Add integration tests for #28087 and #35993.
2018-03-05 11:47:31 -05:00
Mike Klebolt
ce416f247f Fixes commit a28eb94, which broke validate_certs = False for python < 2.7.9 (#34887) 2018-03-05 11:34:03 -05:00
Guillaume Coré
daeec920b0 ini_file: add allow_no_value param (#24442) 2018-03-05 17:05:41 +01:00
Mikhail Naletov
7d0e1f92f4 [terraform] Support initializing modules and providers at runtime (#36996)
* Fixes #36994

Added function for force initializing modules and providers

Added type for force_init parameter
2018-03-05 11:01:53 -05:00
Nathaniel Case
7016b3b9ca
ios_static_route idempotence fix (#35912)
* Remove default admin_distance and fix the idempotence thereof

Fixes #33290

* Fix tests and use yaml anchors to shorten tests

* Add test for undefined admin_distance

* Read config from `show run` if `show ip static route` fails

* Restore flags to ios.get_config &  use get_config where appropriate
2018-03-05 09:28:37 -05:00
Nathaniel Case
0feea66988
Move _start_connection() to module_utils/connection and fix Popen() call (#36249)
* Fix Popen() call to use ansible python

* Remove PATH searching, reuse location of ansible instead
2018-03-05 09:12:01 -05:00
Peter Sprygada
6cbc69447b adds fix for terminal plugins 2018-03-05 08:54:40 -05:00
Peter Sprygada
18d605a132 ugh q 2018-03-05 08:54:40 -05:00
Peter Sprygada
d1ff03e84c fixes cliconf and netconf plugin loaders
This change updates the configuration and plugin loader objects for
cliconf and netconf to pull be able to configure where to find the
plugins.
2018-03-05 08:54:40 -05:00
abirami-n
4021194532 Fix_regex (#36569) 2018-03-05 06:30:37 -05:00
René Moser
6578403288
cs_zone_facts: implement return facts as ansible returns (#36993) 2018-03-05 11:42:38 +01:00
Abhijeet Kasurde
d1eb4fe58c
VMware: Refactor vmware_target_canonical_facts (#36964)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-04 10:20:47 +05:30
Abhijeet Kasurde
e0945900df
New module: digital_ocean_snapshot_facts (#35897)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-04 10:19:58 +05:30
John Smith
8824a8fe23 Assume firewall is offline on DBUS_ERROR during init (#36486)
During init, the FirewallClient tries to connect to the DBUS socket.  If it
fails to connect it should be safe to assume firewalld is offline.
2018-03-03 21:59:10 -06:00
Patrick Marques
83aaa8137a Fix Base64 decode TypeError (#36968)
```
TypeError: expected bytes-like object, not str
```
2018-03-03 16:33:07 -05:00
Abhijeet Kasurde
b973fff276
New module: digital_ocean_load_balancer_facts (#36966)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-03 21:55:54 +05:30
Abhijeet Kasurde
3ead89e3c5
New module: digital_ocean_tag_facts (#36965)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-03 21:55:21 +05:30
Will Thames
aa1e491244 [cloud aws_s3] Enforce required parameters for the various aws_s3 modes (#36767)
[cloud aws_s3] Most modes require `object` parameter, and this is easy to
get wrong (e.g. through confusion with the `dest` parameter). As
it's as easy to enforce, let's do that.
2018-03-02 16:33:04 -05:00
Will Thames
836d7a42a4 Remove old boto documentation and promote AnsibleAWSModule (#36763)
There should no longer be a need for boto documentation - it
just adds significant extra clutter to the guidelines.

AnsibleAWSModule greatly improves the codebase to such an extent
that we should mandate it for new code unless there is a
documented good reason.
2018-03-02 14:03:12 -05:00
Abhijeet Kasurde
3a161fa157
VMware: new module : vmware_datastore_maintenancemode (#36436)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-02 23:35:53 +05:30
Ryan Brown
2f72d082c0 Use Tower v2 API when available, falling back to v1 where necessary (#36663)
* Use Tower v2 API when available, falling back to v1 where necessary
2018-03-02 11:31:53 -05:00
Kevin Breit
a3390b63fe Reversed orser of icmp_type and icmp_code per bug 36378 (#36380) 2018-03-02 16:09:32 +01:00
Trishna Guha
ef7f3fcab6
eos_static_route fix (#36903)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-02 08:50:27 +05:30
Ed Costello
07bc98f019 Additions to AWS Module Guidlines from Pull Request Feedback (#36834)
* Update doc of AnsibleAWSModule to remove incorrect connect example.

Current example uses aws_connect method which no longer exists. Replace
this with the client and resource methods that do exist.

Also remove try/except block in connect example as guidelines imply that
there aren't connection errors thrown on connection, just when later
sing the connection.

* Update AWS module guidelines to include the AnsibleAWSModule connection methods.

* Add information on integration testing to the AWS module guidelines.

* Add information on common documentation fragments to AWS module
Guidelines.

* Changes as requested on PR.

* Restructure connection section to start with current best practice
* Explain the use of the CI build groups
* Use YAML Anchors for aws credentials example

* Replace guidance on use of test groups with link to aliases file.

This achieves the goal of explaining why this file is necessary without
introducing overhead of keeping documentation up to date when test
groups change.
2018-03-02 11:40:01 +10:00
Dag Wieers
858d10a91a
Clean up VMware BOTMETA and author/license info (#36873)
* Clean up vmware BOTMETA

This removes everything that's already part of the module docs. So
basically the BOTMETA file only extends the information from the module.

* Updated author information and copyright statement
2018-03-02 01:07:17 +01:00
Sloane Hertel
9deef5626f Only create tags if tags are provided (#36921) 2018-03-01 15:30:08 -05:00
Ryan Petrello
0e7106b106 properly pass /api/v1/ credential fields for older Towers (#36917) 2018-03-01 15:22:29 -05:00
Mikhail Naletov
7ade607525 Add variables and variable_file in terraform module (#36879)
* Fixes #36837

Added terraform variables for validate command

* Fixes #36837

Changed method from append to extend.
2018-03-01 12:50:49 -05:00
Ganesh Nalawade
b12e90311f
map network_os to ncclient device_params (#36819)
* map network_os to ncclient device_params

Fixes #36786

* update device map

* Add default netconf fallback plugin
2018-03-01 22:23:14 +05:30
Ryan Petrello
a82043939b properly detect the absence of credential_type in older tower-cli (#36908) 2018-03-01 10:36:18 -05:00
Chris Houseknecht
ac11027d58
Convert key to snake. Fixes #36845. (#36887) (#36904) 2018-03-01 10:03:32 -05:00
Pierrick Caillon
808f45db55 Allow configuration of manual mac address (#35504) 2018-03-01 20:24:40 +05:30
Kevin M. Gallagher
3a6f0fbb9c Allow inversion of uid_owner match in iptables module (#36073)
Fixes #20747 and updates documentation for uid_owner in iptables.py
2018-03-01 12:24:02 +00:00
Shawn Q Jackson
9db509db80 corrected typo in documentation examples (#36894) 2018-03-01 08:55:28 +01:00
Ganesh Nalawade
41d75783b5
Fix junos_command py3 related issues (#36782)
Fixes #36204

*  tostring() input string shoulb be in byte string format
*  to_ele() input is required in unicode format
2018-03-01 12:09:11 +05:30
Trishna Guha
2fbfce06e7
Fix nxos_interface multiple issues (#36827)
* fix interface_type

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix setting mtu, doc for state check param, doc for params applicable for ethernet intf

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* speed idempotence and add unittest

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fabric_forwarding_anycast_gateway applicable for svi type intf only

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix speed

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-01 10:56:16 +05:30
ABond
e2615308f9 Include Digital Ocean Token Alias (#36810) 2018-03-01 09:56:53 +05:30
Abhijeet Kasurde
0694aca2a0
VMware: refactor configure disk logic (#36617)
This fix corrects logic related to disk parameters.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-01 09:36:54 +05:30
Brian Coca
809106ba77 fix unixy when debug's msg is not text (#36882)
fixes #36850
2018-03-01 09:23:39 +10:00
Pilou
274a4b0688 gitlab_project: don't ignore errors (#36702)
* gitlab_project: check that errors are reported

* gitlab_project: report encountered errors

Fix #36495
2018-02-28 23:22:47 +01:00
Jordan Borean
c3a805aa3c minor wording changes to remove ambiguity 2018-02-28 16:47:41 -05:00
Michael Gajda
45e7689335 Fix lineinfile example
The examples comment said 'Add a line to a file if it does not exist, without passing regexp' which suggests, that the file is being created. But the default for 'create' is false. Thus the example lacked this option.
2018-02-28 16:47:41 -05:00
Yanis Guenane
6633eaa2c1 crypto: Fix incorrect type for privatekey_passphrase (#36868)
Fix incorrect type for privatekey_passphrase path -> str
2018-02-28 17:19:22 +01:00
Abhijeet Kasurde
529bc0edc6
New module: digital_ocean_size_facts (#35898)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-28 20:11:53 +05:30
mikedlr
3f19ef680a aws_ssm_parameter_store module - value parameter should be no_log since it's often a secret (#36843) 2018-02-28 14:40:58 +00:00
Gaurav Rastogi
60e39b9718 Updated the documentation of modules to match argspec including the type setting for bool parameters (#36821) 2018-02-28 14:38:03 +00:00
Ondra Machacek
365220bea5 ovirt_vms: Fix NoneType in placement policy check (#36775)
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1549082
2018-02-28 08:05:58 -05:00
maorlipchuk
5859c102ee Add documentation for import FCP storage domain (#36780)
FCP storage domain task, does not need to contain port or address
since the storage domain is already on the Host.
Added an example for FCP import.
2018-02-28 08:05:48 -05:00
Ondra Machacek
a0db015454 ovirt_host_networks: Fix removing the label (#36783) 2018-02-28 08:05:32 -05:00
Ondra Machacek
d1214484e6 ovirt_vms: Fix boot devices idempotence (#36833) 2018-02-28 08:04:28 -05:00
Claes Nästén
042c111563 nso_config break cycles in dependency sorting (#36828)
False assumption that values can not have cyclic dependencies. Fix by
removing dependency on self and look for cycles, if found remove
dependency to get a partial sort done.
2018-02-28 11:16:49 +00:00
Ed Costello
645952c139 Add aws_caller_facts module and use it in setup-iam.yml (#36683)
* Add aws_caller_facts module and use it in setup-iam.yml

This removes the dependency on having the command line AWS tools
installed.
2018-02-28 16:30:34 +10:00
saichint
db43fe6a76 nxos_facts fix and integration tests (#36796)
* fix nxos_facts ipv6 error

* time_range not supported for N35
2018-02-28 10:45:50 +05:30
Abhijeet Kasurde
8d49bb6eee
VMware: new module: vmware_host_capability_facts (#36497)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-28 09:54:52 +05:30
Dag Wieers
398b3a4d76
ACI: Parameter username is not required (#36817) 2018-02-28 05:07:56 +01:00
Dag Wieers
68b39f7a84
Parameter method is not required (#36816) 2018-02-28 04:56:16 +01:00
Simon Dodsley
5b5a79917d Fix author string in documentation section (#36798) 2018-02-27 20:25:24 +00:00
Simon Dodsley
3240fee9fd Add Pure Storage FlashBlade Snapshot module (#32505) 2018-02-27 20:07:34 +00:00
Claes Nästén
e75989ec88 nso_config work around ordering issues (#36774)
Include dependencies when sorting entries to avoid issues with certain
versions of NSO.
2018-02-27 15:22:57 +00:00
Chandra Shekar Rangavajjula
52627f3fa0 Added extra choice floppy for bootdev option in ipmi_boot module (#36174) 2018-02-27 15:18:55 +00:00
Julien Vey
57f01c63e9 Add missing import keyword into snippet in Guidelines
PR #36779
2018-02-27 15:22:00 +01:00
Abhijeet Kasurde
443327f665
New module: digital_ocean_region_facts (#35911)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-27 19:24:29 +05:30
nwsparks
e15a903bdf Win lineinfile fix (#35100)
* win_lineinfile: fix #33858. Removed conversion from \r\n

* win_lineinfile: added test for #33858

* win_lineinfile: added documentation and more tests for change

* win_lineinfile: fixed wrong hash in testing
2018-02-26 19:34:44 -05:00
Alex Ratner
c2feab0606 fix plugin-to-doc naming mismatch, typos, grammar (#36366) 2018-02-26 14:25:28 -08:00
Giovanni Sciortino
602f059875 Add atomic_move in ini_file module
Fixes #34181
2018-02-26 10:53:40 -08:00
Ryan Petrello
641f8b4ef6 tower cred: support credential kind/type for /api/v1/ and /api/v2/ (#36662)
older versions of Tower (3.1) don't have a concept of CredentialTypes
(this was introduced in Tower 3.2).  This change detects older versions
of pre-3.2 tower-cli that *only* support the deprecated `kind`
attribute.
2018-02-26 13:12:54 -05:00
Peter Sprygada
fb6a8c0133
fix cliconf get_config method to match base signature (#36682)
This commit fixes up the get_config method to match the minimum method
signature as defined by the base class.  Without this patch, the
get_config method calls will fail in some cirumstances.
2018-02-26 10:56:22 -05:00
Michael Scherer
eb162bdf7f Add space between arguments for acme-tiny (#36739)
Currently, the module fail with a error saying that --acme-dir is mandatory.
Looking at the commandline:

    /usr/sbin/acme-tiny --chain --account-key /srv/letsencrypt/acme_key/acme.key
    --csr /srv/letsencrypt/nginx_certs/www.example.org.csr--acme-dir /srv/letsencrypt/webroot",

We can see that the space before --acme-dir is missing.
2018-02-26 09:15:17 -05:00
Joni Salmi
ff0f6286d7 Docker service update project_name doc (#36713)
```
FAILED! => {"changed": false, "msg": "Parameter error - project_name required when providing definition."}
```
2018-02-26 08:25:50 -05:00
Claes Nästén
2789cc5c09 NSO ValueBuilder improvements. 4.5 leaf-list compatability. (#36583)
Fix issues in ValueBuilder used in nso_config and nso_verify so that it
can handle leaf-list in NSO 4.5 and detect identityref types from
unions.

Fail gracefully if a type is not found.
2018-02-26 13:18:20 +00:00
Mário Santos
8b52006d5c Fix sanity checks in OpenStack docs fragment (#36722)
* Fix sanity checks in OpenStack docs fragment

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>
2018-02-26 13:05:53 +00:00
Peter Sprygada
93b795baf0
allows ib_spec attrs to be filtered in update (#36673)
* allows ib_spec attrs to be filtered in update

This change will allow the ib_spec entries to be be filtered on a change
object by setting the update keyword to false.  The default value for
update is true.  When the update keyword is set to false, the keyed
entry will be removed from the update object before it is sent to the
api endpoint.

fixes #36563

* fix up pep8 issues
2018-02-26 07:55:26 -05:00
René Moser
cdb2969703
cs_sshkeypair: fix ssh key rename (#36726)
* tests: cs_sshkeypair: add reproducer for failed key rename

* cs_sshkeypair: fix rename ssh key
2018-02-26 13:43:40 +01:00
Abhijeet Kasurde
581a0637ba
DigitalOcean: new module: digital_ocean_volume_facts (#36004)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-26 16:15:15 +05:30
Abhijeet Kasurde
4c20d16549
DigitalOcean: new module: digital_ocean_account_facts (#36003)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-26 14:11:26 +05:30
Abhijeet Kasurde
d94a1ef4cc
VMware: refactor vmware_datastore_facts (#36423)
This fix adds datastore cluster details about datastore in returning
facts. Updated documentation and tests.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-26 13:23:22 +05:30
Abhijeet Kasurde
435649274b
VMware: Hardware version support (#36562)
This fix adds support for specifying hardware version for
virtual machine.

Fixes: #35831

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-26 13:21:43 +05:30
Trishna Guha
44332bda78
fix nxos_vlan aggregate (#36710)
* fix nxos_vlan aggregate

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-26 12:29:49 +05:30
Trishna Guha
d6912cf40e
nxos_linkagg fix (#36706)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-26 11:21:51 +05:30
Ganesh Nalawade
5a6b893240
Decouple config and state check in vlan and vrf network modules (#36386)
* Decouple config and state check in {network_os }_vlan and { network_os }_vrf modules

Fixes #35567
Fixes #34754

`interfaces` option is used for configuration as well as operational state
check. If interface is configured to given vlan or vrf but if
operational state of interface is disabled it results in module failure.

Fix is to decouple same option usage for config and state.
With this fix `interfaces` is used as config option and a new
option named `associated_interfaces` will be used for intent check
for assigned interfaces.

* Fix CI failures

* Fix review comment

* Fixed integration test failure
2018-02-26 09:23:54 +05:30
Dag Wieers
8f6eea50db
More improvements to ACI module docs (#36689)
* More improvements to ACI module docs

* Asorted improvements

* Found 2 more

* Improvements to aci_rest documentation
2018-02-25 19:13:16 +01:00
Dag Wieers
07e8fb5dbb
Windows: Clean up documentation (#36684)
This PR includes:
- Further cleanup of BOTMETA.yml
- Cleanup of author github handles
- Use of proper booleans
- One-line license statement
- Copyright format statement
- Smaller cleanups
2018-02-25 03:09:54 +01:00
Dag Wieers
97fde8c760
ACI: Asorted fixes to documentation (#36681) 2018-02-24 22:50:54 +01:00
Dag Wieers
665f5b4e9c
ACI: Improve module index short_description (#36665) 2018-02-24 01:27:37 +01:00
Dag Wieers
7da7ba79bc Add anchors to some guides and all module categories (#36642)
* Add anchors to some guides and all module categories

This is required if we want to use *absolute* :ref: references instead of *relative* :doc: references.

* Update the Cisco ACI Guide reference

* Add `aci_guide` anchor

* Add `network_guide` anchor

* Add category anchor

* Improve readability

* Fix small typo
2018-02-23 17:10:47 -06:00
Ed Costello
2a0c7c4331 Fix documentation of validate_certificates option in aws doc_fragment.
Unignore sanity test failures for AWS modules caused by this common
fragment.
2018-02-23 13:21:44 -08:00
Brian Coca
2f13ddbd69
debug should have item (#36534)
* debug should have item

* item should only be present when var
2018-02-23 15:12:14 -05:00
Brian Coca
ef40e5e3b2 protect against plugins using verify incorrectly
assume false on any errors
2018-02-23 15:11:01 -05:00
Ryan Petrello
8a41233202 tower cred: update kind options in documentation 2018-02-23 10:49:07 -05:00
Ryan Petrello
cd6855275e tower cred: filter user name lookup by the proper key 2018-02-23 10:49:07 -05:00
Ryan Petrello
9cb4b70e27 tower cred: implement credential /api/v1/ kind compatability 2018-02-23 10:49:07 -05:00
Thierry Bouvet
640749d54f Fix credentials for Tower API V2 2018-02-23 10:49:07 -05:00
Gittins
a1241d99ee Updated examples aci_contract_subject_to_filter.py (#36626)
Changed examples to reference the correct module name. Previously the examples used "aci_subject_filter_binding".
2018-02-23 13:00:26 +01:00
Pilou
07927f52ae filesystem: fix documentation (#36556) 2018-02-23 10:59:38 +00:00
Martin Krizek
a79a5439c8
yum: fix yum version comparison (#36573) 2018-02-23 08:55:11 +01:00
Bruno
a7db945ac6 aci example minor fix testing actual real life scenario examples (#36613) 2018-02-23 03:04:40 +01:00
Bruno
68a97ca558 added additional examples for aci modules (#36612)
* added additional examples for aci modules

* small fix on aci_fabric_node

* removing jina2 for clarity
2018-02-23 02:39:58 +01:00
Julien Vey
d212bcf1e7 ec2_group:documentation explicit a behaviour for sg rules (#36586) 2018-02-23 09:24:25 +10:00
Chris Houseknecht
4a8b4bb8a8
Bump OpenShift client req to 0.4.3. Fixes openshift_scale. (#36601) 2018-02-22 16:31:47 -05:00
Simon Dodsley
b96ab46566 Initial commit for Pure Storage FlashBlade module (#32467) 2018-02-22 15:33:48 -05:00
Sloane Hertel
73fd593d45
aws_ec2 inv plugin: remove extra call to verify_file (#36588)
* Remove extra call to verify_file

* Allow next inventory plugin to be tried if the file isn't verified
2018-02-22 12:10:47 -05:00
Richlv
0e0d6cf4f2 Update zabbix_maintenance.py (#36123)
clarify that removal happens by name - while expected, it's good to be explicit
2018-02-22 10:46:04 -05:00
gratuxri
d31d981aa5 Updated vmware URL for guest_ids (#36511) 2018-02-22 12:17:11 +05:30
Matt Martz
a4df4d33ac Fix types when evaluating interpreter (#36541)
* Fix types when evaluating interpreter. Fixes #36536
* Rename variables that contain bytes to b_*
* Get rid of to_text() and to_bytes() calls that do nothing (because the
  data is already the proper type)
2018-02-21 18:03:16 -08:00
Jordan Borean
ef4f8851dc
win_feature: better error handling to make it easier to debug issues (#36491)
* win_feature: better error handling to make it easier to debug issues

* removed ignroed pslint rules that are no longer needed
2018-02-22 11:33:48 +10:00
Julien Vey
3abaa43b1c efs: improve documentation about the update of an efs (#36473) 2018-02-22 10:30:50 +10:00
Dag Wieers
a655bdb72e
Add missing copyright notice
I did a large part of the unzip implementation and gtar functionality.
2018-02-22 01:23:53 +01:00
Sam Doran
723daf3e3a
Check for regexp match when using insertbefore or insertafter (#36474)
Add tests to cover this scenario
Fixes #36156
2018-02-21 17:03:38 -05:00
Sloane Hertel
4d4553bbb0 [cloud] catch NoCredentialsError in boto3_conn (#36537) 2018-02-21 16:39:01 -05:00
Bruno
31bd214682 minor fix to exit_json for aci_static_binding_to_epg.py (#36540)
* minor fix to exit_json for aci_static_binding_to_epg.py

* The aci.exit_json() call doesn't need arguments
2018-02-21 21:17:41 +01:00
Julien Vey
a77b89e7b5 [cloud] ec2_group: fix check mode when using tags (#36503)
Fixes #36412
2018-02-21 14:48:51 -05:00
Toshio Kuratomi
03a6d72633 Revert "remove query/q (#36315)"
This reverts commit b47d2e07e1.

query is a feature for 2.5.  We're not reverting it now.
2018-02-21 10:37:51 -08:00
Dag Wieers
7435e115e0
ACI: Various changes to module documentation and guide (#36516)
* ACI: Various changes to module documentation and guide

This PR includes:
- We moved the object class information to the notes
- Add version information to guide chapters
- Add generic note to modules with reference to ACI guide
- Reference known issues in aci_rest documentation
- Remove module_utils function docs from modules
- Indicate which parameters are not required for querying all objects
- Added missing RETURN information

* Fix copyright strings

* Remove aci_domain_to_encap_pool.py for v2.5

* More updates

* PEP8 fix

* Improve listings of parameters/return values
2018-02-21 19:35:59 +01:00
Simon Dodsley
7ce1d49c55 Add new purefa_pgsnap module
Supplies the ability to create and destroy FlashArray
protection groups.
2018-02-21 10:01:29 -08:00
Matt Martz
10fefc7156
Re-use logic from StrategyBase._load_included_file in StrategyModule.run for free and linear (#36470)
This improves include_role performance and recursion limits
2018-02-21 09:53:15 -06:00
tgates81
7a55fe99ef find.py module: Added depth: option to specify how many level deep to… (#36205)
* find.py module: Added depth: option to specify how many level deep to traverse directories.

* find.py module: depth: added correct version_added value.

* find.py module: depth: Default value is None.
2018-02-21 10:51:26 -05:00
Brian Coca
b47d2e07e1
remove query/q (#36315)
* remove query/q

remove and fixed tests for removed func

* paren fix
2018-02-21 10:42:54 -05:00
John R Barker
5d0ed38e3a
Fixup VMware module docs issues (#36409)
Fix various argspec vs documentation issue
2018-02-21 15:20:42 +00:00
James Tanner
d1f76939e5 Do not cache the loop item label so that it will update with each item 2018-02-21 10:02:03 -05:00
Ed Costello
ca59a4ede4 Better handling of absent AWS SES identity notification information. (#36354)
* Better handling of absent AWS SES identity notification information.

Fixes #36065

aws_ses_identity module now handles the cases where information about
the notification setup for the identity isn't returned by the AWS api.

This seems to happen in an edge case, believed to be eventual
consistency on registering new identities. So this case is treated
as if has been no notification setup for the identity yet.

Also fix 2 flake8 warnings in the module, a missing newline and unused
import.

* Increase the Boto Retries on SES APIs to deal with throttling.

This should address the unstable integration test failing due to
parallel runs in shippable hitting AWS throttling.

* Add retries loading SES details for inclusion in successful response.

There seems to be an eventual consistency behaviour with identity
registration. It's possible to still get no identity back after
registration.

This can cause failures in the shippable builds. This should fix that by
creating a retry of retrieving the identity information after
registration.

A similar retry loop has been added to notification attributes to ensure
this doesn't suffer from the same failure.

* Add missing sleep in get_notification_attributes to avoid busy loop.
2018-02-21 09:33:33 -05:00
Sam Doran
5e7ee9df0a Add note to use script module rather than inline here documents (#32863)
* Add example on how to use a here document with shell module

* Remove here doc example and add note to use script module instead
2018-02-21 09:12:09 -05:00
Sloane Hertel
710db04ebd [ec2_vpc_net_facts] Fix UnsupportedOperation for regions other than u… (#35302)
* [ec2_vpc_net_facts] Fix UnsupportedOperation for regions other than us-east-1

* Make fix more Pythonic

* Fix the exception handling for the module
2018-02-21 09:11:36 -05:00
Trishna Guha
713828804d
nxos_vrf fix (#36494)
* nxos_vrf fix

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Address review

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-21 19:33:33 +05:30
Leigh Jenkin
e224039586 Fixes #12353 #20977 adds new option to galaxy cli to preserve scm meta (#34642) 2018-02-21 08:34:44 -05:00
Sloane Hertel
f7d79d4789 [cloud] Retry WAF actions on WAFStaleDataException (#36405)
Add a util to run functions with AWSRetry to retry on WAFStaleDataExceptions and update ChangeToken for each attempt
2018-02-21 08:14:17 -05:00
Trishna Guha
9598978e12
fix nxos_pim module doc (#36505)
* fix nxos_pim module doc

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* address review
2018-02-21 18:42:37 +05:30
mikedlr
52f2057472 aws ssm parameter lookup - change to return Nones for missing variables (#36456)
* aws ssm parameter lookup - change to return Nones for missing variables

* aws ssm parameter lookup - fix error case message to dump response

* aws ssm parameter lookup - fix integration test cases
2018-02-21 06:50:00 -05:00
Jim Gu
b6d4fa1c96 Wait for VM state to reach poweredoff when state: shutdownguest (#31669)
This change adds the optional wait_for_state_change argument to the
vmware_guest, vmware_guest_powerstate module, which allows for module
completion to be blocked when using the shutdownguest state until the
VM has reached the poweredoff state.

Fixes: #28498

Signed-off-by: Jim Gu <heming.gu@mercurygate.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-21 17:14:12 +05:30
Jordan Borean
df8a5d7a4f
fetch: set fail_on_missing: True as default as per docs (#36469)
* fetch: set fail_on_missing: True as default as per docs

* Updated docs for fetch to say behaviour was changed in 2.5 and updated tests
2018-02-21 18:10:23 +10:00
Trishna Guha
d5858bbcbe
fail module when config is invalid and jsonrpc doesn't return error (#36482)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-21 12:36:10 +05:30
goshkis
abb956d9eb vApp properties support (#32579)
* Adding support for vApp properties.
* vm specification updated only if changes have to be applied. I.e. subsequent updates with the same data will not trigger changed state
* Auxiliary variables renamed, hope this makes the code more readable
* Integration tests changed - re-adding the same properties test not implemented, but tested on real vCenter deployment
* fixing documentation "version_added" for the feature
* Addressing reviewers comments #2:
* documentation updated with the only meaningful value for "option" attribute - "remove"
* Fixed improperly handled case when user requested "add" operation for existent property
* vApp configuration is updated only with properties that contains changes, not with all properties requested by user
2018-02-21 11:59:13 +05:30
Lindsay Hill
f207897f32 fixed conditional error message (#36476) 2018-02-21 11:44:18 +05:30
Abhijeet Kasurde
77b903bd85
VMware: Add missing state param in argument spec (#36339)
This fix adds missing argument parameter called 'state'
and its documentation.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-21 11:32:47 +05:30
Matt Clay
f87ec440e7 Fix PEP 8 issue. 2018-02-20 21:20:32 -08:00
Bruno
ef5e97ef5a aci_static_binding_to_epg fixes (#36478)
* aci_static_binding_to_epg fixes (documentation and logic for interface_mode)

* additional fixes after review
2018-02-21 00:09:53 -05:00
saichint
47a92386c9 fix nxos_bgp_neighbor_af issues (#36472) 2018-02-21 10:20:24 +05:30
Mike Wiebe
ef7d574920 Fix nxos_banner module for unstructured output (#36411)
* Fix nxos_banner module for unstructured output

* Refactor and bug fixes

* Fix pep8 error
2018-02-21 09:51:41 +05:30
Sam Doran
2bffcfa63b Add force option to systemd module (#35925)
* Add force option to systemd module

* Use multi-line YAML syntax in examples

* Add version_added for new option
2018-02-20 20:47:29 -05:00
Dag Wieers
5635c50f9b
aci_iplpg: Various fixes to integration tests/module (#36460) 2018-02-21 00:20:38 +01:00
René Moser
6402a3e504
cs_user: fix return user_api_secret for ACS v4.10 and later (#36447) 2018-02-20 23:08:19 +01:00
Dag Wieers
1720a210e9
aci_spvpg: Various fixes to integration tests/modules (#36458)
* aci_spvpg: Various fixes to integration tests/modules

This PR includes:
- A fix in module_utils aci.py
- Various fixes in integration tests

* Fix typo
2018-02-20 22:49:55 +01:00
Brian Coca
fdbd1297cf catch all cases of no inventory when asked to fail
fixes #36034
2018-02-20 11:59:39 -05:00
Trishna Guha
3d06ce245a
fix vyos_l3_interface adding multiple addresses to interface (#36377)
* fix vyos_l3_interface adding multiple addresses to interface

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* add test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-20 20:54:27 +05:30
Ryan Brown
66c38dd6c3 Change to longer interval jittered backoffs for efs facts (#36266)
* Change to longer interval jittered backoffs for security group fact gathering

* Add the ECS throttling error code to the list of things to retry on
2018-02-20 10:17:31 -05:00
Ryan Brown
e9c57e732f Add AWSRetry when describing VPCs to help stabilize integration tests (#36264)
* Add AWSRetry when describing VPCs to help stabilize integration tests

* Add retry on create_tags because it is possible to reach this API call before the VPC is finished creating
2018-02-20 08:56:34 -05:00
Brian Coca
a79378fccb remove extra fields from debug output
fixes #35493

updated tests
2018-02-20 08:46:05 -05:00
Brian Coca
6af5693dc2
hide uneeded fields for callbacks (#36259)
* hide uneeded fields for callbacks

fix selective instead of pushing uneeded fields to the methods

* piipii
2018-02-20 08:41:18 -05:00
Brian Coca
c119d54e4a
now get_url defaults to module temp dir (#36218)
* now get_url and other modules default to module temp dir

also fixed 'bare' exception

* allow modules to work with older versions

* updated docs per feedback
2018-02-20 08:40:45 -05:00
Deepak Agrawal
0bbea9a579
vyos_config IndexError in sanitize_config (#36375)
* Bug in del(list) logic. Say you have a list of 4 elements a[0-3]
and you have to remove index 1 and 3, if you remove index 1 first
then list is cut short a[0-2] and does not have index 3

Fix: Remove indexes in reverse sorted order e.g. 3 and 1 in above
example so that order of indexes remain preserved even after deleting

fix is to remove indexes in reverse sorted order

* Add test cases for failed case
2018-02-20 18:29:34 +05:30
Jiri Tyr
000387ac23 Fix default value of gpgcheck in doc (PR #36267) 2018-02-20 13:47:12 +01:00
Sviatoslav Sydorenko
2ce1009c04
Fix portage mod usage of jobs and load-average opt
In short, it enables portage module to emit emerge
command with --jobs and --load-average options
with and without argument.

To emit emerge with such CLI argument without
a value, the user must set the corresponding
module option to 0.

By default, if these arguments are missing from
playbook they are omitted.

Misc changes:

* Use to_native to ensure crosspython compat

* Adjust jobs and LA options to accept 0 as reset

* Add docstring to emerge_packages

* Explicitly note in doc that False will work as 0

PR  #36355 by @webknjaz
2018-02-20 13:04:10 +01:00
saichint
80d19e6af3 fix nxos_bgp_neighbor issues (#36318) 2018-02-20 10:08:17 +05:30
Dag Wieers
6534e6a450
ACI: Add missing examples to module docs (#36417)
This PR includes:
- A cleanup of documentation examples for ACI modules
- A small fix in aci_rest integration test
2018-02-20 03:27:17 +01:00
Dag Wieers
fb9af72b48
aci_aep: Add missing integration tests (#36414)
This PR includes:
- Add missing aci_aep integration tests
- Fix small aci_rest issue
2018-02-20 03:04:17 +01:00
Sloane Hertel
b39534201f [cloud] If inventory file isn't able to be parsed by aws_ec2, raise an AnsibleParserError (#36387)
* If inventory file isn't able to be parsed by aws_ec2, return an empty dict instead of None

* Raise an AnsibleParserError instead

* remove extra lines

* aws_ec2 inventory plugin - fix path matching logic
2018-02-19 17:12:56 -05:00
Toshio Kuratomi
edaeb69a35 Fix the script and patch plugins tempfile ownership
Unified tmp accidentally removed the containing tmpdir from the list of
files to fix the permissions on when we're becoming a different
unprivileged user.  This resulted in a visible bug for script but not
for patch.  This is because patch also uploads the module to the same
temporary directory and the uploaded module also ends up calling
fixup_perms2() which includes the temporary directory.  So by the time
patch needs to access the temporary patch file, the directory is
appropriately set.

script's breakage was visible because script does not upload a module
(it's akin to raw in this way).  Therefore, we only call fixup_perms2()
once in script and so leaving out the tmpdir in script means that the
containing directory never has its permissions set appropriately.

Fixing both because it does not cause an extra round trip for patch so
any speedup would be minimal and it's better to fix the perms as close
as possible to where we know we need it.  Otherwise, changes to
seemingly unrelated code later could end up breaking it.

Fixes #36398
2018-02-19 13:07:58 -08:00
Dag Wieers
3ce5261272
mail: Fix cannot concatenate 'str' and 'int' objects
Fix an error in callback plugin when exceptions are being returned on failure.
2018-02-19 20:39:25 +01:00
Richlv
4a5809f111 Update zabbix_host.py (#36127)
fix tls documentation; minor style fixes
2018-02-19 11:25:38 -05:00
Dag Wieers
79d00adc52
aci_rest: Fix error handling and improve documentation (#36295)
This PR includes:
- A fix for a recently introduced issue wrt. error handling
- Added integration tests for provoked errors
- Influence standard return values using aci library for aci_rest
- Add proxy support documentation
- Documentation update related to #34175
2018-02-19 12:01:14 +01:00
Felix Fontein
cd9d554186 Letsencrypt authz deactivation (#36362)
* Allow to deactivate authz objects. Currently only after success.

* Making sure cleanup is done even when module fails (except if fetch_url() fails).

* Make deactivate_authzs eat exceptions so that all authzs are deactivated in case of errors.
2018-02-19 05:29:31 -05:00
Jeremy Lee
99627ab99d eos_vlan: Modified logic to allow for more than 6 interfaces to be assigned to … (#35568)
* Modified logic to allow for more than 6 interfaces to be assigned to a vlan

* arista output to json.  removing logic for string size.
2018-02-19 11:22:41 +01:00
Abhijeet Kasurde
542d27eee4
VMware: Make a common API for hostsystem params (#36314)
This fix adds a common API for getting host system managed object
from either cluster name or host system.

Fixes: #36010

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-19 14:00:09 +05:30
Abhijeet Kasurde
4d18586fc9
VMware: Refactor vmware_guest_tools_wait (#36098)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-19 13:53:38 +05:30
Henri Salo
b34ab6a0c4 hashi_vault: fix typo (#36368) 2018-02-19 08:34:05 +01:00
Trishna Guha
736d6406c0
fix nxos_config json pipeline error (#36236)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-19 10:11:43 +05:30
ABond
591695932e Fix bug in DigitalOcean module_util (#36352) 2018-02-18 07:47:26 +05:30
Abhijeet Kasurde
5242914ae5
Fix digital ocean issues (#36347)
Remove module from ignore lists and some documentation fix in
digital_ocean_block_storage and digital_ocean module.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-17 22:48:52 +05:30
Abhijeet Kasurde
d74d416beb
Refactor DigitalOcean modules (#35934)
- Updated documentation fragment
- Updated Argument spec
- Use common REST class for API calls

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-17 22:00:53 +05:30
Sviatoslav Sydorenko
3a097063d9 Drop duplicate imports from apt_repository module (#36320)
* Drop duplicate imports from apt_repository module
* Drop json import from apt_repository module
2018-02-17 16:33:12 +05:30
Mike Wiebe
6e096cb0c9 Remove kickstart_image_required check (#36319) 2018-02-17 10:20:31 +05:30
rahushen
e24c547a3a Fixes for the N3500 platform that uses the A8 image (#36261)
* fix nxos_l3_interface tests as n35 doesn't support ipv6

* add terminal dont-ask to nxos_feature and nxos_lldp

* put interfaces in L2 mode for N35

* fix nxos_feature unit-tests
2018-02-17 10:16:03 +05:30
John R Barker
f77a390131
Depreciate aos (#36029)
* Deprecate Apstra's aos_* modules

These modules don't work with AOS 2.1 or higher.
They will be replaced non-upstreamed modules

* Correct list
2018-02-16 18:26:07 +00:00
Mike Wiebe
ac169f5ffd Fix structured output bug (#36193) 2018-02-16 21:34:26 +05:30
Martin Krizek
3a5263a92f facts: fix device uuid's on el6 (#36128)
* facts: fix device uuid's on el6

Fixes #36077
2018-02-16 10:52:51 -05:00
bdowling
f2818caa61 Fix None stringification call to send_command (#36254)
send_command already performs the to_bytes safely on prompts (checking
for None).  Without this check the literal 'None' became a subprompt trigger!

Fixes #35662
2018-02-16 10:37:01 -05:00
kbreit
6a3fd92654 Improved language around in_vpc parameter. (#36137) 2018-02-16 13:14:58 +00:00
ThomasADavis
f8b85bdbf3 int("255.255.255.0" does not work, fixes issue #33867 (#36271) 2018-02-16 05:49:31 -05:00
kbreit
9018c63e56 Improved language around XML description. (#36263)
* Improved language around XML description.

* Moved details on second line
2018-02-16 11:15:17 +01:00
Anwesha Chatterjee
d2ac7ace01 Add information on the various package states (#35882) 2018-02-16 14:22:49 +05:30
Abhijeet Kasurde
f59e1a6136 Misc. typos in ovirt_host_networks (#36287)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-16 02:50:34 -05:00
Dag Wieers
d86c5aee3c aci_domain_to_encap_pool: Add integration tests (#36217) 2018-02-15 23:47:39 -08:00
Abhijeet Kasurde
3ecf2d5ba2
VMware: New module: vmware_guest_snapshot_facts (#36002)
This module gathers facts about VM's snapshots.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-16 11:52:03 +05:30
Ganesh Nalawade
cb52509775
Add eos_command doc with more examples (#36245)
* Add eos_command doc with more examples

*  More examples using cli and eapi transport
*  Example on how to handle json output
*  Example on handling result output in wait_for

* Fix typo
2018-02-16 11:48:12 +05:30
Abhijeet Kasurde
55d117458a
VMware: New module: vmware_guest_disk_facts (#36026)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-16 10:46:35 +05:30
Abhijeet Kasurde
4cc7af7372
docker_login: Hide password from response (#34491)
Fixes: #32869

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-16 10:41:54 +05:30
Abhijeet Kasurde
a377302d6b
VMware: Fix DVPG idempotency issue (#35837)
This fixes, cloning operation where template or existing VM
does not have network or DVPG. Also, adds some strict type checking in
network parameters.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-16 10:32:27 +05:30
saichint
75a34f6668 fix nxos_bgp_af issues (#36147)
* fix nxos_bgp_af issues

* shippable fix

* review comments

* shippable error fix
2018-02-16 09:34:24 +05:30
Ryan Brown
53a314f767 Fix incorrect docs in ec2_tag per #35738 (#36268) 2018-02-16 13:01:02 +10:00
Dag Wieers
334e405e6f
aci_taboo_contract: Add integration tests and examples (#36276)
This PR includes:
- Missing integration tests
- Missing examples
- Two typo's in other integration tests
2018-02-16 01:59:23 +01:00
Dag Wieers
e1b5bc049c
aci_firmware_source: Add integration tests (#36246)
This PR includes:
- Rename 'protocol' parameter to 'url_protocol'
- Add limited integration tests (as we have no public firmware access)
- Add missing examples
2018-02-16 00:20:41 +01:00
Adrian Likins
810fa7046b Fix ansible-console always asking for vault passwords
ansible-console was calling setup_vault_secrets
twice. Once directly and once via _play_prereqs()

The direct invocation was not setting auto_prompt=False.

However, the direct invocation isn't need at all so
this removes it so only _play_reqs() is used.
That fixes the unrequested vault password
prompting.

Fixes #33027
2018-02-15 15:40:51 -05:00
Michael Nugent
d212ca11b3 False matches the docs and intentions of the previous developer (#35762) 2018-02-15 15:40:10 -05:00
nwgarner
fed20b825f Update ios_ping.py to allow for count > 70. (#36142)
* Update ios_ping.py to allow for count > 70.

Find 'Success...' output rather than relying on list index.  Index -1 won't pass unit test.
2018-02-15 12:07:29 -05:00
Toshio Kuratomi
06f73ad578
Normalize usage of temp and tmp on tmp (#36221)
* Normalize usage of temp and tmp on tmp
* Rename system_tmps system_tmpdirs
* Add ANSIBLE_REMOTE_TMP spelling of environment variables
2018-02-15 09:01:02 -08:00
Ryan Brown
2678508d42
[cloud] Fix inconsistent case of Allocation_id in NAT Gateway outputs (#36058) 2018-02-15 10:51:16 -05:00
Pilou
b3ce136256 vars.clean: remove unused method inject_facts (#34838)
* vars.clean: remove unused method inject_facts

Removing this unused method seems better than fixing the typo.

* Fix typo in comments
2018-02-15 07:43:44 -08:00
Nathaniel Case
f67ff4a78e
Alter ASA regexes to be byte-strings (#36176) 2018-02-15 10:11:26 -05:00
Andrew Gaffney
dae737c8b7 Only template each hostvars var on-demand (fixes #33259) 2018-02-15 10:09:04 -05:00