Commit graph

16718 commits

Author SHA1 Message Date
Ganesh Nalawade
1a9b0ae731 Remove xml return for junos declarative modules (#26400)
*  Remove xml return
*  Add diff return
*  Related doc changes
2017-07-04 21:49:26 +05:30
René Moser
c1ac55147f haproxy: docs: add version added for state=drain (#26396) 2017-07-04 16:26:18 +02:00
Rene Moser
37b22673fb cloudstack: cs_instance: fix KeyError: 'sshkeypair' 2017-07-04 15:58:21 +02:00
Jakub Jursa
5fafe4c672 openstack: os_volume: add optional scheduler_hints param (#26090)
* openstack: os_volume: add optional scheduler_hints param

* openstack: os_volume: scheduler_hints version_added fix

* openstack: os_volume: fixed codestyle
2017-07-04 11:51:07 +02:00
Trishna Guha
ad3fe08aae fix vyos_banner multiline string issue (#26383)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-07-04 14:31:18 +05:30
zzaa
df0864d801 haproxy: Add new drained state (#25115) 2017-07-04 10:33:32 +02:00
Toshio Kuratomi
996281d748 Remove metadata from docstring parsing as per last week's meeting decision 2017-07-04 01:12:43 -07:00
Toshio Kuratomi
3ee997b720 metadata and doc generator optimization and fixes
* Fix ansible-doc traceback when a plugin doesn't parse correctly
* Change extract_metadata ivocation to take either an ast or source
  code.  When given source code, it can find file offsets for the start
  and end of dict.  When given the ast, it is quicker as it doesn't have
  to reparse the source.  Requires changing the call to the function to
  use a keyword arg.
* Fix reading of metadata to find the last occurrence of
  ANSIBLE_METADATA instead of the first.
* Add some more unittests to get closer to complete coverage
2017-07-04 01:12:43 -07:00
Abhijeet Kasurde
785ed2cfc0 Multiple fixes in digital_ocean_tag module (#24361)
* Pep8 fixes
* Removed redundant check for name
* Check validity of api_token
* Don't report changed when tag is already present

Fixes #24265

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-07-04 08:04:49 +02:00
R. Soto
5c0c985547 update auth_flag variable after STARTTLS connection is established, fixes #26376 2017-07-03 23:07:47 -04:00
Matt Davis
0ee46cb0df converted become runas to explicit CreateProcessWithLogonW (#26378)
* fixes become_method: runas for unprivileged users
* sets permissions on tempdir appropriately
* allows automatic system environment generation for new token (old Process.Start way prevents this)
* add basic become runas tests
2017-07-03 17:46:27 -07:00
Brian Coca
1b727c372e igaffneypellz 2017-07-03 17:05:44 -04:00
Brian Coca
32fa4db232 add any_errors_fatal global config 2017-07-03 17:05:44 -04:00
Todd Hertel
e9447e9481 ec2_group fix TypeError bug #26291 2017-07-03 16:59:43 -04:00
Andreas Olsson
42408a97ea Correct doc about the Git module verify_commit param
All that is required to verify the signature is that the matching
public key is present in the remote user's keyring. There is no need
for GnuPG to explicitly trust the authenticity of the key.

Not Ansible specific, but rather the behavior of the `git verify-commit`
and the `git verify-tag` command line invocations.
2017-07-03 16:45:05 -04:00
Michael Scherer
bda066f6f6 Fix exception when using masquerade
The following snippet:

  - name: Let the DMZ connect to internet
  firewalld:
    zone: dmz
    masquerade: True
    permanent: True
    immediate: True
    state: enabled

will fail with this error message:

  Exception caught: set_masquerade_enabled() takes 1 positional argument but 3 were given

It turn out that it treat 'zone' as a array of string instead of 1 string.
I only tested on Python 3 with a Fedora 25.
2017-07-03 16:43:44 -04:00
Yanis Guenane
88099e2acb openssl_privatekey: Add publickey fingerprint (#22202)
This commit adds the fingerprint of the public key in openssl_privatekey
and openssl_publickey returned values.

```
{
  "changed": false,
  "filename": "/tmp/cert.pem",
  "fingerprint": {
    "md5": "31:22:14:58:c6:b1:7b:2a:48:89:b5:02:43:0a:d7:88",
    "sha1": "ed:e5:59:ba:9b:98:5b:e1:01:ef:4b:eb:f0:d1:1d:ee:84:88:c7:78",
    "sha224": "e1:c0:a6:bd:20:30:40:5b:c0:32:14:4a:01:3c:4b:c3:8a:49:a5:1f:ed:39:75:a4:57:e6:93:87",
    "sha256": "8a:18:86:88:79:e5:57:ca:c3:3c:89:92:ae:54:7f:ac:94:12:e2:c7:aa:c2:7c:97:77:cb:e7:8b:5e:1f:af:28",
    "sha384": "7a:5d:c2:49:cc:84:f4:74:ed:76:c7:03:e5:8d:aa:3b:31:b0:ba:0e:29:d2:76:3c:0e:3c:e5:d2:fd:b4:36:b1:70:b5:a6:bb:17:f4:db:ac:d6:75:81:36:42:dd:61:0c",
    "sha512": "da:0a:14:52:c6:c0:ab:fa:52:55:2a:85:65:35:7a:f6:5d:95:1d:d3:95:ae:bd:b9:d8:e0:75:dd:4f:0c:c9:3c:59:82:64:fa:d8:50:26:4f:b7:3a:5d:e8:6f:5d:de:9a:fe:ef:c2:c8:57:9d:e3:c0:c9:dd:4a:a9:bd:7a:77:f3"
  },
  "size": 4096,
  "type": "RSA"
}
```
2017-07-03 20:46:45 +01:00
Brian Coca
8f758204cf correct, cleanup & simplify dwim stack (#25956)
* correct, cleanup & simplify dwim stack

latlh chIS logh HeS qar wej chel laD
better errors
update find_file to new exception

* addressed latest comments

* test should not use realpath as it follows symlink

this fails when on OS X as /var is now a symlink to /private/var
but first_found was not supposed to follow symlinks
2017-07-03 15:27:53 -04:00
Abhijeet Kasurde
ec6e3b0e32 Handle errors gracefully in vmware_guest_snapshot (#25727)
CreateSnapshot may fail with several exceptions. This
fix generically handles these exceptions.

Fixes #21121

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-07-03 13:39:29 -04:00
Abhijeet Kasurde
29f5fe3ddd Resolve module correctly (#25658)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-07-03 11:36:42 -04:00
Yanis Guenane
ed15a0e9a7 Remove get_exception from crypto namespace
Fix removes get_exception in favor of native Python exception
handling. Also, added to_native to manage exception message.
2017-07-03 08:30:36 -07:00
jctanner
db5c0b3b2b Use the new file content function post facts refactoring. (#26353)
* Use the new file content function post facts refactoring.

Fixes #26339

* Do not make new abstraction ... use the real function

* Fix pep8 error
2017-07-03 10:35:17 -04:00
Ganesh Nalawade
11e72d495d Add net_logging platform agnostic module and junos implementation (#26316)
* Add net_logging platform agnostic module and junos implemenatation

*  net_logging platform agnostic module
*  junos implemenatation of logging module
*  net_logging integration test
*  junos_logging integration test
2017-07-03 15:31:59 +05:30
Ricardo Carrillo Cruz
4869a7b0ac Add net_linkagg platform agnostic module (#26341) 2017-07-03 11:50:14 +02:00
Trishna Guha
1b427aa419 Fix vyos banner idempotent (#26338)
* fix vyos_banner idempotent

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

* fix vyos_banner unit test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-07-03 13:08:08 +05:30
Wil Tan
483346d94b Fix win_nssm credentials quoting (#26226) (#26228)
Quote password to avoid Powershell special characters being interpreted.
2017-07-03 09:06:23 +10:00
dupondje
46514de5e6 Fix version_added for new option in template introduced in #21846 (#26302) 2017-06-30 22:58:56 +02:00
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