Commit graph

898 commits

Author SHA1 Message Date
Ganesh B. Nalawade
d1ff8e2dca Update ssh_config to accept file path 2018-07-04 11:37:35 +05:30
Ganesh B. Nalawade
fa8b07e452 Fix doc indentation 2018-07-04 10:59:18 +05:30
Ganesh B. Nalawade
74a23f50e4 Fix CI failure 2018-07-04 10:14:18 +05:30
Ganesh B. Nalawade
8d8d4b3d86 Add options for jumphost in netconf connetion
Fixes #37262
Fixes #36284

*  Updates options in netconf connection to enable
   bastion/jump host setting using configuration/enviornment
   varaibles.
*  Update troubleshooting docs from using bastion host with netconf
   connection
2018-07-03 23:54:26 +05:30
Dag Wieers
75c8d8bfc2
Fix aci_tenant module references
<!--- Your description here -->

+label: docsite_pr
2018-07-03 10:39:46 +02:00
Andrew Gaffney
21b99bff94
Fix 'ansible-doc' command in action plugin docs (#42206) 2018-07-02 13:26:46 -05:00
Brian Coca
d497eba196 several FAQ updates and clarifications 2018-07-02 10:46:59 -04:00
Sam Doran
fb55038d75 Add warning when using an empty regexp in lineinfile (#42013)
* Revert "Account for empty string regexp in lineinfile (#41451)"

This reverts commit 4b5b4a760c.

* Use context managers for interacting with files

* Store line and regexp parameters in a variable

* Add warning when regexp is an empty string

* Remove '=' from error messages

* Update warning message and add changelog

* Add tests

* Improve warning message

Offer an equivalent regexp that won't trigger the warning.
Update tests to match new warning.

* Add porting guide entry for lineinfile change
2018-06-29 17:15:43 -07:00
Brian Coca
b6f2aad600 ignore ansible.cfg in world writable cwd (#42070)
* ignore ansible.cfg in world writable cwd
 * also added 'warnings' to config
 * updated man page template
2018-06-29 16:46:10 -07:00
John R Barker
e9dbebfa57
Fix some broken links (#42079)
* Fix some broken links

* We now only serve via https
* redirects don't work with anchors, so update those links (devel/dev_guide)
2018-06-29 11:12:01 -07:00
Matt Martz
aea396f04b
Add items2dict filter that is the reverse of dict2items (#42071)
* Add items2dict filter that is the reverse of dict2items

* Address feedback about type checking, and add docs for zip/zip_longest
2018-06-29 10:47:07 -05:00
Alicia Cozine
e0a9a71b04 updates docs links to changelogs for all versions (#41289)
* updates docs links to changelogs for all versions

* updates latest 2.5 release
2018-06-28 13:09:22 -07:00
Abhijeet Kasurde
19ece7b740
VMware: Add scenario guide (#40075)
This adds a scenario guide for vmware

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-06-28 14:58:22 +05:30
Matt Clay
d4ed572e91 Update roadmap schedule for 2.6. 2018-06-26 21:52:58 -07:00
Matt Martz
11ce954226
Fix docs for all test. Fixes #41956 (#41965) 2018-06-26 14:53:58 -05:00
Troy Murray
15ce7c5bab change OS X to macOS (#41294)
* change OS X to macOS

<!--- Your description here -->

+label: docsite_pr

* Update all Mac OS X references to be macOS

* Drop extra Mac
2018-06-26 14:09:23 -04:00
Matt Clay
e60da3feaf Update 2.6 roadmap release schedule. 2018-06-25 22:10:37 -07:00
Jordan Borean
2af36412f9
runas + async - get working on older hosts (#41772)
* runas + async - get working on older hosts

* fixed up sanity issues

* Moved first task to end of test for CI race issues

* Minor change to async test to be more stable, change to runas become to not touch the disk

* moved async test back to normal spot
2018-06-26 14:40:49 +10:00
Ted Timmons
3d78dd6677 add a third way to disable cows (#41866)
* add a third way to disable cows

Cows are great, but there's a third way to disable. I'm sure my RST markup can be improved.

* oops, actually in ansible.cfg
2018-06-25 16:53:19 -04:00
Jordan Borean
0b2ec9b11c
windows dsc docs: fix missing colon in example (#41886) 2018-06-25 11:38:08 +10:00
Toshio Kuratomi
8841fdd481 Bump versions on release_and_maintenance doc
(cherry picked from commit c8b1b271c6)
2018-06-21 18:01:19 -07:00
Olivier Bourdon
06b73ff8f1 Add random_mac string filter (#39775)
Add new filter to generate random MAC addresses from
string prefix. See docs/docsite/rst/user_guide/playbooks_filters.rst
for more detailed infos.
2018-06-21 15:56:54 -05:00
Andrea Tartaglia
a342538aba Add shell out checks (#41545)
* Added error codes for shell_out checks

* Added ignore lines for allowed Modules

* Added shell out checks

* Fixed pep8

* Updated regex to only match subprocess.Popen

* Added failing modules to ignore.txt

* Wrong postgresql module in ignore.txt

* Removed bigip from ignore.txt
2018-06-21 11:58:39 -04:00
Abhijeet Kasurde
27b85e732d Argument spec must be dict/hash (#40858)
validate-modules should fail when argument is not dict/hash.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-06-20 12:05:49 -04:00
Matt Martz
ee221859cd
Load role vars and defaults before parsing tasks (#40982)
* Load role vars and defaults before parsing tasks. Fixes #40163

* Add porting guide note

* Wording clarifications

* typo

* grammar fixes
2018-06-18 10:56:55 -05:00
zharalim
d52ea9518d Update playbooks_filters.rst (#41628)
Add an example on how to use regexp_replace to modify list items.

+label: docsite_pr

Fix typo
2018-06-18 10:20:23 -04:00
Jon Dufresne
bf304832ff Prefer readthedocs.io instead of readthedocs.org for doc links (#41537)
Read the Docs moved hosting to readthedocs.io instead of
readthedocs.org. Fix all links in the project.

For additional details, see:

https://blog.readthedocs.com/securing-subdomains/

> Starting today, Read the Docs will start hosting projects from
> subdomains on the domain readthedocs.io, instead of on
> readthedocs.org. This change addresses some security concerns around
> site cookies while hosting user generated data on the same domain as
> our dashboard.
2018-06-18 08:22:50 -04:00
Jon Dufresne
dc7e50fa90 Update additional pypi.python.org URLs to pypi.org (#41373)
For details on the new PyPI, see the blog post:

https://pythoninsider.blogspot.ca/2018/04/new-pypi-launched-legacy-pypi-shutting.html
2018-06-17 14:01:18 +02:00
Abhijeet Kasurde
01cdc22ac6
Add documentation around package dependencies (#41437)
Documented procedure to handle package dependencies required by
packages which are Ansible dependencies.

Fixes: #30732
Fixes: #16571

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-06-15 20:44:01 +05:30
Jeff Geerling
a4f49ed648 Fix typos in blocks documentation examples. (#41508) 2018-06-14 16:14:11 +10:00
Matt Martz
dd8d74c351
Add docs for debugger for keyword dumper (#41421) 2018-06-11 16:18:01 -05:00
Sam Doran
30da71d880
Update docs on import/include tasks (#33032) 2018-06-11 13:01:53 -04:00
Matt Clay
2ecf1d35d3 Update 2.6 roadmap schedule. 2018-06-09 00:11:17 -07:00
wazzaz
91803c6ad3 Format fix on VMware Guide (#41272)
* Updating format of VMware Guide: small formatting error - hyperlink to module
2018-06-08 11:15:04 -05:00
MironVeryanskiy
f785bf3a9c Fix docs typo modules_intro.rst (#40835)
Fixed typo in modules_intro.rst.

+label: docsite_pr
2018-06-07 15:17:20 -05:00
Hideki Saito
d7df072b96 Add syslog_facility parameter handling with systemd.journal (#41078)
* Add syslog_facility parameter handling with systemd.journal

- Fixed issue #41072

Signed-off-by: Hideki Saito <saito@fgrep.org>
2018-06-07 12:23:13 -07:00
Matt Martz
4ca23cb147
Ensure the 2.7 porting guide is in the toc (#41267) 2018-06-07 12:22:23 -05:00
Till Maas
8be3924d4e Add Fedora as possible ansible_distribution value (#41177)
"ansible_distribution" can also be Fedora

+label: docsite_pr
2018-06-06 11:15:00 +02:00
Abhijeet Kasurde
e8227e8395
Add note about updating pip (#41124)
Fixes: #39120

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-06-06 09:27:07 +05:30
Matt Clay
70c475da6c Implement new changelog generator. 2018-06-05 19:08:15 -07:00
Toshio Kuratomi
cef4d862bc
Better error message if the template is not utf-8 encoded (#41030)
* Better error message if the template is not utf-8 encoded

Also document this in the porting guide
2018-06-05 19:07:11 -07:00
Jacob Floyd
4fa2fb9c89 Docs fix: ansible_group_priority defaults to 1
The docs committed in #28777 were inconsistent.
This clarifies that the default `ansible_group_priority` is `1`.[1][2]

[1] https://github.com/ansible/ansible/blob/153c9bd/lib/ansible/inventory/group.py#L40
[2] https://github.com/ansible/ansible/blob/153c9bd/lib/ansible/cli/inventory.py#L236
2018-06-05 20:31:10 -04:00
Matt Martz
1cec3c8daf Add docs detailing how to convert many with_X style loops to use loop and filters (#40964)
* Add docs detailing how to convert many with_X style loops to use loop and filters. Fixes #40727

* Switch lookup used in query vs lookup comparison, to not recommend use of nested lookup

* Improve docs based on feedback
2018-06-01 10:37:21 -04:00
Matt Clay
f426fcd9a6 Update roadmap schedule for 2.6. 2018-05-31 13:12:27 -07:00
Matt Martz
96ec32630e Deprecate squash_actions (#35978)
* Deprecate squash_actions

* Wording update

* Update wording and version

* Update versions to reflect 2.7 deprecation

* Add 2.7 porting guide
2018-05-30 12:05:03 -05:00
Fabian von Feilitzsch
4d77878654 K8s dynamic collected changes (#40745)
* Move k8s modules to dynamic backend

* update required openshift version

* update -> patch

* use new dynamic client exceptions

* style

* guard urllib3 import

* guard ansibleerror import

* give more information about error cause

* format in variable

* style

* rename tests

* Search for provided kind in a few more places to match old behavior, properly handle failure

* make common code use fail instead of fail_json, to work for lookup plugins as well

* update docs

* move openshift_raw tests into k8s tests

* fix typo

* Use diff of response and resource to determine change, don't do any checking client-side before making requests

* remove duplicate yaml blocks

* Update porting guide for k8s module

* remove invalid doc refs

* If fuzzy searching finds a resource, update resource_definition to match proper kind and version

* remote unsupported openshift_raw variables

* properly check environment variables when determining auth method:
2018-05-30 12:04:48 -05:00
Alicia Cozine
0e0a5243c8
reinstates connection:local as an option for nxapi (#40834) 2018-05-30 08:43:33 -05:00
Michael Scherer
5a677e140b Fix galaxy doc (#40755)
s/depeneding/depending/ and s/conditinoals/conditionals/
2018-05-30 01:54:12 +02:00
Alicia Cozine
e2146a7696
updates network examples to 2.6 (#40831) 2018-05-29 11:14:41 -05:00
Alicia Cozine
43ca9d1548
adds table of connections by platform (#40688) 2018-05-25 14:03:33 -05:00
Sam Doran
8746d9ef87 Add guidelines on developing lookup plugins (#38681) 2018-05-25 12:49:33 -05:00
Antoine Pietri
313a46744d Add a 'machinectl shell' become_method (#39826)
* Add a 'machinectl shell' become_method

* docs: add explanations for the machinectl become_method

* docs: machinectl become_method: specify this part is specific to Linux+systemd setups
2018-05-25 10:52:53 -05:00
Harri Hämäläinen
8dcb6c288c Document capability of giving regex search flags (#39893) 2018-05-25 04:16:08 -04:00
Andrew Gaffney
24e55615a0 Docs for module_defaults feature (#39932) 2018-05-25 04:15:44 -04:00
Pilou
3f5f5faec6 doc: config intro, add link to searched locations (#39614) 2018-05-25 00:29:29 -04:00
Greg DeKoenigsberg
e5ccdaec88 Better Galaxy description for role reuse (#40557)
* Better Galaxy description for role reuse

* update per gundalow review
2018-05-24 22:47:03 -05:00
Martin Kimmerle
294c3a0a7c [docs][minor] Variables user guide: fix grammar (#39427) 2018-05-24 23:38:22 -04:00
Brian Coca
bc93038943 added information on keyword/vars separation (#39561)
* added information on keyword/vars separation

fixes #39551

* updated as per fb
2018-05-24 23:30:20 -04:00
Adam "Bucky" Townsend
94049680c3 Add OpenBSD password encryption (#40647)
OpenBSD comes with its own encryption utility as well, which must be run on the password text `encrypt <password>`. following the code block above, i just included the base command in the code block. I wasn't quite sure where to add my change, so I put it at the bottom of the section since the rest all flows well together.

+label: docsite_pr
2018-05-24 10:14:14 -04:00
Yunge Zhu
21ea92feca Fixes #36621, support adfs auth through adal (#37909)
* update username/password auth to use adal lib

* remove default client_id after discussion

* fix lint error: trailing whitespace
2018-05-23 16:37:44 -07:00
Adam Miller
21feca6683 Docs - add shared snippet note about password prompts for ssh keys (#40633)
* Docs - add shared snippet note about password prompts for ssh keys

Signed-off-by: Adam Miller <admiller@redhat.com>

* add note to ssh connection plugin, fix markup, fix typo

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-05-23 18:01:55 -04:00
flowerysong
e2c1589201 Add cidr_merge filter (#36081) 2018-05-23 14:35:23 -05:00
Matt Martz
a5f05c6fc2 [WIP] Start of subelements filter (#39829)
* Start of subelements filter

* Add docs for subelements filter
2018-05-23 11:54:13 -04:00
Jordan Borean
070a5557d1
always_run: removed deprecated always_run task option (#40470) 2018-05-23 07:10:36 +10:00
Matt Clay
4b2bba62b3 Update 2.6 roadmap schedule. 2018-05-22 10:57:51 -07:00
Alicia Cozine
69eef14e3b uses .txt for shared content (#40416) 2018-05-22 12:01:00 +01:00
Matt Clay
8d39515914 Remove tab check from validate-modules.
It is redundant with the pycodestyle W191 "indentation contains tabs" check.
2018-05-21 14:45:19 -07:00
Matt Clay
47173cc8b1 Clarify wording on 2.6 roadmap schedule. (#40408)
* Clarify wording on 2.6 roadmap schedule.

* Remove redundant use of "Core".
2018-05-18 13:39:10 -05:00
Brian Coca
5cf1a5edfd corrected version added 2018-05-18 11:34:37 -04:00
Simon
fb6ae90f60 Memset: initial module, integration tests, module_utils and supporting documentation. (#40071)
*  * Memset:
   * module_utils and associated documentation.
   * module to manage DNS zones.
   * integration tests to run against Memset's API.

* * memset.py:
  * remove import of requests from memset.py in favour of internal Ansible modules.
  * import necessary Ansible modules for request and response handling.
  * create a response object in order to retain a stable interface to memset_api_call from existing modules.
  * rework memset_api_call to remove requests.
* memset_zone.py:
  * improve short description to be more verbose.
  * ensure all imports directly follow documentation.
  * remove any reference to requests.
  * correct keyerror carried over from elsewhere.

* remove dependency on requests from documentation string

* disable integration tests until we have a cleanup method available
2018-05-18 10:45:38 +01:00
Nathaniel Case
e9d7fa0418
HTTP(S) API connection plugin (#39224)
* HTTPAPI connection

* Punt run_commands to cliconf or httpapi

* Fake enable_mode on eapi

* Pull changes to nxos

* Move load_config to edit_config for future-preparedness

* Don't fail on lldp disabled

* Re-enable check_rc on nxos' run_commands

* Reorganize nxos httpapi plugin for compatibility

* draft docs for connection: httpapi

* restores docs for connection:local for eapi

* Add _remote_is_local to httpapi
2018-05-17 18:47:15 -04:00
Sam Doran
59e541e31a
Change behavior to behaviour in docs and tests (#39392)
* Change behavior to behaviour

- use existing fact to get hash setting rather than shell task
- fix code highlighting syntax in playbooks_variables.rst

* Re-wrote intro section; this entire topic needs a clean-up/rewrite.
2018-05-17 14:07:12 -04:00
Alexandre Chaussier
e493891d08 Fix flatten filter documentation 2018-05-17 10:42:41 -04:00
Ganesh Nalawade
1328cc1fa0
Update ROADMAP_2_6.rst 2018-05-17 16:10:35 +05:30
Ganesh Nalawade
c86860c911
Update ROADMAP_2_6.rst 2018-05-17 15:54:51 +05:30
Deepak Agrawal
4fd770f792
Update ROADMAP_2_6.rst 2018-05-17 11:57:50 +05:30
Toshio Kuratomi
6227c2ac75
More file refactoring (#40114)
* Set src in the state functions rather than the toplevel

A good API should only require passing one version of a piece of data
around so do that for src

* Move the rewriting of path into additional_parameter_handling

When the path is a directory we can rewrite the path to be a file inside
of the directory

* Emit a warning when src is used with a state where it should be ignored
2018-05-16 10:41:11 -07:00
Ken Celenza
ad1a7d90ff Update structure to include file extensions (#36967)
* Update structure to include file extensions

It is not clear to novice users that the host/group_vars files should be yaml files. This highlights that IMHO a bit more clearer.

* pluralize
2018-05-16 12:19:21 -04:00
Trishna Guha
465114958e
remove network_config,network_command from roadmap_2.6 (#40246)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-16 18:51:51 +05:30
Alicia Cozine
64f87867dd documents usage of enable mode on NXOS (#39859) 2018-05-15 20:04:24 +01:00
Trishna Guha
6e639b591f
networking roadmap cli modules (#40147)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-15 18:31:42 +05:30
Jordan Borean
e0813d7d47
become win: better error messages and docs update (#39936)
* become win: better error messages and docs update

* Fix syntax error and added changelog fragment
2018-05-15 09:33:36 +10:00
Jon Dufresne
1d640182c6 Update all pypi.python.org URLs to pypi.org (#38988)
For details on the new PyPI, see the blog post:

https://pythoninsider.blogspot.ca/2018/04/new-pypi-launched-legacy-pypi-shutting.html
2018-05-14 17:41:47 -05:00
Brian Coca
32c2aae258
document lookup errors optoin (#39645)
* document lookup errors optoin

* changed to doc

* updated as per feedback
2018-05-11 15:09:53 -04:00
Steve McLellan
5fd9954ccc Remove duplicate include in user_guide
Looks like two commits merged close to each other and an '-include'
got left along with its replacement '-include_tasks'
2018-05-10 16:42:35 -04:00
Chris Alfonso
02adb6520f Removing stretch items for 2.6 roadmap (#39757)
* netconf modules
  * gRPC connection plugin
2018-05-10 14:03:49 +01:00
Ewoud Kohl van Wijngaarden
e4efc191c5 Fix code snippet in playbook filters doc (#39798) 2018-05-10 12:05:24 +10:00
Ken Celenza
e476089bb9 spacing issue (#39884) 2018-05-09 10:08:59 +02:00
Cameron
854be6ef16 docs: fix 'ipmi' typo (#39823) 2018-05-08 09:15:56 +02:00
David Moreau Simard
8c27ffdf90 Add ARA Records Ansible to community tools (#39836)
ARA is an Ansible callback that records playbook run data in a local
or remote database. This data is exposed through a CLI client as well
as a reporting web application.
2018-05-07 22:18:52 -04:00
Matt Martz
1663b64e18
Allow subspec defaults to be processed when the parent argument is not supplied (#38967)
* Allow subspec defaults to be processed when the parent argument is not supplied

* Allow this to be configurable via apply_defaults on the parent

* Document attributes of arguments in argument_spec

* Switch manageiq_connection to use apply_defaults

* add choices to api_version in argument_spec
2018-05-07 11:23:13 -05:00
Elias
7f5820274f Update call method for parse_cli_textfsm (#38437)
+label: docsite_pr
2018-05-07 09:43:45 -05:00
Jordan Borean
fc210a4584
base64 filter: Added ability to specify encoding (#39714)
* base64 filter: Added ability to specify encoding

* Added unicode chars for further testing

* Removed errors to keep previous behaviour in place

* Removed surrogate pairs due to issues loading YAML in CI
2018-05-05 09:16:58 +10:00
Julien Palard
ab4cbfd5d3 FIX: Removing superfluous bloc wrongly introduced in 2b7799f817. (#39723) 2018-05-04 10:45:33 +02: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
scottb
0c0dc8d9fc
Adds documentation structure and stubs for new VMWare guide (#39246)
* Adding initial skeleton of VMWare docs

* Updated product name capitaliztion; ready for initial PR.

* Add few files and updated some links

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Fixed duplicate anchor tag
2018-05-03 08:05:28 -07:00
Toshio Kuratomi
1885883a88 Document follow changes
Add the file, blockinfile, and replace changes to the follow parameter
to the porting guide
2018-05-03 06:13:21 -07:00
Anna Liao
c812396793 Update playbooks_variables.rst (#39570)
<!--- Your description here -->

+label: docsite_pr
2018-05-01 23:02:32 -07:00
Abhijeet Kasurde
85ad2eae8a Fix typo in porting guides index page (#39582)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-05-01 23:00:59 -07:00
Matt Clay
054efb8d80
Update 2.6 roadmap dates. (#39573) 2018-05-01 15:07:37 -07:00