Commit graph

21240 commits

Author SHA1 Message Date
Trishna Guha
9eff1f1d74
Handle nxos_feature issue where json isn't supported (#39150)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-04 12:21:58 +05:30
Yuwei Zhou
9348809184 Fixes #37731 Create Internal Loadbalancers with azure_rm_loadbalancer, support SKU (#38077)
* create internal loadbalancer

* fix test

* remove duplicate test

* clean up

* fix doc

* lint

* add sku support

* update version

* change to the version the same as CLI

* add pip support sku

* fix lint

* fix test

* Update main.yml

* add changelog entry
2018-05-04 13:17:05 +08:00
Pilou
a5d320f8e7 vdirect modules: fix 'import' sanity test (#39706)
* vdirect modules: fix 'import' sanity test

* Remove passing file from import skip list.

* vdirect modules: fix validate-modules warnings

- Arguments with a default should not be marked as required
- add choices in doc

* vdirect_runnable: use formatting function
2018-05-03 18:13:06 -07:00
Toshio Kuratomi
6b159fdb03 Fix for file module with recursive permission setting and broken symlinks
There was a traceback when setting permissions on a directory tree when
there were broken symlinks inside of the tree and follow=true.  chmod -R
ignores broken symlinks inside of the tree so we've fixed the file
module to do the same.

Fixes #39456
2018-05-03 17:54:34 -07:00
Toshio Kuratomi
4f664f8ff6
Fix for file module with symlinks to nonexistent target (#39635)
* Fix for file module with symlinks to nonexistent target

When creating a symlink to a nonexistent target, creating the symlink
would work but subsequent runs of the task would fail because it was
trying to operate on the target instead of the symlink.

Fixes #39558
2018-05-03 17:50:43 -07:00
Jordan Borean
f75b7a9437
win_get_url: Fixed a few issues with using FTP and added tests (#39646)
* win_get_url: Fixed a few issues with using FTP and added tests

* Fixed typo in docs
2018-05-04 08:39:37 +10:00
Brian Coca
df1001577f
rebase base playbook base (#39533)
* rebase base playbook base

fixes issues with loop control allowing generic attributes it shouldn't
2018-05-03 18:29:47 -04:00
Kevin Breit
c8d287fece Meraki organization module (#38773)
* Initial commit

Query an organization within Meraki. No support is in place for managing
or creating yet

* Change output_level method and make the state parameter required.

* Implemented listing all organizations

- Updated documentation
- Parse results and return all organizations
- Parse results and return specified organization

* Framework for creating an organization

- Documentation example for organization creation
- Framework exists for creating organizations, pending PR 36809
- Created functions for HTTP calls
- Renamed from dashboard.meraki.com to api.meraki.com
- Added required_if for state

* Remove absent state

- Meraki API does not support deleting an organization so absent is removed
- Updated documentation to call it state instead of status

* Small change to documentation

* Support all parameters associated to organization

- Added all parameters needed for all organization actions.
- None of the added ones work at this time.
- Added documentation for clone.

* Integration test for meraki_organization module

* Rename module to meraki for porting to module utility

* Meraki documentation fragment

- Created initial documentation fragment for Meraki modules

* Add meraki module utility to branch. Formerly was on a separate branch.

* CRU support for Meraki organization module

* CRU is supported for Meraki organizations
* There is no DELETE function for organizations in the API
* This code is very messy and needs cleanup
* Create and Update actions don't show status as updated, must fix

* Added Meraki module utility to module utility documentation list

* Added support for organization cloning
* Renamed use_ssl to use_https
* Removed define_method()
* Removed is_org()
* Added is_org_valid() which does all org sanity checks

* Fixes for ansibot
- Changed default of use_proxy from true to false
- Removed some commented out code
- Updated documentation

* Changes for ansibot
- Removed requirement for state parameter. I may readd this.
- Updated formatting

diff --git a/lib/ansible/module_utils/network/meraki/meraki.py b/lib/ansible/module_utils/network/meraki/meraki.py
index 3acd3d1038..395ac7c4b4 100644
--- a/lib/ansible/module_utils/network/meraki/meraki.py
+++ b/lib/ansible/module_utils/network/meraki/meraki.py
@@ -42,7 +42,7 @@ def meraki_argument_spec():
     return dict(auth_key=dict(type='str', no_log=True, fallback=(env_fallback, ['MERAKI_KEY'])),
                 host=dict(type='str', default='api.meraki.com'),
                 name=dict(type='str'),
-                state=dict(type='str', choices=['present', 'absent', 'query'], required=True),
+                state=dict(type='str', choices=['present', 'absent', 'query']),
                 use_proxy=dict(type='bool', default=False),
                 use_https=dict(type='bool', default=True),
                 validate_certs=dict(type='bool', default=True),
diff --git a/lib/ansible/modules/network/meraki/meraki_organization.py b/lib/ansible/modules/network/meraki/meraki_organization.py
index 923d969366..3789be91d6 100644
--- a/lib/ansible/modules/network/meraki/meraki_organization.py
+++ b/lib/ansible/modules/network/meraki/meraki_organization.py
@@ -20,11 +20,9 @@ short_description: Manage organizations in the Meraki cloud
 version_added: "2.6"
 description:
 - Allows for creation, management, and visibility into organizations within Meraki
-
 notes:
 - More information about the Meraki API can be found at U(https://dashboard.meraki.com/api_docs).
 - Some of the options are likely only used for developers within Meraki
-
 options:
     name:
         description:
@@ -32,21 +30,18 @@ options:
         - If C(clone) is specified, C(name) is the name of the new organization.
     state:
         description:
-        - Create or query organizations
-        choices: ['query', 'present']
+        - Create or modify an organization
+        choices: ['present', 'query']
     clone:
         description:
         - Organization to clone to a new organization.
-        type: string
     org_name:
         description:
         - Name of organization.
         - Used when C(name) should refer to another object.
-        type: string
     org_id:
         description:
         - ID of organization
-
 author:
     - Kevin Breit (@kbreit)
 extends_documentation_fragment: meraki
@@ -86,7 +81,6 @@ RETURN = '''
 response:
     description: Data returned from Meraki dashboard.
     type: dict
-    state: query
     returned: info
 '''

@@ -103,6 +97,7 @@ def main():
     argument_spec = meraki_argument_spec()
     argument_spec.update(clone=dict(type='str'),
+                         state=dict(type='str', choices=['present', 'query']),
                          )

@@ -125,11 +120,9 @@ def main():

     meraki.function = 'organizations'
     meraki.params['follow_redirects'] = 'all'
-    meraki.required_if=[
-                           ['state', 'present', ['name']],
-                           ['clone', ['name']],
-                           # ['vpn_PublicIP', ['name']],
-                       ]
+    meraki.required_if = [['state', 'present', ['name']],
+                          ['clone', ['name']],
+                          ]

     create_urls = {'organizations': '/organizations',
                    }
@@ -162,23 +155,16 @@ def main():

-
-    # method = None
-    # org_id = None
-
-
-    # meraki.fail_json(msg=meraki.is_org_valid(meraki.get_orgs(), org_name='AnsibleTestOrg'))
-
     if meraki.params['state'] == 'query':
-      if meraki.params['name'] is None:  # Query all organizations, no matter what
-        orgs = meraki.get_orgs()
-        meraki.result['organization'] = orgs
-      elif meraki.params['name'] is not None:  # Query by organization name
-        module.warn('All matching organizations will be returned, even if there are duplicate named organizations')
-        orgs = meraki.get_orgs()
-        for o in orgs:
-          if o['name'] == meraki.params['name']:
-            meraki.result['organization'] = o
+        if meraki.params['name'] is None:  # Query all organizations, no matter what
+            orgs = meraki.get_orgs()
+            meraki.result['organization'] = orgs
+        elif meraki.params['name'] is not None:  # Query by organization name
+            module.warn('All matching organizations will be returned, even if there are duplicate named organizations')
+            orgs = meraki.get_orgs()
+            for o in orgs:
+                if o['name'] == meraki.params['name']:
+                    meraki.result['organization'] = o
     elif meraki.params['state'] == 'present':
         if meraki.params['clone'] is not None:  # Cloning
             payload = {'name': meraki.params['name']}
@@ -193,7 +179,10 @@ def main():
             payload = {'name': meraki.params['name'],
                        'id': meraki.params['org_id'],
                        }
-            meraki.result['response'] = json.loads(meraki.request(meraki.construct_path('update', org_id=meraki.params['org_id']), payload=json.dumps(payload), method='PUT'))
+            meraki.result['response'] = json.loads(meraki.request(meraki.construct_path('update',
+                                                                                        org_id=meraki.params['org_id']),
+                                                                  payload=json.dumps(payload),
+                                                                  method='PUT'))

diff --git a/lib/ansible/utils/module_docs_fragments/meraki.py b/lib/ansible/utils/module_docs_fragments/meraki.py
index e268d02e68..3569d83b99 100644
--- a/lib/ansible/utils/module_docs_fragments/meraki.py
+++ b/lib/ansible/utils/module_docs_fragments/meraki.py
@@ -35,6 +35,7 @@ options:
         description:
         - Set amount of debug output during module execution
         choices: ['normal', 'debug']
+        default: 'normal'
     timeout:
         description:
         - Time to timeout for HTTP requests.
diff --git a/test/integration/targets/meraki_organization/aliases b/test/integration/targets/meraki_organization/aliases
new file mode 100644
index 0000000000..ad7ccf7ada
--- /dev/null
+++ b/test/integration/targets/meraki_organization/aliases
@@ -0,0 +1 @@
+unsupported

* Formatting fix

* Minor updates due to testing
- Made state required again
- Improved formatting for happier PEP8
- request() now sets instance method

* Fix reporting of the result

* Enhance idempotency checks
- Remove merging functionality as the proposed should be used
- Do check and reverse check to look for differences

* Rewrote and added additional integration tests. This isn't done.

* Updated is_update_required method:
- Original and proposed data is passed to method
- Added ignored_keys list so it can be skipped if needed

* Changes per comments from dag
- Optionally assign function on class instantiation
- URLs now have {} for substitution method
- Move auth_key check to module utility
- Remove is_new and get_existing
- Minor changes to documentation

* Enhancements for future modules and organization
- Rewrote construct_path method for simplicity
- Increased support for network functionality to be committed

* Changes based on Dag feedback and to debug problems

* Minor fixes for validitation testing

* Small changes for dag and Ansibot
- Changed how auth_key is processed
- Removed some commented lines
- Updated documentation fragment, but that may get reverted

* Remove blank line and comment

* Improvements for testing and code simplification
- Added network integration tests
- Modified error handling in request()
	- More testing to come on this
- Rewrote construct_path again. Very simple now.

* Remove trailing whitespace

* Small changes based on dag's response

* Removed certain sections from exit_json and fail_json as they're old
2018-05-04 00:01:05 +02:00
Julien Vey
a6d5656dd8 ec2_instance: add a retry to run_instance to help with ec2 consistency 2018-05-03 15:46:15 -04:00
Julien PRIGENT
1905a6e8fb ec2_vpc_route_table: Update matching_count parsing on find_subnets fu… (#38707)
* ec2_vpc_route_table: Update matching_count parsing on find_subnets function and tests

* ec2_vpc_route_table: Update matching_count parsing on find_subnets function
2018-05-03 15:05:24 -04:00
Sloane Hertel
923f676836
[ec2_vpc_vgw] [ec2_vpc_vpn] stabilize modules for PR 35983 (#38666)
* Stabilize ec2_vpc_vgw and ec2_vpc_vpn so tests for ec2_vpc_vpn_facts in PR 35983 can be run in CI

* Add updated placebo recordings

* ensure find_vgw uses the virtual gateway id if available

Add AWSRetry.jittered_backoff to attach_vpn_gateway to deal with errors when attaching a new VPC directly after detaching

Add integrations tests for ec2_vpc_vgw

* Sort VPN Gateways by ID
2018-05-03 14:19:19 -04:00
saichint
f99bae1776 Fix for nxos_snmp_host issues (#39642)
* fix snmp_host issues

* source files

* fix shippable

* remove defaults to match arg spec
2018-05-03 21:36:33 +05:30
saichint
99748cbfa4 fix nxos_snmp_traps issues (#39444)
* fix snmp_traps code

* add IT cases

* fix shippable

* fix shippable without ignore
2018-05-03 21:34:25 +05:30
Adam Miller
d49a09d05e
fix sanity checks to make shippable happy (#39685)
Signed-off-by: Adam Miller <admiller@redhat.com>
2018-05-03 10:36:08 -05:00
Seuf
cc477ba8cc Don't split line when no version available for plugin (#37907)
* Don't split line when no version available for plugin

* Fixed author github account
2018-05-03 11:10:18 -04:00
Mário Santos
947aa52327 Add new OpenStack module for managing cinder volume snapshots (#19122)
* Add os_volume_snapshot Ansible Module

* Add missing RETURN documentation

* Fix YAML syntax

* Add ANSIBLE_METADATA

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>

* Bump the ansible version

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>

* Add support for check_mode

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>

* Fix sanity tests

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>
2018-05-03 09:15:39 -05:00
Sloane Hertel
151f9d2ebf [cloud] aws_direct_connect_connection: improve return docs (#37677)
Fixes #29381

Fix uses of AWSRetry

Fix exception handling

Update module to use AnsibleAWSModule
2018-05-03 08:45:38 -04:00
Will Thames
29770a297a Fail with nice error message if elb target_type=ip not supported (#38313)
* Add helpful failure message if target_type=ip is not supported

Create test case for target_type=ip not supported

* Update elb_target_group module to latest standards

Use AnsibleAWSModule
Improve exception handling
Improve connection handling
2018-05-03 08:36:52 -04:00
wang shuang
918b29f0fc [doc] fix a typo in ec2_eni docs (#36571) 2018-05-03 08:36:30 -04:00
Will Thames
b5488b4e45 Change aws_acm_facts name parameter to be domain_name (#36986)
Match AWS's naming for domain name, but provide backward
compatible alias.
2018-05-03 08:35:55 -04:00
Felix Fontein
cb4db82354 Route53 check mode (#37273)
* Adding check mode for route53.

* flake8
2018-05-03 08:29:57 -04:00
Vinay Dandekar
ada2ea4387 Fix ec2_metadata_facts documentation (#37546)
- ec2_metadata_facts does not extend `url`
- Remove url_argument_spec for ec2_metadata_facts
2018-05-03 08:29:14 -04:00
cahlchang
e2908ae8df [aws] Add aws_iam_role check mode support (#39002)
* Check mode when adding

* Check mode when deleting

* Add check mode
2018-05-03 08:00:36 -04:00
Sloane Hertel
910bc892c6 ec2_ami: Properly delete snapshots (#39606) 2018-05-03 07:48:29 -04:00
Ganesh Nalawade
afdc2364f2
Fix eos_vlan associated interface check (#39661)
* Fix eos_vlan associated interface check

Fix eos_vlan associated interface check by comparing
the interface in want and have without converting the
interface name to lower

* Update eos_vlan docs
2018-05-03 17:07:30 +05:30
Loïc Blot
88df583af7 New module: AWS storage gateway facts (#39491)
* Add a module to get storage gateway facts

* Review fixes

* Last review fixes

* Add filtering gathering & some fixes

* doc fix

* API error handling

* Remove ec2_argument_spec import

Use imported BotoCoreError and ClientError rather than botocore.exceptions
2018-05-03 07:10:05 -04:00
aaronk1
ca36e07be0 update win_psmodule.py (#39631)
<!--- Fix minor typo in Powershell version requirement -->

+label: docsite_pr
2018-05-03 14:51:00 +10:00
vab2048
8d84039aa8 [ec2_vpc_route_table] Use 'network_interface_id' rather than 'interface_id' (#38499)
Updated documentation to refer to 'network_interface_id' rather than 'interface_id' as the latter results in an error: 'Parameter validation failed: Unknown parameter in input: \"InterfaceId\"'
2018-05-02 22:28:08 -04:00
Alex Stephen
b6aa132033 New module: GCP Compute Backend Services (#38611) 2018-05-02 16:59:27 -04:00
Alex Stephen
394abba1b9 New module: GCP Compute Backend Buckets (#38610) 2018-05-02 14:57:00 -04:00
Ryan S. Brown
9a607283aa Terraform module: pass plan_file argument correctly
Per #39611 the `terraform` module wasn't properly building plan-only
files.
2018-05-02 13:45:24 -04:00
Abhijit Menon-Sen
0a119c391a Only expand '~' based on become_user/remote_user
Change brought forward from #00c023e in stable-2.5.

Closes #39281 (bug report)
Closes #39540 (PR with substantially the same change)
2018-05-02 22:50:41 +05:30
Brian Coca
70d89b5487 use actual ssh executable as it might not be ssh 2018-05-02 12:10:25 -04:00
wznoinsk
f2db9d59c7 Update set_stats.py
<!--- Your description here -->

+label: docsite_pr
2018-05-02 11:10:52 -04:00
Ganesh Nalawade
eb5e15e7e0
Fix fetching ios default running config (#39475)
If default option is enable in that case only
add 'all' or 'full' flag
2018-05-02 19:27:56 +05:30
Michele Zuccala
9577cef3ba [cloud] route53_zone: create public zones associated to a reusable delegation set (#39502)
* Add option to specify reusable delegation set while creating public zones

* Add mutual exclusion argument spec for delegation set and VPC/private zone

* Get zone delegation set ID when updating a public zone
2018-05-02 09:25:15 -04:00
Ondra Machacek
17928ff666 ovirt_vms: Fix the module to work with check mode (#37916)
Fixes: https://github.com/ansible/ansible/issues/36712
2018-05-02 08:47:30 -04:00
Sharon Gratch
8bfc92fb27 Add Numa support. (#35838) 2018-05-02 03:52:16 -04:00
Yanis Guenane
dc420fc5fa Allow non-inclusion of setup task in junit report
The JUnit callback pushes every tasks in the report. Even the setup
tasks that - sometime - might clutter the report rather than being
useful, based on one needs.

This PR allows one to specify whether or not the setup tasks should be
part of the final report, defaulting to True to be backward compatible
to what is already in place today.
2018-05-02 00:00:36 -07:00
Adam Miller
69affddc7f
Add firewalld Rich Rule port forwarding example (#39534)
Example provided by Mike Cardwell (@mikehardenize) in an issue
comment 28349#issuecomment-385354551

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-05-01 16:33:34 -05:00
Jordan Borean
04ae0c3312
winrm: removed old exec_command that is no longer used (#39572) 2018-05-02 07:04:53 +10:00
Dennis Conrad
77f5a8f422 Add AWS Inspector Target Module (#37464)
* Add AWS Inspector Target Module

* "ansible-test sanity" Fixes

* * Rename module
* Add integration test
* Incorporate feedback from s-hertel
2018-05-01 16:04:03 -04:00
Ondra Machacek
88b3b14a9c ovirt: fix quota_id check (#39568) 2018-05-01 14:26:34 -05:00
Eike Frost
6b554deb28 keycloak_client: add aliases for module options (matching API) (#39507)
* add aliases for module options which match API endpoint

* directAccessGrantsEnabled fixed in docs
2018-05-01 14:10:41 -05:00
Eric O'Callaghan
c11248c456 Update redhat_subscription.py (#39512)
fixed small typo of depracated to deprecated in redhat_subscription doc

+label: docsite_pr
2018-05-01 14:09:13 -05:00
Matt Martz
65049b6c42
Set default=no in import_role and include_role for private. Fixes #21077 (#39566) 2018-05-01 12:19:04 -05:00
Matt Martz
6acdc36317
Ensure we don't overwrite handlers from include_role when loading a play. Fixes #18140 (#39563) 2018-05-01 12:18:36 -05:00
Sam Doran
5a6bdef76b Only change expiration date if it is different (#38885)
* Only change expiration date if it is different

Modify user_info() method to also return the password expiration.
Compare current and desired expiration times and only change if they are different.

* Improve formatting on user tests

* Add integration test for expiration

* Add changelog fragment

* Improve integration test

Skip macOS and use getent module for validating expiration date.

* Fix expiration change for FreeBSD

* Don't use datetime since the total_seconds method isn't available on CentOS 6

* Use better name for expiration index field

Use separate tasks for verifying expiration date on BSD

* Use calendar.timegm() rather than time.mktime()

calendar.timegm() is the inverse of time.gmtime() and returns a timestamp in UTC not localtime
Add tests that change the system timezone away from UTC

* Mark tests as destructive and use test for change status

* Fix account expiration for FreeBSD

Use DATE_FORMAT when setting expiration date on FreeBSD. Previously the argument passed to -e was an integer of days since epoch when the account will expire which was inserted directly into master.passwd. This value is interpreted as seconds since epoch by the system, meaning the account expiration was actually set to a few hours past epoch.

Greatly simply comparing desired  and current expiration time by using the first three values of the struct_time tuple rather than doing a whole bunch of manipulations of the seconds since epoch.
2018-05-01 11:19:01 -04:00
Brian Coca
b9f7f582d1
remove properties from vars in include_role (#38968)
* remove properties from vars in include_role
* also from_ args
2018-05-01 10:16:59 -04:00
Dag Wieers
e9270fb100 mail callback: Exception info less important
So it seems on failure the last raised (but handled) exception is being
added to the task failure result, which makes it often unrelated to the
actual failure.

Since we assumed the exception was always related, using the exception
information for the subject is plain wrong (and let me to debug
completely unrelated ghost issues).

Also the exception details are now moved back in the output. Maybe we
should not show it unless there's no other information ? But at least it
should not be the mail's subject.
2018-04-30 21:45:10 -04:00
Toshio Kuratomi
81b2529159 Fix when template paths contain non-ascii chars and using the path in ansible_managed
Fixes #27262
2018-04-30 16:47:27 -07:00
Matt Martz
cca96b8c9d
Pass vars from import_playbook in early (#39521)
* Pass vars from import_playbook in early, as they may be needed to parse the imported plays. Fixes #33693

* Add test for import_playbook vars
2018-04-30 16:13:43 -05:00
Ryan Brown
269d682f70 Move camel2snake and snake2camel to common/dict_transformations.py (#39498)
Since it will be used outside just AWS modules, this commit moves
`camel_dict_to_snake_dict` and `snake_dict_to_camel_dict` functions into
a new module_utils file under common/ to match their wider usage.
2018-05-01 06:50:32 +10:00
David Davis
2d21c7da17 Allow the galaxy client to fetch from a url in role version data (#39396)
Currently if the ansible-galaxy client fetches a role from a galaxy
server, it then fetches the role from Github. This change allows a
galaxy server to provide an alternate source url that points to an
archive that contains the role version.
2018-04-30 15:47:43 -05:00
Matt Martz
c0043444c9
Remove unneeded imports in load_list_of_blocks (#39523) 2018-04-30 15:39:10 -05:00
Adam Miller
5eaf043711
refactor firewalld module, add firewalld module_util (#37603)
* refactor firewalld module, add firewalld module_util

This change is meant to enable the addition of advanced feature
specific firewalld modules that will have different module option
patterns than what fits in the current firewalld module, while
keeping as much common code as possible in the module_util

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-04-30 15:33:28 -05:00
Matt Martz
240b060c02
Use the computed role name instead of 'role'. Fixes #38838 (#39516) 2018-04-30 14:41:13 -05:00
Tim Rupp
5f9b7046ed
Adds bigip management route module (#39520)
This module can be used for managing the management routes on a bigip
2018-04-30 12:30:13 -07:00
Sloane Hertel
ec9c59f52b [ec2_vpc_net] Add retries to describe_vpc_attribute call (#39256)
* [ec2_vpc_net] Add retries to describe_vpc_attribute call

* Use new AnsibleAWSModule client-based waiters
2018-04-30 15:27:22 -04:00
Will Thames
cc06f4cba1 Improve deprecation message for ec2_vpc_dhcp_options modules (#38459)
Make it clear to user why ec2_vpc_dhcp_options and
ec2_vpc_dhcp_options_facts have been deprecated
2018-04-30 15:17:15 -04:00
Alex Stephen
18b463e17b New module: GCP Container Clusters (#37324) 2018-04-30 15:04:56 -04:00
Tim Rupp
609b1827e1
Adds log publisher module for f5 (#39518)
This module can be used to manage log publishers on a bigip
2018-04-30 11:55:05 -07:00
Tim Rupp
c0cea32f61
Adds log destination module for f5 (#39513)
This module can be used to manage log destinations on a bigip
2018-04-30 11:25:09 -07:00
Artem Goncharov
59b9c5f119 Fixes 30786 - add server response to the failure (#39371)
* Fixes 30786 - add server response to the failure

* replace str(e) with to_native(e) according to code review
2018-04-30 14:18:06 -04:00
Alex Stephen
d39b1ff664 New module: GCP Storage Bucket Access Controls (#37289) 2018-04-30 14:03:02 -04:00
Lars Kellogg-Stedman
ebe7666d71 add 'localhost_warning' configuration option
Add the 'localhost_warning' configuration option. When set to 'false',
this will prevent Ansible from issuing a warning when the inventory is
empty and it is using an implicit inventory with only 'localhost'.

Closes #17086
2018-04-30 13:27:32 -04:00
Tim Rupp
0cb11c61ac
Various f5 module fixes (#39510)
Mainly fixing coding conventions. Also, added ipv6 suppor to pool members
2018-04-30 09:48:41 -07:00
Dag Wieers
6a08b16c37 Ensure remove files work when file was already removed
If a file disappears when you are removing it, this will ensure it
doesn't fail and continues as expected.
2018-04-30 09:10:09 -07:00
KrdLab
f3399a5e34 Add returning values to the rds_subnet_group module (#39077)
* Add return values to rds_subnet_group module
2018-04-30 12:01:47 -04:00
Luke Short
49e3f60c42 ovirt: Update documentation to showcase that the Python SDK 4.2.4 is required. (#39169)
This is related to the GitHub PR#35841. Some documentation was missed and did not get updated with those patches.
2018-04-30 10:01:51 -04:00
Ikrom
b667126d35 Update example in lookup dict.py (#39488)
Typo fixed
2018-04-30 16:06:58 +05:30
Luke Short
65c19c3629 ovirt_vms: Clarified graphical_console arguments. (#39455)
For protocol, it should be a list and all
of the values are expected to be lowercase.
An example is also added to show how to add
both Spice and VNC consoles to a VM.
2018-04-30 05:06:17 -04:00
Jordan Borean
0d1daf4de8
Ansible.ModuleUtils.SID - allow SID as an input to allow people to specify well know SIDs instead of the name (#39400) 2018-04-30 16:18:25 +10:00
Toshio Kuratomi
2976b653ce Need to convert filenames to byte strings before using them in APIs
Under a non-utf-8 locale (for instance, LC_ALL=C), passing a non-ascii
filename to many APIs will traceback.  Fix that by explicitly converting
to byte strings before passing to external APIs.

May fix #27262
2018-04-28 08:56:36 -07:00
Abhijeet Kasurde
3f9e4b16fe
VMware: correct comparison for guest_id (#39291)
This fix corrects the comparison of system generated guest_id with
user provided guest_id. Module used to report change even if the
guest_ids were same. For example, user provided guest id rhel7_64guest
and VMware returned guest id rhel7_64Guest are logically same but
 lexicographically different and due to this module use to report
change even if there is no change applied.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-28 20:27:53 +05:30
Pilou
019decd29a doc: Add missing parenthesis in first_found example (#39420) 2018-04-28 14:59:07 +02:00
Michael Price
fdcece5c38 Update NetApp module_utils to use correct license (#28070)
The NetApp module_utils file should be using a BSD license. This
patch updates the license.
2018-04-28 08:35:19 -04:00
Abhijeet Kasurde
ed141f1eab
VMware: Refactor vmware_vswitch (#36091)
* Update documentation
* Update logic
* Added idempotency
* Added Error handling

Fixes: #36030

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-28 16:31:45 +05:30
Abhijeet Kasurde
57a009d4c7
VMware: vmware.py refactor (#36976)
* Remove unused `find_entity_child_by_path` API
* Remove unused `fetch_file_from_guest` API as this has separate module
  vmware_guest_file_operation
* Remove unused `push_file_to_guest` API as this has separate module
  vmware_guest_file_operation
* Refactor exception variables
* Change GPL License boilerplate to one-liner

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-28 16:11:21 +05:30
Bryan Black
958ba1469b Fix awkward plural in git module (#39399) 2018-04-28 10:25:43 +05:30
Matthew Stone
d2a1c1ffe5 Adding slxos-facts module and tests. (#39121) 2018-04-27 20:58:13 +01:00
Alicia Cozine
4801bf96a5 fixes broken link in aci module docs (#39247)
* fixes broken link in aci module docs

* makes correct fix for aci broken link
2018-04-27 21:24:18 +02:00
Matt Martz
7db5ce2c86
Ensure handlers have proper parent (#39426)
* Ensure role handlers are parented correctly. Fixes #36518

* Add delegate_to test for include_role handlers
2018-04-27 12:03:57 -05:00
Sloane Hertel
9864f874d4 [aws] Increase possible wait time for nonmonotonic subnet attributes (#38960) 2018-04-27 12:10:22 -04:00
Sloane Hertel
44dd9ce80d [aws] Skip ec2_vpc_subnet waiters for old botocore versions (#39171)
Fix ec2_vpc_subnet for botocore versions that do not accept the WaiterConfig parameter
2018-04-27 12:06:26 -04:00
David Passante
200a0bce67 cloudstack: new module cs_role_permission (#37065) 2018-04-27 16:47:07 +02:00
Jordan Borean
25dea1f72c Change except Error when trying to get a missing option 2018-04-27 09:47:18 -04:00
The Fox in the Shell
efe7c20100 LDAP: Refactor and add ldap_passwd module (#33040)
* modules/net_tools/ldap: Refactor shared options
* modules/net_tools/ldap: Refactor shared code
* modules/net_tools/ldap: Add ldap_passwd module
* modules/net_tools/ldap/ldap_passwd: More robust change check
* In some deployments, using compare_s results in spurious “changed” results,
while bind is more reliable.  The downside is that it results in an extra
connection, and the code it more involved.
* ldap_passwd: Rename methods passwd_[cs]
* ldap_passwd: Remove unecessary type=str
* ldap: Factor-out failure cases
* ldap_passwd: Provide more precise error messages
* ldap_passwd: Irrelevant syntax changes
* ldap_passwd: Rename u_con to tmp_con
* ldap_passwd: Keep HAS_LDAP local
* LDAP doc update
* Resolved all copyright related issues
* Resolved self.fail calls
* Update documentation

Signed-off-by: The Fox in the Shell <KellerFuchs@hashbang.sh>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-27 15:54:05 +05:30
Miguel Angel Muñoz González
19e1f41837 Initial commit for fortios_webfilter (#37196)
* Initial commit for fortios_webfilter
2018-04-27 10:47:58 +01:00
Olivier Bourdon
a3f2e99864 Fix for changing method only on specified interface (#39015)
Test added for interface method change
2018-04-27 05:18:19 -04:00
Ryan Brown
86db62c0e9 [AWS] report boto3/botocore versions during fail_json_aws (#39298)
* [AWS] report boto3/botocore versions during `fail_json_aws`

When modules call `fail_json_aws` and boto3 is installed, gather the
boto3 and botocore versions so that any new AWS module issues will
include the user's boto3 installation info. This will make debugging
issues where features aren't available yet easier.

* PEP8

* Switch to `dict` rather than tuple returns
2018-04-27 10:05:41 +10:00
Jordan Borean
4b57fa91d0
win_file: Handle [] in paths, fix touch in check mode (#37901)
* win_file: Handle [] in paths, fix touch in check mode

* Fixed typo for p/invoke command
2018-04-27 07:57:16 +10:00
jctanner
bbfe7a8b2f
more debug logs for free, network_cli, paramiko and add hostname context to debugging messages (#39205)
* Add hostname context to debugging messages
* Set paramiko's channel
2018-04-26 17:10:28 -04:00
Martin Krizek
5dd8977cfa Fix nested noop block padding in dynamic includes (#38814)
* Fix nested noop block padding in dynamic includes

* Address issues from the review

* Fix typo
2018-04-26 15:14:31 -05:00
Matt Martz
4b01b92cfe
Update TaskInclude _raw_params with the expanded/templated path to file (#39365)
* Update TaskInclude _raw_params with the expanded/templated path to file

* Add tests to validate host vars include paths
2018-04-26 14:25:02 -05:00
Matt Martz
2f5161628a
Don't skip conditional exception on includes (#39377)
* task_executor.py: Raise 'conditional exception' in case of 'include_*'

Fixes #33632

Signed-off-by: Patrick Ringl <patrick_@freenet.de>

* Re-organize tests, add static include test with undefined var

* Remove unnecessary conditional
2018-04-26 13:39:44 -05:00
jctanner
05830658bc
task_executor send the task as a kwarg to connections (#39341)
* make taskexecutor send the task as a kwarg to connections

* Fix line length error

* Send just the task uuid
2018-04-26 14:17:16 -04:00
Toshio Kuratomi
7bcbab70f0 Clarify the comments for action_write_locks
Also explain why there's no special optimization for service managers at
the moment
2018-04-26 09:42:18 -07:00
Brian Coca
d76298b5d3 call diff callback also when task diff is true (#39366)
fixes #31129
2018-04-26 12:18:17 -04:00
Toshio Kuratomi
83c1cba511
Fixes for mode=preserve (#39343)
* Fixes for mode=preserve

* Document mode=preserve for template and copy
* Make mode=preserve work with remote_src for copy
* Make mode=preserve work for template
* Integration tests for copy & template mode=preserve

Fixes #39279

* Changed mode option in win_copy to hidden option as it doesn't reflect copy mode
2018-04-26 07:14:37 -07:00
Ryan Brown
33f358383a
[aws][docs] Add AnsibleAWSModule features to AWS developer guidelines (#38978) 2018-04-26 08:26:03 -04:00
Ryan S. Brown
cd39b8263d [aws] fix misspelling in ec2_instance docs 2018-04-26 08:16:37 -04:00
Ondra Machacek
3a60cde14e ovirt: FCP storage domains don't have to have target (#38882) 2018-04-26 06:43:19 -04:00
Dag Wieers
dca6e2d94d nxos_interface: AttributeError: 'NoneType' object has no attribute 'group' (#38544)
This fixes an issue we recently encounteredi with nxos_interface:

```
Traceback (most recent call last):
  File "/tmp/ansible_JmLoba/ansible_module_nxos_interface.py", line 777, in main
    have = map_config_to_obj(want, module)
  File "/tmp/ansible_JmLoba/ansible_module_nxos_interface.py", line 606, in map_config_to_obj
    obj['speed'] = re.search(r'speed (\d+)', body).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
```
2018-04-26 12:27:35 +05:30
saichint
2f99a17856 fix nxos_ntp issues (#39178)
* fix nxos_ntp issues

* review comments

* fix idempotent fail case
2018-04-26 12:09:46 +05:30
Jasper Aorangi
08f071eb7a Fix #26755 by ensuring that the first nic in the nic list is primary (#38994)
* Fix #26755 by ensuring that the first nic in the nic list has primary set to True, and all other nics have primary set to False.

* Fix sanity issues and add test for two nics

* Fix typo in test

* fix nic list

* Ensure the niclist variable is used rather than a niclist string

* Add tests just for dual nic, reverting changes to single nic VM creation tests

* Correct idempotency test
2018-04-25 23:16:25 -07:00
Matt Clay
32d786af65 Convert more http links to https. 2018-04-25 23:12:46 -07:00
Ganesh Nalawade
354454ad58
Fix aruba initial prompt issue (#39195)
Fixes #33414

Issue a newline when the initial connection
results in a prompt and expects user input.
2018-04-26 11:06:27 +05:30
Toshio Kuratomi
0b643009db Winrm encoding in exception fix (#39333)
Exceptions need to use native strings.  We need to make sure we're
combining native strings with native strings.
2018-04-26 07:51:53 +10:00
Alex Stephen
dd735b2122 Bug fixes for GCP Dns Managed Zones (#38631) 2018-04-25 16:20:55 -04:00
Jordan Borean
f8853d83e3
windows: removed deprecated features in 2.6 (#38930)
* windows: removed deprecated features in 2.6

* Comma surgery.
2018-04-26 06:13:37 +10:00
Alex Stephen
8d77c6cc16 Adding support for GCP Compute Https Health Checks (#37437) 2018-04-25 16:11:32 -04:00
Will Thames
12f2b9506d [aws]Add VPC configuration to ECS modules (#34381)
Enable awsvpc network mode for ECS services and tasks and
their underlying task definitions

Improve test suite to thoroughly test the changes

Use runme.sh technique to run old and new versions of botocore to
ensure that the modules work with older botocore and older network modes
and fail gracefully if awsvpc network mode is used with older botocore
2018-04-25 15:41:04 -04:00
Alex Stephen
58bf4ae611 New module: GCP Storage Buckets (#37288) 2018-04-25 15:26:13 -04:00
Alex Stephen
39bf7d3655 New module: GCP Compute HTTP Health Checks (#36329) 2018-04-25 15:25:23 -04:00
Ryan Brown
4dfef45449 [s3_bucket] Increase timeout on versioning check, as it seems to take longer to propagate than other properties (#39325) 2018-04-25 15:24:15 -04:00
Rémy Léone
e45a5e1c86 Add a Scaleway dynamic inventory plugin (#38739) 2018-04-25 13:35:54 -04:00
Alberto Murillo
0f3480d359 docker_image: Fix idempotency of pull (#31956)
when pulling an image with force=yes the task was marked as changed
everytime even when the image hasn't changed.

This was due to a bad comparison of the image tag before the pull
and after the pull.

Fixes #22596

Signed-off-by: Alberto Murillo <albertomurillosilva@gmail.com>
2018-04-25 12:58:29 -04:00
Ryan S. Brown
d13eccb7bc [aws] fix excepted/expected misspelling 2018-04-25 12:48:05 -04:00
Zeust the Unoobian
db88cb8d8f Add note about sefcontext doing no restorecon (#39076)
* Add note about sefcontext doing no restorecon

To someone like me who is relatively new to SELinux, setting the
"reload" option to yes might suggest that a restorecon is automatically
executed after the semanage call, making the new file context effective
immediately. I have found out that this is not the case and would like
to clarify this to others.

+label: docsite_pr

* Replace note by one suggested by reviewer

Reviewer dagwieers suggested a better notice text during review of my
original one, giving recommendations about what to do to actually get
the newly chosen SELinux context applied to the file.
2018-04-25 18:05:03 +02:00
Alicia Cozine
fdcf8c7f74
removes broken link to old module name (#39249) 2018-04-25 09:23:47 -05:00
Alicia Cozine
0d38c80395
fixes broken links in Amazon module docs (#39248) 2018-04-25 09:22:49 -05:00
Tim Rupp
fb264281de
Adds various features and fixes (#39271)
* a refactor of pool member and node modules to be inline with current f5 conventions
* Added priority_group_activation to pools
* various other small convention fixes and bug fixes
2018-04-25 07:16:11 -07:00
Martin Krizek
1c49cc4377
Actually check for import_role when loop detected (#39218) 2018-04-25 14:50:20 +02:00
Martin Krizek
2e6a917f9d
template: minor docs fixes (#39283) 2018-04-25 11:51:57 +02:00
saichint
1afec5a48e fix nxos_snmp_community issues (#39258) 2018-04-25 13:16:41 +05:30
Trishna Guha
86817cdd52
Add aggregate example in nxos_l2_interface module doc (#39275)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-04-25 12:56:54 +05:30
Trishna Guha
6db3f522c8
sub-interface support for nxos module (#37392)
* nxos sub-interface support

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

* update l3_interface test

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

* Add integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-04-25 12:45:56 +05:30
Tim Rupp
9940b5db9c
Adds DNS profile module for BIGIP (#39270)
This module can be used for managing DNS profiles on a BIGIP
2018-04-24 21:05:30 -07:00
Tim Rupp
20d5b04ac4
Adds udp profile module for bigip (#39269)
This module can be used to manage UDP profiles on a bigip
2018-04-24 20:35:42 -07:00
Tim Rupp
434ad97c39
Adds tcp profile module for BIGIP (#39268)
This patch adds a module to support manipulation of TCP profiles
on a BIGIP
2018-04-24 20:05:31 -07:00
Tim Rupp
256b5535ec
Various fixes to F5 modules (#39255)
* Adds gnat provisioning to bigip_provision
* Adds special handling for AFM in bigip_provision
* Add device rebooting for provisioning as necessary
* Refactored route domain module to be inline with current f5 conventions
* Minor refactors across modules
2018-04-24 19:49:52 -07:00
Yuwei Zhou
39ca41eb1b Fixes some NIC bugs (#39213)
* add loadbalancer

* dict check nullable

* add default vallue when get list

* create backend addr pool

* fix the set

* fix to dict

* fix ideponement

* use param security group name when create

* nic can has no nsg

* add test

* fix

* fix

* fix

* fix idemponet

* add document

* fix test

* add configuration

* fix

* fix

* remove all resources

* fix

* fix test

* add version added

* fix lint

* fix lint

* fix lint

* remove new feature and only submit bugfix

* remove useless test

* fix
2018-04-25 09:54:19 +08:00
Toshio Kuratomi
72456711c3 Add note about the dangers of ANSIBLE_DEBUG (#39261)
* Add note about the dangers of ANSIBLE_DEBUG

* Wording tweaks
2018-04-24 17:30:41 -07:00
jctanner
2f32e0ba2d
Remove me from botmeta (#39263)
* Remove myself from team_vmware
* Remove myself from maintainership of all modules
2018-04-24 19:55:04 -04:00
Bryan Gurney
ce0eee905e Allow block map cache size modification. (#35667)
The VDO Ansible module currently cannot modify the block map cache
size (but can configure the block map cache size for new volumes).
Add the "Block map cache size" parameter to the list of modifiable
parameters.
2018-04-24 16:14:04 -04:00
Tim Rupp
fc753dd261
Adds the bigip_smtp module (#39243)
This module can be used to manage smtp settings on a bigip.
2018-04-24 12:20:49 -07:00
Alicia Cozine
0ca38ff595 gets rid of rst error on exos module docs (#39244) 2018-04-24 19:45:07 +01:00
Tim Rupp
e82a8d177f
Adds module for bigip service policies (#39240)
This patch includes a module for managing bigip service policies.
2018-04-24 11:06:34 -07:00
John R Barker
7c4b91844d
More validate module fixes (#39097)
* Fix type bool DOCUMENTATION issues
2018-04-24 18:05:50 +01:00
Joe Tauke
a6d2f6fd95 win_domain - Add ability to specify netbios name (#39084)
* Added netbios option to win_domain.ps1 and updated documentation

* formatting change

* formatting change

* adding version added line for domain_netbios_name

* Identation fix

* Clarity fixes for descriptions

Changes to description for netbios_domain_name and uniformity changes to other documentation sections (bringing them in line with other sections of the document).

* Fix minor indentation
2018-04-24 15:35:38 +10:00
Tim Rupp
ed05e46f5c
Adds bigip_snmp_community module (#39212)
This module can be used to manage snmp communities on a bigip
2018-04-23 22:32:17 -07:00
Tim Rupp
3227143dc8
Fixes coding conventions, adds a small feature (#39211)
Fixes some coding conventions and adds allowed_addresses to bigip_snmp_trap.
2018-04-23 22:06:33 -07:00
Tim Rupp
39e4754fc9
Fixes for convention incompatibilities (#39209)
Minor fixes for the f5 modules to use current conventions
2018-04-23 21:42:06 -07:00
Tim Rupp
37e114756d
Adds bigip_trunk (#39208)
This patch adds a new module for managing trunks on a bigip
2018-04-23 20:37:23 -07:00
Tim Rupp
3b11def7d0
Add timer policy module (#39206) 2018-04-23 20:30:28 -07:00
Jordan Borean
629efb6eaa
psexec: new module to run commands on a remote Windows host without WinRM (#36723)
* psexec: new module to run commands on a remote Windows host without WinRM

* fix up sanity issue, create test firewall rule for SMB traffic

* Fixed up yaml linting issues, trying to fix on the fly firewall rule

* Added SMB exception to catch when cleaning up PAExec exe

* Don't load profile for Azure hosts when becoming another user

* Fixed up example to use correct option

* Reworded notes section of module docs

* Simplified module options around process integrity levels and the system account
2018-04-24 12:15:15 +10:00
Tim Rupp
e254121729
Adds minor fixes and features to f5 modules (#39202)
* Add Mac_address parameter to bigip_traffic_group
* Fix docs
* Fix f5 conventions
2018-04-23 18:57:43 -07:00
Gianluca
0c96863ec6 Fix for win_get_url module (#39152) 2018-04-24 11:30:03 +10:00
Pierre-Louis Bonicoli
afef20827b openshift_raw & openshift_scale: fix broken import 2018-04-23 17:57:17 -07:00
Jordan Borean
b6afe6946d
Ansible.ModuleUtils.FileUtil - Add ability to test non file system provider paths (#39200) 2018-04-24 10:06:47 +10:00
Tim Rupp
19d229a8e0
Fixes F5 conventions and adds features (#39189)
This patch fixes a number of convention changes in F5 modules.
Additionally, it adds some features to bigip vlan and other modules
2018-04-23 15:46:09 -07:00
Brian Coca
4aac0f5f18
allow configuring sftp/scp executables (#36648)
* allow configuring sftp/scp executables

fixes #36616


also removed dupe test
2018-04-23 18:36:35 -04:00
Adrian Lopez
e7db3c0eba chkconfig localizes messages, ansible fails to recognise
In the particular case of executin "chkconfig --list NAME", ansible
checks the stderr looking for a particular english message.
This message is different in other languages, Spanish for example
(although it have been corrected in the latests versions)

Fixes #29818
2018-04-23 17:44:36 -04:00
Ryan Brown
9c9a70b168 Add retry to ec2_metadata_facts query (#38957)
* Add retry to ec2_metadata_facts query

* Fix conditional to allow for 404 errors
2018-04-23 15:58:35 -04:00
Matt Martz
e79823191a
Add cgroup_memory_recap callback plugin used to profile memory (#38675)
* Add cgroup_memory_recap callback plugin used to profile memory

* Add uuid of task to output
2018-04-23 14:54:36 -05:00
Brian Coca
01e7f44e0d fixy typo 2018-04-23 15:46:15 -04:00
Brian Coca
fe5e6d74af better handle appending \n on stderr
fixes #39007
2018-04-23 15:46:15 -04:00
Brian Coca
e4dbabbef2 make individual bad paths a warning
still error if none of the paths provided was usable

fixes #39044
2018-04-23 15:17:22 -04:00
Tim Rupp
d38ae9b6c9
Adds the bigip_data_group module (#39180)
This module can be used to manipulate bigip data groups.
2018-04-23 11:52:57 -07:00
Matt Clay
c262dbfd30 Use https for links to ansible.com domains. 2018-04-23 11:33:56 -07:00
Rafael Vencioneck
0d1e9bfe90 Adding exos_command cli_conf module (#37775)
* Adding exos_command cli_conf module

* fixing documentation, indentation and metadata_version

* removing doc fragmentation and adding required import

* removing unnecessary code and including company name on short_description

* updating BOTMETA.yml with exos module information
2018-04-23 23:23:09 +05:30
Pierre-Louis Bonicoli
2f535a339c azure_rm_storageaccount: fix broken import 2018-04-23 09:04:03 -07:00
shanumondal
b740d68eaa Fixed bug to set hostTypeIndex correctly at the time of netapp_e_host create. (#39148)
Issue link: https://github.com/ansible/ansible/issues/39143

Correct post_body made by replacing host_type with hostType while creating
host.
2018-04-23 11:31:52 -04:00
saichint
6eecbf10e6 fix nxos_igmp_interface issues (#38752)
* fix nxos_igmp_interface issues

* shippable fix

* fix oif_prefix and oif_source

* shippable fix

* shippable fix

* shippable fix

* add an example for oif_ps

* review comments

* review comments

* more review comments

* fix typo
2018-04-23 20:38:49 +05:30
Will Thames
412373ce8e Improve ec2_ami tests (#38987)
* Improve ec2_ami tests

Ensure that ec2_ami_image_id fact gets set immediately after AMI
creation so that they get torn down even if tests fail

Use YAML anchor to simplify AWS credential passing

Use aws_connection_info to reduce AWS credential boilerplate

Improve exception handling when updating image attributes

Error messages weren't correctly formatted to show image ids.
2018-04-23 07:54:49 -04:00
Loïc Blot
176ebfd471 k8s inventory: add pod nodeport (#39107)
Node port field is not populated on K8S pods, and it's certainely the most useful port to use in pod when we need to interact with ansible outside of the cluster
2018-04-23 07:51:33 -04:00
Alan Rominger
f072e6c15a add newer syntax to detached HEAD check (#38879) 2018-04-23 13:40:54 +02:00
Eitan Akman
80d7e22f5e Fix misuse of 'self' in lib/ansible/module_utils/network/eos/eos.py. … (#39074)
* Fix misuse of 'self' in lib/ansible/module_utils/network/eos/eos.py. Method load_config

* Fix all instances of self.config(self,...
2018-04-23 15:40:34 +05:30
bmfp
4f36d7965e We need to return virtual_facts after VMWare platform detection (#38237) 2018-04-23 05:43:53 -04:00
Martin Krizek
ca164749b4 git: clarify key_file param in docs (#39147) 2018-04-23 11:05:37 +02:00
Tim Steinbach
f61172e6c7 vmware: Add portgroup_portkey and portgroup_key (#38958)
* VMware: apply correct value for datacenter in TC

Signed-off-by: Tim Steinbach <tim@nequissimus.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-23 14:04:35 +05:30
David Passante
7437d6fdc4 cs_ip_address: add a "tags" parameter to ensure idempotency (#39016)
* cs_ip_address: add a "tags" parameter to manage idempotency

* cs_ip_address: add integration tests
2018-04-22 20:13:01 +02:00
Selivanov Pavel
b47c04a70e Fixes #38985 (#39070)
Changing interface dictionary while iterating over interface.keys() produced "RuntimeError: dictionary changed size during iteration"
2018-04-22 04:03:31 -04:00
Ryan Brown
7544c59a23 Remove ResponseMetadata key from aws_caller_facts (#39102) 2018-04-20 18:31:35 -04:00
Benjamin Ness
d36537513e [ec2_ami] Add missing parameters while handling botocore Exceptions. Fixes TypeError exception (#39105) 2018-04-20 18:30:10 -04:00
Toshio Kuratomi
ce796bc34d Clarify the behaviour of file's src parameter with relative paths
Fixes #21401

Also sdd some more tests to validate file state=link creates a symlink
which points to the file we intended.
2018-04-20 14:12:27 -07:00
Toshio Kuratomi
8eaef34340 Ansible_managed is only available to the template and win_template modules
Update the config docs to note that.

Fixes #37219
2018-04-20 16:07:10 -04:00
Toshio Kuratomi
f332151f59 Fix copy to only follow symlinks for files in the non-recursive case
Revert "**Temporary**"

This reverts commit 28b86b1148.

We don't need this now that copy has been fixed
2018-04-20 10:04:24 -07:00
John R Barker
9e028ab704
Modules to link relatively to docs (#39081)
* Modules to link relatively to docs

* consistency
2018-04-20 17:35:50 +01:00
Ryan Brown
f428108845
[terraform] Disable input prompts during terraform init/plan/apply (#38842)
Per Hashicorp's [guidelines][1] for automated use of terraform CLI, this PR
adds the `-input=false` option to all the commands executed in the
module. If input is required, this causes a hard failure that will
become a module failure.

[1]: https://www.terraform.io/guides/running-terraform-in-automation.html
2018-04-20 12:28:49 -04:00
Ganesh Nalawade
eebfa66c2b Fix ios and iosxr terminal prompt regex (#39063)
Fixes #38732

Make matching leading newline for cli prompt
optional as there are cases when returned repsonse
for ios/iosx remote host doesn't have newline before
cli prompt.
2018-04-20 10:20:13 -06:00
Matt Martz
afcc9ddf8c
Cache task_vars to speed up IncludedFile.process_include_results (#39026) 2018-04-20 11:18:04 -05:00
Sumit Jaiswal
fd50248463 nios lookup errors out when there are no results #37970 (#39027)
* Update nios.py

* Update nios.py

* Update nios.py

* nios lookup errors out when there are no results #37970  Open	

Indentation failure issue resolved

* Returning empty list instead of None

In case of no results, res will be returned as an empty list instead of None (implementing ganeshrn comment)
2018-04-20 09:14:47 -06:00
John Steel
2e2cfa6232 Update dnsmadeeasy.py (#38731)
<!--- Your description here -->
If you omit the record type on state absent you will get "record_type not yet supported". Although in my experience so far, if you put the record type it still fails to remove the record but it doesn't crash. (#38730)
+label: docsite_pr
2018-04-20 15:42:42 +02:00
Ed Schaller
e6299298f9 Extend interfaces_file to handle sources-directory (#37809) 2018-04-20 07:01:46 -04:00
nekottyo
74420ecadf Fix bool notation in systemd (#39064) 2018-04-20 06:44:48 -04:00
Matthew Stone
d030032b47 Extreme Networks SLXOS Config Module (#38607)
* Adding slxos_config module and supporing util functions.

* Adding slxos module_utils load_config test

* Adding slxos_config module tests

* Removing unneeded required false statements from slxos_config module

* Removing version_aded from slxos_config module

* Removing force and save from slxos config module

* Removing save test
2018-04-20 08:52:20 +01:00
Matt Clay
9e8889bb70
Fix more docs errors. (#39051)
* Fix remaining unknown-document docs errors.
* Fix last toc-tree-missing-document docs error.
2018-04-20 00:24:47 -07:00
Dustin Rue
dbd0272f2e Update proxmox_kvm.py (#39045) 2018-04-20 09:06:53 +02:00
nekottyo
f30698f65d Fix typo in urls.py (#39048) 2018-04-20 09:04:18 +02:00
Martin Krizek
62d2df74b0 apt: fix build-dep idempotency (#38999) 2018-04-20 07:57:14 +02:00
Brian Coca
11c40bcbda forman as inv plugin
updated with newer methods
fixed ssl name to match ansible convention
more options for host info
added vars_prefix
added comments explaining current flow
reformated commentd out code so pep8 can be happy
enabled caching
2018-04-19 17:07:47 -04:00
Thomas Krahn
7320d29851 Update tree.py
Fix wording (commadn instead of command)
2018-04-19 15:51:06 -04:00
Sudheer Satyanarayana
785c660432 Clarify recursive
If recursive is set to yes, the module changes the attributes of the directory recursively even though state: directory is not set.
2018-04-19 12:08:36 -07:00
pcahyna
a81c6668eb File module: correct description of "state" (#36327)
* File module: correct description of "state"

It was probably intended to say "intermediate subdirectories will be created" and not "immediate subdirectories will be created".
2018-04-19 12:04:48 -07:00
Adam Dobrawy
af9d6aadf0 [file] Update description of state (#38451)
* [file] Update description of state
2018-04-19 11:52:43 -07:00
Abhijit Menon-Sen
ede1d6158a Fix typo(-ish)
The «if err» test always passed after #cf938e99926 changed the earlier
assignment to always set err to "\n" if stderr was empty, and so every
script plugin (e.g., ec2.py) started to always report an empty ERROR.
2018-04-19 22:27:48 +05:30
lazouz
a1759b02cd add user password lock option to user module (#37962)
* add user password lock option to user module

* fixup! add user password lock option to user module

* add unlock, set no default

* fixup! add unlock, set no default

* fixup! fixup! add unlock, set no default

* add lock password for FreeBSD, netBSD

* fixup! add lock password for FreeBSD, netBSD
2018-04-19 10:07:49 -04:00
Abhijeet Kasurde
268c682a05 VMware: new module : vmware_cluster_facts (#37105)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-19 05:41:04 -04:00
Olivier Bourdon
87a07e81a9 Fix interface method change (#38996) 2018-04-19 05:05:39 -04:00
Sloane Hertel
e2aa1155ba [ec2_ami] Ensure name or image_id is provided for state=present (#38972)
Add integration tests for backward compatibility and ensuring name or image_id is provided
2018-04-19 09:28:25 +10:00
Matt Martz
cdb79b0e3a
Consider parent also when comparing IncludedFile (#37083)
* Consider parent also when comparing IncludedFile

* Add new tests for IncludedFile and convert to pytest
2018-04-18 17:02:14 -05:00
John R Barker
c1ae1c8251
Fix broken yaml (#38966) 2018-04-18 20:54:14 +01:00
Alicia Cozine
0ebc0b9e5a adds FAQ TOC entry, links & examples to modules (#38706)
* adds FAQ TOC entry, links & examples to modules
* moves link to Notes, corrects examples
2018-04-18 11:41:54 -07:00
Ondra Machacek
aeaf0e358f ovirt: Use id instead of name of Blank template (#38948)
Since Blank template could be renamed we must use it's ID to be sure we
are using the Blank template.
2018-04-18 14:17:11 -04:00
Will Thames
dc09ddfbd5 elb_target_group: use port parameter as default for target port (#38578)
The docs suggest that `port` parameter is the default port upon
which targets listen. As such, a target need only provide a `Port`
key to override the default.
2018-04-18 13:19:54 -04:00
Will Thames
6b970348b1 [AWS cloudfront_distribution] Update minimum protocol versions (#38644)
As per docs, the current set of values is

```
'SSLv3'|'TLSv1'|'TLSv1_2016'|'TLSv1.1_2016'|'TLSv1.2_2018'
```

Fixes #38642
2018-04-18 13:01:30 -04:00
David Gunter
a833281e22 Add Yarn module (#19026)
* Add yarn module based off of NPM module, adjust syntax for install cmd

* Update author list

* Add Return docbloc

* Remove extra var assignment

* Always return output without emojis, small changes for yarn 0.16.1

* Move import line, add ANSIBLE_METADATA, bump version_added

* Updating module format to meet newest lint requirements. Update options and example docs.

* Bring back RETURN block and main() execution.

* All trailing whitespace removed.

* Remove json try/except.

* Add initial pass at setting up Yarn integration tests.

* Add better handling for latest and removal states. Add tests for upgrading a single package.

* Fix issue where state=latest for installing all packages caused failure.

* Set yarn bin to latest version for tests. Fix sanity tests.

* Switch template task to copy task in yarn integration tests.
2018-04-18 08:19:38 -05:00
Ondra Machacek
af8a20d8a1 ovirt: Support removing unmanaged networks (#38940) 2018-04-18 07:28:02 -04:00
Deepak Agrawal
bdd105f740
Handle Duplex parsing on some version of iosxr (#38738)
* Handle Duplex parsing on some version of iosxr

* use re noncapture group for multiple match as suggested by Eric
2018-04-18 13:22:08 +05:30
Martin Krizek
8173602a34
Add expandvars jinja2 filter (#38805)
* Add expandvars jinja2 filter

* Add docs

* Minor edit
2018-04-18 09:29:19 +02:00
Ryo IGARASHI
1cc2aeb40a Update apt.py (#37972)
* Update apt.py

Proposing description of "cache_valid_time" for Ansible 2.4 or greater.
If 'cache_valid_time' is set, 'update_cache' is set implicitly.
This means the logic should be reversed.

 label: docsite_pr

* Proposing the description of "cache_valid_time"..

This commit follows the discussion in #37972.

 label: docsite_pr
2018-04-18 08:41:10 +02:00
Jason Lingohr
d684c51815 Update win_certificate_store.py (#38860)
* Update win_certificate_store.py

Improvements to describe the different destination stores.

+label: docsite_pr

* Update win_certificate_store.py

Whole line needs to be quoted -- lingfish YAML fail.
2018-04-18 14:16:31 +10:00
Jordan Borean
77ef4802f0
win_regedit: stabilise tests (#38912) 2018-04-18 08:11:44 +10:00
Brad Macpherson
11a5671d68 [cloud] New module: AWS EC2 Elastic IP address facts (#38823) 2018-04-17 15:10:54 -04:00
Ryan Brown
44d06f8858
[cloud] Add support for updating IAM role with ec2_instance module (#38812)
* [cloud] Add support for updating IAM role with ec2_instance module

* Add test for updating IAM role
2018-04-17 15:02:46 -04:00
Thierry BOUVET
4117b2dd29 Fix documentation fragments for docker (#38378) 2018-04-17 08:51:56 -07:00
Matt Martz
68e3ff80a7 Error if docker and docker-py are simultaneously (#38884)
* Error if docker and docker-py are simultaneously installed over top of each other. Fixes #36125

* Remove duplicate installed
2018-04-17 11:29:24 -04:00
Nathaniel Case
3b3c72f3e5
Fix use of bytes in cliconf plugins for Python 3 (#37715)
* Remove raw byte-strings from cliconf plugins of supported platforms + edgeos

Remove uses of to_bytes, too

* Update CliConfBase docstring to reflect current position on byte strings
2018-04-17 10:15:21 -04:00
Joshi Friberg
be6628cd3d [docs] Correct misspelled domain in icinga2_host.py (#38867)
<!--- Your description here -->
Just a misspelled link. Updated.
+label: docsite_pr
2018-04-17 10:05:40 -04:00
Will Thames
0b4f92d852 Lambda policy arn (#38863)
* Fix the function_name handling logic for lambda_policy

Switch the logic handling function_names that are ARNs
so that ARNs are correctly handled and detected

* Add tests for lambda_policy function_arn

Ensure that function_arn works.

Needs a reasonable ansible_lambda_role.
2018-04-17 09:53:59 -04:00
Rémy Léone
98fb47b061 Fix deprecated warnings 2018-04-17 06:47:37 -07:00
jjshoe
3664c74cb8 Fix idempotency in apt module (#38858)
* Idempotency fix

Only show a change, if we did indeed update the cache.

* Apply changes from review feedback
2018-04-17 08:33:22 -05:00
saichint
a372142434 fix ntp_auth issues (#38824) 2018-04-17 08:25:05 -04:00
Abhijeet Kasurde
93fbfbe4cf VMware: Check if cluster exists or not (#38517)
This fix adds a check if Datacenter contains cluster but does not
have ESXi server associated with that cluster.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-17 05:28:00 -04:00
Abhijeet Kasurde
efc3f4f824 VMware: handle permission denied while reading facts (#37163)
This fix adds exception handling which is raised when user
does not have correct set of permissions/privileges to read virtual machine
facts especially host system configuration.

Fixes: #37056

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-17 05:18:07 -04:00
ppanczyk
7850dfa9d9 [fix] issue #30638 - onlyupgrade handling (#31577)
Fixes #30638
2018-04-17 03:49:21 -04:00
Ganesh Nalawade
67d561b0c8
Add supported connection in junos module documentation (#38813)
* Add supported connection in junos module documentation

Add supported connection type in junos module doucmentation.

* adds link to platform docs

* makes recommended connection a code snippet

* does this fix banner and command?

* does this fix the rest of the errors?
2018-04-17 10:27:29 +05:30
Mat Wilson
8eb94ccbd5 Add support for dzdo flags Fixes #38766 2018-04-16 23:28:51 -04:00
Jordan Borean
f1c16438c1
win_updates: fix when failed is not present in output (#38856) 2018-04-17 10:45:53 +10:00
Brian Coca
3b7f5aef07 name cron 2018-04-16 19:02:14 -04:00
Brian Coca
135ec86eb5 fix exception on lookup ignore error
no log, so only_log ...
2018-04-16 18:04:52 -04:00
Gaudenz Steinlin
0ea7329553 Fix zabbix_host for Zabbix Server versions < 3.0 (#38665)
The tls_* parameters are not present in Zabbix Server versions prior to
3.0. Thus the API response does not contain these keys and the
zabbix_host module failed. This commit adds checks if the parameters are
present in the API response and otherwise just completely ignores these
parameters. The documentation already states that they are not supported
for Zabbix Server versions below 3.0.
2018-04-16 17:57:57 -04:00
Matt Martz
354aa8d602
Skip self._parent on dynamic, defer to grandparent for attr lookup (#38827)
* Skip self._parent on dynamic, defer to grandparent for attr lookup

* Revert _inheritable

* Add tests for include inheritance from static blocks

Fixes #38037 #36194
2018-04-16 16:46:47 -05:00
jctanner
068b9ac523 keep track of original inventory hostname in play context (#38818)
this change further enables the ansible-vcr project to collect fixtures per host in
situations where the host context is totally lost due to delegation.

* Keep some original pre-delegate values in connection options
2018-04-16 17:16:57 -04:00
Brian Coca
265d838ec9 fix displaying group vars in graph 2018-04-16 15:24:31 -04:00
Brian Coca
5828023e54 bool 2018-04-16 15:22:44 -04:00
Brian Coca
1d58585945 minor fixes, also handle 'values' passed to dscl 2018-04-16 15:22:44 -04:00
Adam Furbee
790a117b21 added support for hidden users on macOS 2018-04-16 15:22:44 -04:00
Matt Martz
f474195a3b
Attempt 4: Prevent reparenting a block with itself (#38747)
* More concisely reparent, ensuring we don't go too shallow or too deep in this process. Fixes #38357

* More explicit reparenting, with a short circuit for a common case

* We need new_block to have a parent, otherwise we lose context with this approach

* Remove duplicate parent assignment

* Change callers of Block.copy to not use exclude_parent=True, when including the parent, exclude tasks
2018-04-16 12:33:08 -05:00
Ondra Machacek
8c49c867d2 ovirt_host_networks: Fix removing of network attachments (#38816) 2018-04-16 10:54:19 -04:00
Brian Coca
bdbb89378f
centralize doc/config plugin lists (#38775)
* centralize doc/config plugin lists

also update list for generation in docsite
added note to ensure they are in sync

* updated shell page to list plugins

added some more docs hinting at plugins being configurable

* fix edit link for plugins
2018-04-16 09:29:49 -04:00
Victor Bocharsky
a30befa609 Remove duplicated "instead" word (#38800)
* Remove duplicated "instead" word

* Actually fix the message
2018-04-16 09:23:43 -04:00
Ryan Brown
40b7a63d1a Add docs to AnsibleAWSModule.client retry settings (#38689) 2018-04-16 08:48:10 -04:00
Abhijeet Kasurde
ae7e391dab Minor fixes in terraform module (#38438)
This fix adds following -
* Check for None or blank value in project_path
* Make terraform binary path as required

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-16 08:43:13 -04:00
Abhijeet Kasurde
9ebad79f40 influxdb: Add condition for retries argument (#38441)
'retries' argument was added to InfluxDBClient in version 4.1.0,
versions lower than this fails if retries are specified.
This fix adds a conditional to check if version is greater than equal to
4.1.0 and depending upon that adds 'retries' option.

Fixes: #38204

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-15 22:05:51 -04:00
Martin Krizek
1ff5e975d9 yum: docs: name is not required (#38758) 2018-04-16 07:15:57 +05:30
Sébastien Portebois
f2b65fc5fe Fix documentation for aws_ssm and aws_ssm_parameter_store (#38352)
Fix typos aws ssm vs aws_ssm and quotes
2018-04-14 13:29:47 +10:00
Brian Coca
b4d235ca8d minor fixes 2018-04-13 18:50:42 -04:00