From f554794e356fffe63071b46ba4b5cc6135fdcb8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=20Nam=C3=A8che?= Date: Thu, 22 Jan 2026 07:56:08 +0300 Subject: [PATCH] dict2str: -> plugins/filter --- seb4itik/byow/plugins/README.md | 31 ------------------- .../filters.py => plugins/filter/dic2str.py} | 9 ------ 2 files changed, 40 deletions(-) delete mode 100644 seb4itik/byow/plugins/README.md rename seb4itik/byow/{roles/caddy/filter_plugins/filters.py => plugins/filter/dic2str.py} (61%) diff --git a/seb4itik/byow/plugins/README.md b/seb4itik/byow/plugins/README.md deleted file mode 100644 index 74076b6..0000000 --- a/seb4itik/byow/plugins/README.md +++ /dev/null @@ -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). diff --git a/seb4itik/byow/roles/caddy/filter_plugins/filters.py b/seb4itik/byow/plugins/filter/dic2str.py similarity index 61% rename from seb4itik/byow/roles/caddy/filter_plugins/filters.py rename to seb4itik/byow/plugins/filter/dic2str.py index 8e7cfbc..1f2f235 100644 --- a/seb4itik/byow/roles/caddy/filter_plugins/filters.py +++ b/seb4itik/byow/plugins/filter/dic2str.py @@ -10,12 +10,3 @@ class FilterModule(object): return sep2.join( [ str(k) + (sep1+str(v) if v!=None and v!='' else '') for k, v in d.items() ] ) + sep3 - - -if __name__ == "__main__": - # Tests - filters = FilterModule() - print(filters.filters()) - print(filters.dict2str( - {"un": 1, "deux": 2, "str": "a string", "rien": None, "bool": True} - ))