dict2str: -> plugins/filter
This commit is contained in:
@@ -1,31 +0,0 @@
|
|||||||
# Collections Plugins Directory
|
|
||||||
|
|
||||||
This directory can be used to ship various plugins inside an Ansible collection. Each plugin is placed in a folder that
|
|
||||||
is named after the type of plugin it is in. It can also include the `module_utils` and `modules` directory that
|
|
||||||
would contain module utils and modules respectively.
|
|
||||||
|
|
||||||
Here is an example directory of the majority of plugins currently supported by Ansible:
|
|
||||||
|
|
||||||
```
|
|
||||||
└── plugins
|
|
||||||
├── action
|
|
||||||
├── become
|
|
||||||
├── cache
|
|
||||||
├── callback
|
|
||||||
├── cliconf
|
|
||||||
├── connection
|
|
||||||
├── filter
|
|
||||||
├── httpapi
|
|
||||||
├── inventory
|
|
||||||
├── lookup
|
|
||||||
├── module_utils
|
|
||||||
├── modules
|
|
||||||
├── netconf
|
|
||||||
├── shell
|
|
||||||
├── strategy
|
|
||||||
├── terminal
|
|
||||||
├── test
|
|
||||||
└── vars
|
|
||||||
```
|
|
||||||
|
|
||||||
A full list of plugin types can be found at [Working With Plugins](https://docs.ansible.com/ansible-core/2.19/plugins/plugins.html).
|
|
||||||
@@ -10,12 +10,3 @@ class FilterModule(object):
|
|||||||
return sep2.join(
|
return sep2.join(
|
||||||
[ str(k) + (sep1+str(v) if v!=None and v!='' else '') for k, v in d.items() ]
|
[ str(k) + (sep1+str(v) if v!=None and v!='' else '') for k, v in d.items() ]
|
||||||
) + sep3
|
) + sep3
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
# Tests
|
|
||||||
filters = FilterModule()
|
|
||||||
print(filters.filters())
|
|
||||||
print(filters.dict2str(
|
|
||||||
{"un": 1, "deux": 2, "str": "a string", "rien": None, "bool": True}
|
|
||||||
))
|
|
||||||
Reference in New Issue
Block a user