* 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
Address Firefox table-rendering issues in docs. Refactor to use colspan to provide table cells which can vary in width and indentation; the outermost has the greatest colspan, and each nested key has a colspan of one less than the parent, with padding cells for indentation.
Apply styling to table cells to get the table height to work without hacks or browser-specific
styling. Simplify the markup and CSS by removing extra divs. Use two passes over the options, return values, and return facts in the Jinja2 module-docs template: one to determine the maximum nesting depth to compute the maximum colspan needed, plus one to lay out the rows.
* 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:
* 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
This Makefile uses non-standard constructs. As such it can only be
parsed by GNU make, which is often installed as 'gmake' instead of
'make'. Using $(MAKE) ensures the same version of make gets called that
is used to execute the top level.
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
* 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>
* * 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
* 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
* 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.
* 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
* 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
* Treat C(...) as inline literal (as opposed to interpreted text).
* Making test for true and false more precise, to avoid matching 1, 1.0, etc.
* The 'is sameas' test already takes care of definedness.
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.
* 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
* 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
* 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
* 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
Updated GitHub Repos section to better explain what ansible-network@redhat.com is for (not an email list, but adding to the network-automation github repo.
* should not need <>, but fails without
* adds anchor to keywords page, uses it on plugins pages
* fixes envvar link errors
* harmonize file name and ref name as python_3
* removes undefined-lable from ignore list
* Update the documentation to list Python 3 as official
* Add some reference targets for inventory variables so we can link to docs
* Add a platform FAQ section
Populate it with
* virtualenv info (previously on the python3 support page)
* BSD (Link to the working with BSD page)
* Solaris (Document how to work around the non-POSIX shell on some
Solaris hosts)
Fixes#21594
* Fix some refs in the release_and_maintenance document
* Fix unindent error in module template
Fix for the module/plugin template unintentionally unindented inside of
a raw block, leading to errors like:
ERROR: docs/docsite/rst/modules/redshift_facts_module.rst:289:0: Explicit markup ends without a blank line; unexpected unindent.
* Make wording for Solaris troubleshooting better.
The big one is that we needed to set plugin_type when we processed the by_support template.
Also added to list_of_CATEGORY_plugins page (which might not be used)
and corrected a place where I did module_name instead of name_module
The regex to find labels inside of angle brackets was not detecting
anything before so I missed all of those.
* Fixed the regex in find-plugin-refs to take care of that.
* Fixed plugin_formatter to emit namespaced labels for the M() macro.
We're porting autogenerated plugin docs so that :ref: targets are
namespaced by plugin type. To do this effectively, we need to know
where all the :ref: targets which refer to the bare plugin names are in
the rst files. This script will find those.
* 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
The :ref: syntax is for linking to targets which are defined for the
whole document tree. `link`_ is for linking to targets which are inside
of the document. We want the latter for deprecated sections because
otherwise we'd have to create namespaced link targets for them.
Also fix expansion of version a deprecated module will be removed in
* docs: Document disabling diff on task level
Tasks that deal with secrets may leak sensitive information when
running in Check Mode. This change updates the documentation explaining
that the diff can be deactivated on task level.
The feature was requested in #14860 and got introduced in Ansible 2.4
with #28581.
* Updated for clarity
The example regarding `include_*` is a bit unclear. First it seems like the v2.4 and v2.5 examples are the same. So I attempted to make the relevant change in the examples more obvious.
label: docsite_pr
I hastily did a copy/paste of the `async` example and it took me
a while to understand that `async` specified a maximum runtime in seconds.
The docs are actually mostly clear on this, but I made this PR while
reading the code.
This also fixes the spelling of "asynchronously".
* Use arg_spec type for comparisons on default and choices
* Further improve type casting
* Make sure to capture output in more places
* Individually report invalid choices
* Update ignore.txt after resolving merge conflicts
* Correct method to get timedelta seconds value
This also adds additional clarification for extracting different time/date values for time deltas
* Small edit
This PR includes:
- A fix for multiple-choice defaults
- A fix for messed up dictionary samples
- Cleaner defaults when they don't appear part of choices
* Improve default values and choices in module docs
So currently we show defaults and choices in separate columns.
For each parameter we have
- Mostly empty default and choices cells
- A list of choices and a separate default value
- Only a default value
So there's a lot of space being wasted on empty cells.
We can do this better.
* Improve Parameters section
* Add Choices back into column header
* Ensure the tables spans the complete page width
* allow ANSIBLE_KEEP_REMOTE_FILES for local test runner
* add ANSIBLE_KEEP_REMOTE_FILES to tox.ini, update docs
* Clarify handling of environment variables.
* Improve module docs return values
Currently the 5 columns shown doesn't make optimal use of the screen
estate, especially for facts modules this is a problem.
* Add returned facts as a separate section
* Remove whitespace and add support section
Since Notes were moved higher up, the Author, Status and Maintainer
information was now placed under the Return Values section.
* Switch Last Updated and Copyright