* 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
* 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
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.
Documented procedure to handle package dependencies required by
packages which are Ansible dependencies.
Fixes: #30732Fixes: #16571
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* 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
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
* 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
* 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
* 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
* Remove Sphinx/Read-the-Docs plug on every doc page
No need to have this on every page.
This fixes#37021
* Reinstated RTD credit with revised wording.
* Re-removed RTD footer boilerplate.
* Make use of named links in documentation notes
Now that it is possible to name external links, we are making use of
this to make the documentation better.
* Add improvements to ACI documentation
* Disable QA for long line
* Add :menuselection: and :guilabel:
* Improve links on some modules
* Adds the ability to override the doc build output from the command line.
* For safety, removed straight rm of BUILDDIR and removed subdirectories instead.
* Added check to see if BUILDDIR was defined to main makefile
* Automatically stuff reference in commit message
So we probably want to track which edits were performed through the
Github interface, and this change automatically adds a label to the
commit message.
```yaml
<!--- Your description here -->
+label: docsite_pr
```
Eventually this allows to (on regular basis) list the changes from
documentation readers and process them in a separate process.
* Explain what the Ansible Quickstart video does
Rewrote what video does. The video is really not teaching you how to do the work. It explains why you'd want to use Ansible and shows you what it takes (some sample code) . Video also introduces you to other products in the Ansible ecosystem.
* Edit
This PR includes:
- A fix to untemplated {{ plugin_type }} in docs
- Remove the additional info on how to edit module docs (see #36667)
- Add missing delimiter
This is something I always wanted, a 'Edit on GitHub' button for module
documentation.
I also removed the additional statement in the footer with instructions
on how to edit the module documentation.
PS The links go directly into the GitHub file editor now !
* Fixed indentation error in `facts-demo.yml` example.
`content` and `dest` should be indented under the `copy` module.
* Updated indentation of copy module in `facts-demo.yml` example.
Updated indentation of copy module in `facts-demo.yml` to be inline with its name.
* Add anchors to some guides and all module categories
This is required if we want to use *absolute* :ref: references instead of *relative* :doc: references.
* Update the Cisco ACI Guide reference
* Add `aci_guide` anchor
* Add `network_guide` anchor
* Add category anchor
* Improve readability
* Fix small typo
* Add instructions for creating backport PRs
* Update development_process.rst
simpler workflow
* Update development_process.rst
added origin note
* A few adjustments to clarity, use backport instead of cherry pick in branch name
* Address formatting issue
* fetch isn't a flag
* Fix rst formatting
After initializing a list in both Python2/Python3 with below elements,
I've tested the indexing and realised that the examples provided in the
documentation are erroneous.
As a result, update the examples with correct values in order to avoid
any future confusion.
Resolves:
Related:
Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>
* ACI: Various changes to module documentation and guide
This PR includes:
- We moved the object class information to the notes
- Add version information to guide chapters
- Add generic note to modules with reference to ACI guide
- Reference known issues in aci_rest documentation
- Remove module_utils function docs from modules
- Indicate which parameters are not required for querying all objects
- Added missing RETURN information
* Fix copyright strings
* Remove aci_domain_to_encap_pool.py for v2.5
* More updates
* PEP8 fix
* Improve listings of parameters/return values
* Update network debug troubleshooting guide
Fix#35914
Command timeout and connection timeout error messages
are dsiplayed in log file instead on console.
Update the same in troubleshooting guide.
* Update example error
* Fix CI issues
* Fix more CI failures
* More fixes
* Fix review comments
* Fix more review comments
* Copy edit
This PR includes:
- A fix for a recently introduced issue wrt. error handling
- Added integration tests for provoked errors
- Influence standard return values using aci library for aci_rest
- Add proxy support documentation
- Documentation update related to #34175
* added support for --testcase flag in ansible-test
* fixed command format
* added tab completion
* fixed sanity issues
* added documenation for --testcase
* don't autocomplete when multiple modules are selected
* Followup to docs refactor pull request #36067 - fixes gitignore and cleanup in makefile; removes some generated files; moves a straggler to the appropriate subdirectory.
* Fixed some stragglers
* Removed redundant module entries
* Delete generated RST files.
* Docs refactor as outlined in https://github.com/ansible/proposals/issues/79. Moves content into 'guides'; refactors TOC; fixes CSS; design tweaks to layout and CSS; fixes generated plugin, CLI and module docs to fix links accodingly; more.
* Adding extra blank line for shippable