mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-18 06:11:07 -07:00
[PR #10027/299172d2 backport][stable-10] fixed hidden warnings from extra tests - batch 2 (#10101)
Some checks failed
EOL CI / EOL Sanity (Ⓐ2.15) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.15+py2.7) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.15+py3.10) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.15+py3.5) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+alpine3+py:azp/posix/1/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+alpine3+py:azp/posix/2/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+alpine3+py:azp/posix/3/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/1/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/2/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/3/) (push) Has been cancelled
nox / Run extra sanity tests (push) Has been cancelled
Some checks failed
EOL CI / EOL Sanity (Ⓐ2.15) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.15+py2.7) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.15+py3.10) (push) Has been cancelled
EOL CI / EOL Units (Ⓐ2.15+py3.5) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+alpine3+py:azp/posix/1/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+alpine3+py:azp/posix/2/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+alpine3+py:azp/posix/3/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/1/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/2/) (push) Has been cancelled
EOL CI / EOL I (Ⓐ2.15+fedora37+py:azp/posix/3/) (push) Has been cancelled
nox / Run extra sanity tests (push) Has been cancelled
fixed hidden warnings from extra tests - batch 2 (#10027)
* fixed hidden warnings from extra tests - batch 2
* remove multiple yaml doc markers from EXAMPLE blocks
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Apply suggestions from code review
* Apply suggestions from code review
* dig: adjust markup for return suboptions
* Update plugins/lookup/dig.py
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 299172d27b
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
0dc63be643
commit
4e35837063
36 changed files with 1930 additions and 1940 deletions
|
@ -6,42 +6,41 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
author: Unknown (!UNKNOWN)
|
||||
name: chef_databag
|
||||
short_description: fetches data from a Chef Databag
|
||||
DOCUMENTATION = r"""
|
||||
author: Unknown (!UNKNOWN)
|
||||
name: chef_databag
|
||||
short_description: fetches data from a Chef Databag
|
||||
description:
|
||||
- 'This is a lookup plugin to provide access to chef data bags using the pychef package. It interfaces with the chef server
|
||||
API using the same methods to find a knife or chef-client config file to load parameters from, starting from either the
|
||||
given base path or the current working directory. The lookup order mirrors the one from Chef, all folders in the base
|
||||
path are walked back looking for the following configuration file in order: C(.chef/knife.rb), C(~/.chef/knife.rb), C(/etc/chef/client.rb).'
|
||||
requirements:
|
||||
- "pychef (L(Python library, https://pychef.readthedocs.io), C(pip install pychef))"
|
||||
options:
|
||||
name:
|
||||
description:
|
||||
- "This is a lookup plugin to provide access to chef data bags using the pychef package.
|
||||
It interfaces with the chef server api using the same methods to find a knife or chef-client config file to load parameters from,
|
||||
starting from either the given base path or the current working directory.
|
||||
The lookup order mirrors the one from Chef, all folders in the base path are walked back looking for the following configuration
|
||||
file in order : .chef/knife.rb, ~/.chef/knife.rb, /etc/chef/client.rb"
|
||||
requirements:
|
||||
- "pychef (L(Python library, https://pychef.readthedocs.io), C(pip install pychef))"
|
||||
options:
|
||||
name:
|
||||
description:
|
||||
- Name of the databag
|
||||
type: string
|
||||
required: true
|
||||
item:
|
||||
description:
|
||||
- Item to fetch
|
||||
type: string
|
||||
required: true
|
||||
'''
|
||||
|
||||
EXAMPLES = """
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ lookup('community.general.chef_databag', 'name=data_bag_name item=data_bag_item') }}"
|
||||
- Name of the databag.
|
||||
type: string
|
||||
required: true
|
||||
item:
|
||||
description:
|
||||
- Item to fetch.
|
||||
type: string
|
||||
required: true
|
||||
"""
|
||||
|
||||
RETURN = """
|
||||
_raw:
|
||||
description:
|
||||
- The value from the databag.
|
||||
type: list
|
||||
elements: dict
|
||||
EXAMPLES = r"""
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ lookup('community.general.chef_databag', 'name=data_bag_name item=data_bag_item') }}"
|
||||
"""
|
||||
|
||||
RETURN = r"""
|
||||
_raw:
|
||||
description:
|
||||
- The value from the databag.
|
||||
type: list
|
||||
elements: dict
|
||||
"""
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue