Commit graph

16791 commits

Author SHA1 Message Date
Brian Coca
4361659bee correctly deal with encoding in errors
fixes #26256
2017-06-30 14:40:38 -04:00
Denis Afonso
c9b00d2f02 Fixed the exception handling logic for the delete_group function. (#26109)
* Fixed he exception handling logic for the delete_group function.

fixes issue #26100

* Removed the unnecessary del_meta variables and made some other adjustments to the delete_user function
2017-06-30 14:12:50 -04:00
Abhijeet Kasurde
611fbea8ea Support quiesce, memory in vmware guest snapshot (#26275)
Fix adds support for quiesce and memory options while taking
snapshot of virtual machine. Update documentation and examples
for reflecting this change.

Fixes #26270

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-30 12:34:37 -04:00
Abhijeet Kasurde
f0a5854e39 Fix unresolved import in vmware module_utils (#25288)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-30 10:28:08 -04:00
Abhijeet Kasurde
5c374cd1ae Add Test Suite for vmware_vswitch (#26076)
Fix adds test suite for vwmare_switch

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-30 10:18:20 -04:00
Trishna Guha
93bbcd8a32 vyos_user fix idempotent (#26289)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-06-30 19:44:08 +05:30
Toshio Kuratomi
34589cee6d Unittests for extracting metadata from plugins (#26218)
* Unittests for extracting metadata from plugins
* Port plugin_docs to use the generic extract_metadata function
* Make the helper functions seek_end_of{string,dict} private
2017-06-30 06:48:32 -07:00
Will Thames
7ae4027c58 Improve ec2_vpc_subnet check mode (#23108)
check_mode should behave pretty similarly to non-check mode -
just don't actually create or delete subnets or change tags.

Using DryRun for check_mode behaves very differently and results
in the following module failure:

```
"msg": "Unable to update tags for subnet-abcd1234,
error: EC2ResponseError: 412 Precondition Failed
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<Response><Errors><Error><Code>DryRunOperation</Code>
<Message>Request would have succeeded, but DryRun flag
is set.</Message></Error></Errors>
<RequestID>12345678-abcd-1234-abcd-abcd1234abcd</RequestID></Response>"
```
2017-06-30 08:04:48 -04:00
Vinay Dandekar
c884d4ab7f Add support for EC2 dynamic data in ec2_facts (#21532)
* Add support for EC2 dynamic data in ec2_facts

- Flattens out JSON in the instance identity document and IAM info/credentials for easy access to facts
- This changes region fact from ‘ansible_ec2_placement_region’ to ’ansible_ec2_instance_identity_document_region’

* Maintain backwards compatibility by putting the region into the old key

* Improve JSON parsing logic and split security group IDs

* Add documentation, backwards compatibility, fix bug and formatting

- Update documentation for ec2_facts with return values
- Preserve JSON value from the metadata service for backwards compatibility
- Fix bug in fix_invalid_varnames
  - The keys in the dict were being modified in place; new dict now created to hold the sanitized keys
  - Consolidate two replace calls with a regex substitution
- Move imports for ec2_facts to the top

* Add support for parsing the IAM instance profile role
2017-06-30 16:27:49 +10:00
Rob
d1652aecf0 Upgrade ec2_remote_facts to use boto3 (#22937)
* Deprecate ec2_remote_facts in favor of ec2_instance_facts which uses boto3

* Update legacy-files.txt with deprecated file name change
2017-06-30 14:19:08 +10:00
Deepakkothandan
a396c18a61 composer: add param for custom PHP Executable path (#26107) 2017-06-29 23:08:30 +02:00
Sam Doran
6b49fca7e5 Clarify docs for set_stats module (#26250)
Fixes #26191
2017-06-29 13:29:12 -07:00
Mike Wiebe
240de965ee Fix nxos_acl module and add IT tests (#25966)
* Fix nxos_acl module and add IT tests

* Add nxos_acl test

* Add additional properties to test
2017-06-29 14:55:08 -04:00
Duncan Lock
6d7647be54 yum: added example for exclude parameter. (#26216)
* Added example for `exclude` parameter.

* Remove trailing whitespace
2017-06-29 11:21:49 -07:00
René Moser
363761fc16 cloudstack: cs_template: default is_routing=None, fixes template upload for users (#26248) 2017-06-29 17:43:31 +02:00
Raja
171d903d04 Fix Python3 Errors in Azure Cloud Module
When using Python3, the exec_module function errors out with a
unsupported operand type(s) for +: 'dict_keys' and 'list'
error when adding the .keys() to a static list. Use the explicit
list function to make a list of keys and then add to the ['tags'] list.
2017-06-29 08:30:26 -07:00
Nathaniel Case
3102746ebe nxos_pim_rp_address fixes (#26119)
* nxos_pim_rp_address tests

* nxos_pim_rp_address changes

* Address issues with idempotence
2017-06-29 10:22:26 -04:00
Julien Vey
7f6c7c6334 parted: Add missing LC_TYPE override for env vars (#26242) 2017-06-29 15:55:03 +02:00
Brandon Davidson
7bb3467db9 Convert ec2_vpc_subnet module to boto3 and add map_public option. (#23783) 2017-06-29 23:39:21 +10:00
Sloane Hertel
338bf0fd3f ec2_vpc_dhcp_options_facts: if tags don't exist set them to default list instead of crashing - fixes #23825 (#23967)
* if tags don't exist set them to an empty list

* dhcp_option will always have a name tag

* make requested change
2017-06-29 22:47:05 +10:00
Ondra Machacek
0154f32fbd cloud: ovirt_disks: Fix download of the qcow disk (#26179)
Fixes: #26177
2017-06-29 08:15:26 -04:00
John R Barker
1b00f4193b Move net_* modules into specific sub-topics (#26234)
As we continue to expand the number of modules we must ensure they are
sensibly grouped.
2017-06-29 13:04:33 +01:00
Ricardo Carrillo Cruz
c8ba8bdd6d Add ios_static_route module (#25527)
* Add ios_static_route module

* Add ios_static_route integration tests

* Add platform agnostic integration tests for IOS

* Replace unicode function to ansible module_utils to_text

* Add collections handling logic

* Add integration tests for collections

* Make collections and prefix mutually exclusive

* Add net_static_route integration tests for collections

* Do not store load_config return value, as it returns nothing
2017-06-29 12:05:20 +02:00
Ganesh Nalawade
911a7e085e Add active param to junos declarative modules (#26222)
*  active/deactivate configuration capability
*  integration test refactor
2017-06-29 10:18:35 +05:30
Daniel Kozlowski
dcd1ff2809 Initial commit of iam_managed_policy file (#22097)
This module can add, remove, update versions, and set default versions
of managed policies. It will cycle out old versions of policies if too
many are present. It will check and set the version of the policy that
matches the pased in policy document if one already exists.

Incorporating changes from PR

Descriptions now have full stops, and pep8 error has been
addressed. Also added requirements, author, and updated interface to
"preview"

Additional change to pass CI

Previous commit added in some whitespace errors. Additinoally added
correct value for version_added, added in a RETURN block for
documentation, and moved import to top of file

Fixed error detaching policy from users

Updates to pass 2.4 CI

Updating iam_managed_policy supporting feedback
2017-06-29 12:08:27 +10:00
rip777
4e54df71a2 Further iam_group improvements
added `purge_users` and `purge_policy` option
added `convert_friendly_names_to_arns` function
flake8 fixes
2017-06-29 11:38:49 +10:00
Nick Aslanidis
dc8a05dfe2 New AWS module for managing IAM groups 2017-06-29 11:38:48 +10:00
Toshio Kuratomi
e27c2860e7 Move metadata extraction into a library function (#26198)
* Move metadata extraction into a library function
* fix the string cases to throw NotImplementedError
* Some python3 fixes
2017-06-28 18:10:26 -07:00
Toshio Kuratomi
6908038036 Fix synchronize setting user variable
The user variable stores whether we need to set user@ in our connection
string.  It's now being used at the toplevel of the run() method so the
default needs to be calculated further up the stack

Fixes #24910
2017-06-28 17:41:01 -07:00
Nathaniel Case
ad6c4a544e nxos_pim updates (#26145)
* nxos_pim tests

* Cleanup nxos_pim
2017-06-28 19:40:19 -04:00
Nathaniel Case
eea18e9875 nxos_vxlan_vtep_vni fixes (#25913)
* nxos_vxlan_vtep_vni first pass
* nxos_vxlan_vtep_vni tests
2017-06-28 19:38:31 -04:00
Matt Davis
69de9d86bd fix win_updates failure with dict-typed args (#26208)
Switch to dicts in common code caused silent failures during arg translation, so default values and non-check-mode were always used.
* fixes #23653
* fixes #24062
* fixes #22938
* fixes #25156
2017-06-28 16:36:53 -07:00
Phillip Thurston
a2f38de173 Corrected the examples in find module to make sure the commands are accurate to what is being described. 2017-06-28 18:17:22 -04:00
James Cammarata
4c72e98262 Squashed commit of the following:
commit f79beaa3b3b642c370552d63b0848195358bccd0
Author: James Cammarata <jimi@sngx.net>
Date:   Wed Jun 28 17:00:57 2017 -0500

    Add example for iptables using the policy option

commit 1a0f9debdb526bef9d8d469a84a8cc55ef68da03
Author: James Cammarata <jimi@sngx.net>
Date:   Wed Jun 28 16:59:52 2017 -0500

    Fix missing re import for iptables after merging #19476

commit 084479d21d
Author: Alexey Solodkiy <work@x1.by>
Date:   Sun Dec 18 12:07:05 2016 +0300

    fix #19476
2017-06-28 17:02:13 -05:00
Jordan Borean
98fc54f02d win_find: fix for empty nested directories (#26164) 2017-06-29 07:06:10 +10:00
Dag Wieers
0a15ab7ce9 win_say: Fix issue, add integration tests (#26089)
* win_say: Fix issue, add integration test

This PR includes:
- Make speed_speech an integer parameter
- Test for empty parameters too
- Add integration tests

* Improve the $speech_speed parameter handling

As requested
2017-06-29 06:28:44 +10:00
Tomas Tomecek
2683c36a01 plugins,action: log stderr output if verbose (#25734)
otherwise ansible eats out important error messages

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2017-06-28 15:55:39 -04:00
David Moreau-Simard
9fdd07fba8 Provide the list of files that were included by include_vars
include_vars will now also return a key 'ansible_included_var_files'
which contains the list of files that were successfully loaded.
This is useful information and, amongst other things, a way for users
to know exactly what files were included when debugging their
playbooks.
This also allows us to improve the integration tests around
include_vars.
2017-06-28 15:25:45 -04:00
Brian Coca
44bef1dc6b corrected supported_by key 2017-06-28 15:12:42 -04:00
Abhijeet Kasurde
bb847e332d Check if SELinux is installed on system (#24437)
* Refactor code
* PEP8 fixes
* Check if /etc/selinux/config file exists before
  proceeding any other operations

Fixes #21622

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-28 19:39:52 +01:00
Dag Wieers
5be32aa5af Move ping and win_ping closer together (#26028)
So in an effort to verify if Windows modules are feature complete
compared to the python equivalent, I stumbled upon these differences.

This PR includes:
- Add missing 'data' option from documentation
- Simplify ping module
- Update integration tests to test exception
2017-06-28 11:08:04 -07:00
Tim Rupp
e7402e3d5b Support full path templates (#26121)
This patch allows the iapp service module to support full path
templates instead of only relative templates
2017-06-28 17:35:00 +01:00
Tim Rupp
04ac15f241 Adds bigip_qkview module (#25980)
This module can be used to generate qkviews on a bigip and
save them to a location on the ansible controller.
This module is primarily used for diagnostics.

Unit tests are provided. Integration tests can be found here

https://github.com/F5Networks/f5-ansible/blob/devel/test/integration/bigip_qkview.yaml#L23
https://github.com/F5Networks/f5-ansible/tree/devel/test/integration/targets/bigip_qkview/tasks
2017-06-28 17:31:17 +01:00
Tim Rupp
16bd93a14e Refactors bigip ssl cert module (#25882)
Includes unit tests and a refactor of the module to make code
more easily supported. Also fixes an issue where the extension of
the cert name was not appended if not provided. This problem was
causing certs to not be editable in the UI. Also deprecates params.

Unit tests are provided. Integration tests can be found here

https://github.com/F5Networks/f5-ansible/blob/devel/test/integration/bigip_ssl_certificate.yaml#L23
https://github.com/F5Networks/f5-ansible/tree/devel/test/integration/targets/bigip_ssl_certificate/tasks
2017-06-28 17:26:39 +01:00
Brian Coca
7870000f71 updated docs to clarify default change 2017-06-28 12:13:25 -04:00
Pete Travis
147b342553 device path is optional for cbs
per
https://developer.rackspace.com/docs/cloud-servers/v2/api-reference/svr-basic-operations/#post-attach-volume-to-server-servers-server-id-os-volume-attachments
, device is "The name of the device, such as /dev/xvdb. Specify null for
auto- assignment."
2017-06-28 12:12:46 -04:00
Abdul Anshad A
61b18cc355 fixes issue #5633 (#19716) 2017-06-28 10:47:53 -05:00
Abdul-Anshad-A
36975c50ef test fix for thin disk type issue 2017-06-28 11:45:45 -04:00
ppanczyk
6d0f61b656 Fixed expiredate parameter in user module
Changed "--expiredate" to "-e", as on older systems "--expiredate" is not present.
2017-06-28 11:36:34 -04:00
MaciejCetler
0d179c77a7 fix for iam (#23347)
* fix for iam

* Update iam.py

removed extra space
2017-06-28 11:11:19 -04:00
Brian Coca
d5f4c2a54b auto tb on vvv+ or debug (#26106)
* auto tb on vvv+ or debug

* updated as per feedback
2017-06-28 10:08:38 -04:00
George Nikolopoulos
11836a0296 Add module netscaler_cs_action (#26147) 2017-06-28 19:16:46 +05:30
Trishna Guha
a5b905c941 Workaround to deprecation warning when password is used as arg for *_user (#26169)
* Avoid deprecation warning for password for vyos_user argspec

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

* Avoid Password deprecation for ios_user

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

* Avoid Password deprecation for iosxr_user

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-06-28 15:11:27 +05:30
Trishna Guha
34eca3816d fix vyos_user configuration (#26166)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-06-28 12:13:27 +05:30
Virgil Dupras
9474f20f2d letsencrypt: FIX CN parsing to work with OpenSSL 1.1 (#25935)
As we can see in
9537453586
:

CN used to be without whitespaces around the `=` but OpenSSL 1.1 introduced
whitespaces:
1.0.1: subject=/CN=example.com
1.1.0: subject=CN = example.com

This commit makes them optional.

OpenSSL 1.1 is present on the newly-released Debian Stretch, so absence
of this fix makes us not being able to use this module on this distro.
2017-06-28 07:39:53 +02:00
Ganesh Nalawade
3bd8dbb53d Add support for netconf network discovery (#25435)
* Add support for netconf network discovery

* Fix unit test failure
2017-06-28 11:07:38 +05:30
Dag Wieers
b1e608811b win_iis_webapplication: Parameter fixes and check-mode (#26082)
This PR includes:
- General cleanup of parameters
- Added check-mode support
- Cleanup of return values
2017-06-28 12:16:06 +10:00
Dag Wieers
58b348ddf5 win_msi: Add check_mode and removes options (#26086)
This PR includes:
- Add support for the removes option
- Add check_mode support (which does test MSI file, creates, removes)
- Simplify code
2017-06-28 10:47:30 +10:00
Dag Wieers
bb7ebc6a55 win_msg: Added integration tests, parameter fixes (#26126) 2017-06-28 10:35:38 +10:00
Sloane Hertel
3ba4fc2d54 boto only returns tags in the described security group if they exist (#26053) 2017-06-28 09:14:38 +10:00
Will Thames
0e0b91534a [cloud] Return target_group_names where sensible in ec2_asg_facts module (#26078)
If target_group_arns is an empty list, then return
an empty target_group_names list.

If a connection to elbv2 is not obtainable, then it is
not possible to return target_group_names
2017-06-27 17:04:15 -04:00
Josh Souza
e49f15d6e4 [cloud] Fix logical flaw in route53_health_check, use string ports everywhere (#25706)
* Fix logical flaw (update when diff), use string ports everywhere

* Change port comparison to integer vs. string

The comparison works either way as long as it's consistent. Boto docs
state that it takes in an integer, but if given a string apparently
keeps it as such. This change just ensures that when we compare, we
specifically deal with integers.
2017-06-27 15:58:21 -04:00
Dag Wieers
fceb71128e Return code is not very useful to assume a task failed
So I thought I fixed it before, but there's still one location where
the `rc` value is influential to decide whether a task failed or not.

We already established in #24867 that it is up to the module to decide
what the return code actually means, not the task executor. We modified
the existing modules to move that logic into the module (eg. for
command, shell, etc.)

This relates to the integration tests of win_robocopy, where different
return codes have different meanings:

  - 0  --  No files copied.
  - 1  --  Files copied successfully! (changed)
  - 2  --  Some Extra files or directories were detected. No files were copied. (warning)
  - 3  --  (2+1) Some files were copied. Additional files were present. (changed)
  - 4  --  Some mismatched files or directories were detected. Housekeeping might be required!  (changed + warning)
  - 5  --  (4+1) Some files were copied. Some files were mismatched.  (changed + warning)
  - 6  --  (4+2) Additional files and mismatched files exist.  No files were copied. (warning)
  - 7  --  (4+1+2) Files were copied, a file mismatch was present, and additional files were present. (changed + warning)
  - 8  --  Some files or directories could not be copied! (changed + failed)
  - 9 - 15  --  Fatal error. Check log message! (failed)
  - 16  --  Serious Error! No files were copied! Do you have permissions to access $src and $dest? (failed)

This also fixes #24652
2017-06-27 15:40:27 -04:00
George Nikolopoulos
6bed831f8c Add netscaler_server module (#25537) 2017-06-27 23:08:00 +05:30
Abhijeet Kasurde
79b2897462 Update vmware_guest_find module (#26066)
Fix updated following:
* Update Documentation
* Update Examples
* Find VM's folder using VM's UUID
* Make name as optional parameter

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-27 11:58:57 -04:00
Toshio Kuratomi
e238ae999b Cyptography pr 20566 rebase (#25560)
Make pyca/cryptography the preferred backend for cryptographic needs (mainly vault) falling back to pycrypto

pyca/cryptography is already implicitly a dependency in many cases
through paramiko (2.0+) as well as the new openssl_publickey module,
which requires pyOpenSSL 16.0+. Additionally, pyca/cryptography is
an optional dep for better performance with vault already.

This commit leverages cryptography's padding, constant time comparisons,
and CBC/CTR modes to reduce the amount of code ansible needs to
maintain.

* Handle wrong password given for VaultAES format

* Do not display deprecation warning for cryptography on python-2.6

* Namespace all of the pycrypto imports and always import them

  Makes unittests better and the code less likely to get stupid mistakes
  (like using HMAC from cryptogrpahy when the one from pycrypto is needed)

* Add back in atfork since we need pycrypto to reinitialize its RNG just in case we're being used with old paramiko

* contrib/inventory/gce: Remove spurious require on pycrypto

(cherry picked from commit 9e16b9db275263b3ea8d1b124966fdebfc9ab271)

* Add cryptography to ec2_win_password module requirements
  * Fix python3 bug which would pass text strings to a function which
    requires byte strings.

* Attempt to add pycrypto version to setup deps

* Change hacking README for dual pycrypto/cryptography

* update dependencies for various CI scripts

* additional CI dockerfile/script updates

* add paramiko to the windows and sanity requirement set

  This is needed because ansible lists it as a requirement. Previously
  the missing dep wasn't enforced, but cryptography imports pkg_resources
  so you can't ignore a requirement any more

* Add integration test cases for old vault and for wrong passwords

* helper script for manual testing of pycrypto/cryptography

* Skip the pycrypto tests so that users without it installed can still run the unittests

* Run unittests for vault with both cryptography and pycrypto backend
2017-06-27 06:00:15 -07:00
Matt Davis
36ad934156 re-enable non-pipelined mode for Powershell (#25012)
* fixes #23986
* fixes 3rd-party Windows connection plugins that don't support pipelining (eg awsrun)
2017-06-26 22:58:09 -07:00
Jordan Borean
b41c42cf0d win_share: Add integration tests and various fixes (#25691)
* win_share: Add integration tests and various fixes

* docs and comments updates based on PR review

* fixed up documentation issue with URL
2017-06-27 12:07:22 +10:00
Jordan Borean
2f3a1c7a28 win_service: Updated return values and use the list parameter type (#25385)
* win_service: Updated return values and use the list parameter type

* minor fix to handle the list parameter return value
2017-06-27 10:11:43 +10:00
jhawkesworth
1ec115d830 win_regedit: Make the string comparison case sensitive when comparing string values (#25536)
* Make the string comparison case sensitive when comparing string values

* Added documentation note about change detection now being case-sensitive
2017-06-27 09:51:50 +10:00
Dag Wieers
74efda65cd windows: Two simple errors using Add-Warning (#25955) 2017-06-27 09:40:16 +10:00
Dag Wieers
0dddae7ffa Add warning message when Chocolatey was installed (#25918) 2017-06-27 08:58:52 +10:00
Trond Hindenes
7cc38e1b32 Fixes win_dsc docs (#26122)
* hacking dsc docs

* remove code snippet

* again...

* more testing

* trying a short version

* moar text
2017-06-27 08:42:31 +10:00
Daniele Lazzari
9d932b64f0 New module: Add module to install/remove/register/unregiser windows powershell modules (windows/win_psmodule) (#23604)
* Add new windows module win_psmodule

* Add checkmode, allow_clobber parameter, integration tests

* Add aliases, replace win_raw with win_shell

* restore original test_win_group1.yml, add powershel version test

* fix var type

* add conditional on assert

* integration tests conditional tasks review

* documentation fix, test fix, adds result.change

* fix yml

* fix railing whitespace

* add nuget_changed and repository_changed in result
2017-06-26 23:01:38 +02:00
Tim Rupp
1e8c58519e Removes unused f5 module utils
The CLI utils are no longer used by any F5 modules and may therefore
be removed.
2017-06-26 13:14:10 -07:00
Eugen C
6d59160744 Fix ansible ad-hoc to respect ANSIBLE_STDOUT_CALLBACK (#26098)
* Fix ansible ad-hoc to respect ANSIBLE_STDOUT_CALLBACK

* Ansible ad-hoc 'stdout_callback' should work only with 'bin_ansible_callbacks'
2017-06-26 16:01:06 -04:00
Sloane Hertel
dc2d9a2134 [cloud] Python3 fixes: use string_types instead of basestring (#26102)
Don't modify a dict while iterating over it
2017-06-26 15:06:53 -04:00
Andreas Olsson
05dc76f3b2 In the git module let ssh do its own host checking
There are too many possible special cases for Ansible to be able to
precheck known_hosts files without introducing all kinds of false
failures.

* Alternative known_hosts paths
* Alternative host name aliases
* ssh host certificates
* SSHFP + DNSSEC

Fixes #24860
2017-06-26 10:45:19 -07:00
Abhijeet Kasurde
d63cdcacc3 Make nic_name as optional parameter (#25990)
Fix adds support for adding VMWare vSwitch without
any physical NICs (uplinks). This makes nic_name as
an optional parameter. Also, updated documentation and
examples to reflect these changes.

Fixes #25632

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-26 12:47:10 -04:00
Mark Szymanski
91c1d8d8e2 Fixing bug introduced in 20622 2017-06-26 11:38:47 -04:00
Dag Wieers
7d7051fc54 Mutually reference Windows and non-Windows modules (#25482)
* Mutually reference Windows and non-Windows modules

To make it easier for Windows or non-Windows users to find the relevant
module information, we are mutually referencing both variants in their
documentation.

We are also adding a special note if a module works on both Windows and
non-Windows targets.

* Mutually reference Windows and non-Windows modules

To make it easier for Windows or non-Windows users to find the relevant
module information, we are mutually referencing both variants in their
documentation.

We are also adding a special note if a module works on both Windows and
non-Windows targets.

* Replace 'look at' with 'use', as requested

ci_complete
2017-06-26 16:26:53 +01:00
Chris Houseknecht
8765eadb30 Fixes list comparison (#26042) 2017-06-26 11:06:57 -04:00
Abhijeet Kasurde
1f8575ec97 Remove get_exception from zypper (#25890)
Fix removes get_exception in favor of native Python exception
handling. Also, added to_native to manage exception message.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-26 14:30:51 +01:00
George Nikolopoulos
0bf64aa241 Add netscaler_save_config module (#25614) 2017-06-26 18:46:52 +05:30
mihu
6b76bc924f [cloud] New feature for ec2_group: allow deleting groups by id (#26022) 2017-06-26 09:07:29 -04:00
Rene Moser
1f5839777b cloudstack: cs_host: revamp fixes several issues 2017-06-26 14:40:09 +02:00
Ricardo Carrillo Cruz
ffaf6c4a86 Add new net_static_route platform agnostic module (#25455)
* Add new net_static_route platform agnostic module

* Add mask parameter and according examples

* Add required true to required params

* Add static routes collections example
2017-06-26 11:23:33 +02:00
Peter Sprygada
b12ca95824 renames dict_combine to dict_merge in network_common (#26073) 2017-06-25 18:46:41 -04:00
Dag Wieers
014bcad35b Small fix in the error output (#26004)
So I noticed this when doing integration tests:

    Failed to copy file Could not find a part of the path

and this change turns it into:

    Failed to copy file: Could not find a part of the path

I also moved something out of the exception handling.
2017-06-24 21:07:23 +02:00
Nathaniel Case
21c7fcf9c0 nxos_vxlan_vtep (#25971)
* nxos_vxlan_vtep tests

* Fix issues with nxos_vxlan_vtep
2017-06-24 14:09:11 -04:00
Trishna Guha
3482a6326b Fixes nxos_vpc_interface (#25907)
* nxos_vpc_interface fix

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

* nxos_vpc_interface unit test

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

* fix state_present

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

* add state_present unit test

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

* make ansibot happy

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

* teardown get_config

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-06-24 18:05:07 +05:30
Brian Coca
0209685f8d check options exist before forcing assignment 2017-06-23 15:56:43 -04:00
Ryan Fitzpatrick
3e52f47b51 [cloud] Fixes #26045 Ensure instance.instance_profile is not None before casting to dict (#26047) 2017-06-23 12:33:55 -04:00
Patrik Lundin
a439f45a18 openbsd_pkg: Handle versionless names with branch. (#26016)
* openbsd_pkg: Handle versionless names with branch.

This makes package names such as "openldap-server--%openldap" work.
Problem reported by Landry Breuil.

While here fix cornercase check for versionless packages and add some
more debug output to packet parsing.

Fixes #25910.

* openbsd_pkg: Split up lines to pass build checks.

===
The test ansible-test sanity --test pep8 failed with the following errors:
lib/ansible/modules/packaging/os/openbsd_pkg.py:383:161: E501 line too long (292 > 160 characters)
lib/ansible/modules/packaging/os/openbsd_pkg.py:398:161: E501 line too long (198 > 160 characters)
===
2017-06-23 12:25:41 -04:00
Will Rouesnel
42b608db0c Add support for tmpfs to docker_container. (#25747) 2017-06-23 08:03:28 -04:00
loqutus
f6e4019804 fix networkdid->networkid in cs_nic.py (#25914) 2017-06-23 07:15:03 +01:00
Mark Szymanski
1703db4211 Allow iam_cert to be renamed or moved without needing to specify cert or key data (#20622)
Generally Pep8 and flake8 compliant so removing from legacy-files.txt
2017-06-23 15:32:15 +10:00
GennadySpb
26fec4f107 Fix type for 'attributes' field 2017-06-22 15:41:05 -04:00
Matt Clay
e747650543 Add missing __init__.py for modules. 2017-06-22 11:41:53 -07:00
Troy Sampson
e391206acc Missing Else statement (#25457)
Missing the final Else statement in the conditional statement
2017-06-22 17:47:58 +01:00
Dag Wieers
33a6150393 imc_xml: New module to manage Cisco IMC hardware (#25529)
* cisco_imc_xml: New module to manage Cisco IMC hardware

This module provides direct access to the Cisco IMC API.
See the included examples for a glimpse of what it can do.

* Rename cisco_imc_xml to imc_xml

After discussion with Peter Sprygada renamed from cisco_imc to imc.
As Cisco ACI is named aci as well.
2017-06-22 17:40:37 +01:00
Kassian Sun
de4a8b83df Fix up integer type detection on python3 (#25985) 2017-06-22 08:48:22 -04:00
Andrea Tartaglia
921bc0599b Fixed modules using Popen (#24558)
* Fixed modules using Popen

* Reverted change in mysql_db, Popen is required to pipe compressed archives to mysql
2017-06-22 05:22:34 -07:00
James Cammarata
495a809f46 Don't include dependent roles in the dep chain for include_role
The dependency chain should not include roles below the parent, as it
can introduce very weird things like conditionals from child deps impacting
non-related roles.

Fixes #25136
2017-06-22 13:16:29 +01:00
Constantin
9cc35b094f Fix of argument error in #25940 (#25979) 2017-06-22 16:59:36 +10:00
mihu
60afe93521 amazon: allow NACL to be removed by its id (#25925) 2017-06-22 16:46:46 +10:00
Ganesh Nalawade
b2f46753ec Add junos_system declartive module and other related change (#25859)
* Add junos_system declartive module and other related change

*  junos_system declartive module
*  integration test for junos_system
*  integration test for net_system (junos platform)
*  pep8 fixes for junos modules
*  move to lxml from elementree for xml parsing as it support
   complete set of xpath api's
*  other minor changes

* Fix CI and doc changes

* Fix unit test failures

* Fix typo in import

* Fix import issue for py2.6

* Add missed Element in import
2017-06-22 09:34:50 +05:30
Wouter de Geus
dd07d11ae5 [cloud] Add ChangeSet support to cloudformation module (#23490) (#24497)
*  * Implements Change Sets on updating a cloudformation stack when create_changeset=true (#23490)

*  * Silence test complaints ;)

*  * Added optional changeset_name parameter.
 * Check if changeset with the requested name already exist.
 * Documentation fix

*  * Added warning when cloudformation stack has pending changesets.
 * Fix documentation
2017-06-21 16:05:17 -04:00
Andrade
7bed60ba5f Fix docs typo in java_cert function docstring (#25942) 2017-06-21 15:47:33 -04:00
Tom Paine
f831be680e [cloud] Update ec2.py default for public IP assignment (#25896)
* Update ec2.py

Update docs to reflect default.

* Update ec2.py

Further default update.
2017-06-21 14:58:26 -04:00
Abhijeet Kasurde
e8072ee616 Misc typo for Ansible
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-21 11:19:41 -04:00
Ryan S. Brown
2a7e586801 Move helm module to subdirectory 2017-06-21 07:45:41 -04:00
Flavio Percoco Premoli
02cd72857e New module: helm (#24883)
This PR adds a new module, helm, which can be used to manage Kubernetes Helm, the package manager for k8s.
2017-06-21 07:43:02 -04:00
Ondra Machacek
5f1da6809a cloud: ovirt: support add/remove tag from vms/hosts (#25900) 2017-06-21 07:11:10 -04:00
Christopher Galtenberg
170fc42e80 Improve help text for extra-vars requiring @ for filename
(cherry picked from commit 1b34de89ee)
2017-06-21 07:08:35 -04:00
Brian Coca
d79315e19e avoid winrm errors when not connecting to winrm (#25921) 2017-06-21 01:13:06 -07:00
Sloane Hertel
04e93e22cb add traceback and more helpful errors for ec2_vpc_route_table (#25704) 2017-06-21 12:01:52 +10:00
Yang Liu
b41b4fe2fd use proper pagination variable (#25838) 2017-06-21 12:00:41 +10:00
Trond Hindenes
911f4d3eb1 A few win_dsc bugfixes (#25852) 2017-06-20 22:12:53 +01:00
Damir Suleymanov
74f6b64fb0 Handle rate limits on every iteration (#23726) 2017-06-20 16:49:05 -04:00
Brian Coca
a457c2af59 correctly set delegated host name in results 2017-06-20 14:58:43 -04:00
Brian Coca
0bbf0e8d19 adjust script caching to processed data
also added filename to loading for better errors
2017-06-20 14:27:53 -04:00
Nathaniel Case
0296c2285b nxos_vrf fix (#25812)
* Fixes #25031

* Slight cleanup and add tests
2017-06-20 10:59:03 -04:00
Abhijeet Kasurde
aa32f4e80c Add support for Red Hat Atomic Host (#25906)
Fix adds support for Red Hat Enterprise Linux Atomic Host.
RHEL Atomic host uses same RHEL Server strategy for
modifying hostname.

Fixes #25903

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-20 10:30:53 -04:00
Will Thames
f3c98f482a [cloud] New module ec2_vpc_endpoint_facts for AWS EC2 VPC Endpoints (#20211)
* New facts module for AWS EC2 VPC Endpoints

* ec2_vpc_endpoint_facts - meet latest Ansible standards

Fix exception syntax and use of `iteritems` for python3

Fix undefined `ec2` variable (should have been `connection`
Address various flake8 issues

Use `ansible_dict_to_boto3_filter_list` rather than
duplicating its implementation

* Remove max_items and next_token from vpc_endpoint_facts

max_items and next_token should be a module concern, not
a caller concern. It would be very difficult for a module
consumer to use next_token properly, whereas it's easy for
the module to handle it.

* ec2_vpc_endpoint_facts trivially supports check mode

Add supports_check_mode=True to the argument spec.

* Improve RETURN documentation for ec2_vpc_endpoint_facts

Fix bug in EXAMPLE documentation too

* fix return type for validate-modules
2017-06-20 08:31:31 -04:00
Will Rouesnel
3adf08e10f [cloud] iam_cert return arn and allow use with ansible vault (#20787)
* iam_cert.py Fix duplicate certificate detection with included chains.

The iam_cert module would fail to detect certificates as duplicates
if the certificate body included the authority chain directly.

This commit fixes the problem by checking if a given certificate
matches the start of the data returned by AWS, since in all cases
where they would match the certificate will come first.

* iam_cert.py Return certificate ARN in all success cases.

When uploading certificates or interacting with IAM, the certificate ARN
is needed for other operations with AWS such as provisioning elastic load
balancers.

This commit returns the certificate ARN in all success cases, which allows
it to be used to idempotently provision other Amazon services depending on
it (ELBs being an immediate example).
2017-06-20 08:01:56 -04:00
Trishna Guha
947e9aba45 Add vyos_banner implementation module (#25862)
* Add vyos_banner implementation module

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

* vyos_banne integration test

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

* vyos_banner unit test

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

* minor fix on banner text

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-06-20 08:53:03 +05:30
Brian Coca
e2cf3b6e7a fixed cg signature 2017-06-19 19:08:36 -04:00
Brian Coca
9d37b0c8aa 01110000 01100101 01110000 00111000 00100000
01101100 01101001 01101110 01110100 01101001 01101110 01100111 00100000 01110011 01110101 01100011 01101011 01110011
2017-06-19 17:50:52 -04:00
Brian Coca
9d8721dbde properly track delegated host in loops
ansible_host can be pulled from inventory and not match inventory_hostname,
this can "loose" vars to a new host named by ansible_host vs the delegated host
fixes #25770
2017-06-19 17:50:52 -04:00
Matt Martz
b6ee9163e3 Ensure hosts aren't duplicated in groups 2017-06-19 17:38:43 -04:00
Brian Coca
e08f068dca ensure proper typing of path, cause py3 listdir
since now output is based on input, we need to make sure its always same
fixes #25856
2017-06-19 16:35:50 -04:00
Sloane Hertel
06c21b4bec [cloud] fix dynamodb_ttl exception handling for ParamValidationError (#25870)
Also adds tracebacks to exceptions and imports `HAS_BOTO3` instead of checking directly.
2017-06-19 15:29:14 -04:00
Sloane Hertel
e079498485 [cloud] document route53 state choices added in 2.4 (#25866) 2017-06-19 15:16:58 -04:00
Steffen Neubauer
759750e661 Consul: make service_port optional in service definition, like specified in Consul docs (#21737)
* Consul: make service_port optional in service definition, Fixes #21727

* Remove consul module from legacy-files.txt

* consul: Pep8 fixes
2017-06-19 19:29:40 +01:00
Jordan Borean
6d01168238 win_acl_inheritance: Added tests and formatting improvements (#25382) 2017-06-19 17:47:35 +01:00
Jordan Borean
c05d3c3821 win_owner: added tests and fixed up bool handling (#25088)
* win_owner: added tests and fixed up bool handling

* explicitly gathering facts in test

* Removed manualy entry in test group
2017-06-19 17:43:44 +01:00
Dag Wieers
0aba04fdad win_uri: Add integration tests, new functionality... (#25373)
This is a cleanup of the win_uri module to make it feature-complete.

This PR includes:
- Added check-mode support
- Add as many options from the uri module as possible
  - Added creates
  - Added follow_redirects
  - Added maximum_redirection
  - Added password
  - Added removes
  - Added return_content
  - Added status_code
  - Added timeout
  - Added user
  - Added validate_certs
- Fixed list-handling for comma-separated strings
- Added basic integration tests (should come from uri module)
2017-06-19 17:30:08 +01:00
Abhijeet Kasurde
a4ebde1516 Correct failure message in flowdock (#25844)
As per documentation and code, external_user_name is
required parameter is case of type 'chat'.
Fix corrects error message displayed to user.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-19 17:08:08 +01:00
Ted Timmons
346cbf7d7a [cloud] New module: Add module to set Amazon AWS DynamoDB TTL (cloud/amazon/dynamodb_ttl) (#22588)
* add aws dynamo_ttl module, small parameter setter

 - New Module Pull Request

`dynamodb_ttl`

2.3.0/devel

Very self-contained TTL setter. This is independent of the dynamodb_table module
as it's really designed to be a helper for tables that may be created in other
ways (say, CloudFormation, which doesn't support setting TTL).

* committer is no longer a valid value

* bump version_added, catch common exceptions

* pep8 fixes

* one more pep8
2017-06-19 09:57:04 -04:00
James Braid
0be0aa5f10 htpasswd: fix passlib module version comparison (#20202)
Previously, we used StrictVersion which failed to parse some passlib
version strings. For example, Debian currently ship passlib with a
__version__ of '1.7.0.post20161128115349'

StrictVersion throws an exception when parsing this version string.

Change to using LooseVersion which successfully parses version strings
such as this.

Fixes #20199
2017-06-19 12:02:06 +01:00
Matthew Schick
846174b4ba Update nocache to be the proper bool type instead of string (#24358)
* Update nocache to be the proper bool type instead of string

* Add proper bool type for params
2017-06-19 11:24:19 +01:00
Ali
484252b90f New Module: Add github_deploy_key module (source_control/github_deploy_key) (#24364)
* Added new module: github_deploy_key

added a new module for managing deploy keys for GitHub repositories

* Updated github_deploy_key module based on feedback

- added GPL header
- switched to using fetch_url instead of requests
- changed version to 2.4
- set no_log for otp and token arguments
- implemented check mode

* made github_deploy_key module PEP8 compliant
2017-06-19 11:13:27 +01:00
Krzysztof Magosa
4522a53acf fix false positive changed flag in rabbitmq_user module (#22507) 2017-06-19 05:10:23 -04:00
Abhijeet Kasurde
7348a613bb Correct usage of fail_json in hg module (#25847)
Fix adds correct usage for fail_json and also adds
testcases to verify this.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-18 22:28:33 +02:00
Abhijeet Kasurde
561d678f52 Fix module params assignment in jabber module (#25850)
Fix corrects variable assignment from module params

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-06-18 22:22:27 +02:00
Andrew Makousky
f2abc4cf43 Improve documentation of 'remote_src' in the file copy module. (#23946)
Now that remote-to-remote copies are supported in the copy module,
the module documentation has been updated to indicate this in the
synopsis and examples to make the capability obvious for someone
skimming the documentation.
2017-06-18 08:38:17 +01:00
Tim Rupp
0854c0ed88 Adds refactored bigip_hostname (#25841)
This adds a refactored bigip_hostname with unit tests and code
conventions that are common across other modules.

Unit tests are provided. Integration tests can be found here

https://github.com/F5Networks/f5-ansible/blob/devel/test/integration/bigip_hostname.yaml#L23
https://github.com/F5Networks/f5-ansible/tree/devel/test/integration/targets/bigip_hostname/tasks
2017-06-18 07:56:00 +01:00
Peter Sprygada
3f17e87c5a pulls the jsonrpc request builder code into top level function (#25833)
refactors the Connection class to use the top level function.  This will
make the request_builder() function useful for other components such as
action handlers.
2017-06-17 16:14:48 -04:00
Ganesh Nalawade
450263e934 Add junos_banner declartive module (#25826)
* Add junos_banner declartive module

*  junos_banner implementation
*  Integration test for junos_banner
*  Integration test for net_banner (junos)
*  Minor fixes

* Minor doc change
2017-06-18 01:32:48 +05:30