1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-02-04 07:51:50 +00:00
community.general/plugins/filter
patchback[bot] d58777ff5e
[PR #11423/864695f8 backport][stable-12] Add to_toml filter (#11438)
Add `to_toml` filter (#11423)

* Add to_toml filter

This is based heavily on the to_yaml filter, but
with a pared-down feature set.

* Protect import

* Don't quote datetime as a string

* Use Ansible error types

* Import correct error types

* Don't use AnsibleTypeError

It doesn't seem to be available on older Ansible
core versions.

* Fix antsibull-nox errors

* Install dependencies for to_toml integration test



* Reduce author list to main contributor



* Update version added for to_toml



* Use AnsibleError for missing import



* Use AnsibleFilterError for runtime type check



* Move common code to plugin_utils/_tags.py

* Mark module util as private



* Update BOTMETA for to_toml



* Fix typo

* Correct version number



* Use to_text for to_toml dict key conversions



* Add tomlkit requirement to docs



* Add missing import

* Add aliases for for to_toml integration test

---------


(cherry picked from commit 864695f898)

Co-authored-by: Matt Williams <matt@milliams.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-01-22 07:40:51 +01:00
..
accumulate.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
counter.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
crc32.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
dict.py Reformat everything. 2025-11-01 13:46:53 +01:00
dict_kv.py Reformat everything. 2025-11-01 13:46:53 +01:00
from_csv.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
from_ini.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
groupby_as_dict.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
hashids.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
hashids_decode.yml Add default license header to files which have no copyright or license header yet (#5074) 2022-08-05 14:03:38 +02:00
hashids_encode.yml Add default license header to files which have no copyright or license header yet (#5074) 2022-08-05 14:03:38 +02:00
jc.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
json_diff.yml add json_patch, json_patch_recipe and json_diff filters (#9565) 2025-01-21 20:51:21 +01:00
json_patch.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
json_patch.yml Adjust YAML in plugin docs (#10234) 2025-06-16 17:46:01 +02:00
json_patch_recipe.yml add json_patch, json_patch_recipe and json_diff filters (#9565) 2025-01-21 20:51:21 +01:00
json_query.py [PR #11095/2b4333a0 backport][stable-12] Use raise from in plugins (#11129) 2025-11-12 21:00:39 +01:00
keep_keys.py Reformat everything. 2025-11-01 13:46:53 +01:00
lists.py Reformat everything. 2025-11-01 13:46:53 +01:00
lists_difference.yml fixed hidden warnings from extra tests - batch 1 (#10025) 2025-04-23 21:49:20 +02:00
lists_intersect.yml fixed hidden warnings from extra tests - batch 1 (#10025) 2025-04-23 21:49:20 +02:00
lists_mergeby.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
lists_symmetric_difference.yml fixed hidden warnings from extra tests - batch 1 (#10025) 2025-04-23 21:49:20 +02:00
lists_union.yml fixed hidden warnings from extra tests - batch 1 (#10025) 2025-04-23 21:49:20 +02:00
random_mac.py Reformat everything. 2025-11-01 13:46:53 +01:00
remove_keys.py Reformat everything. 2025-11-01 13:46:53 +01:00
replace_keys.py Reformat everything. 2025-11-01 13:46:53 +01:00
reveal_ansible_type.py Reformat everything. 2025-11-01 13:46:53 +01:00
time.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
to_days.yml misc typo fix (#9812) 2025-02-28 23:10:13 +01:00
to_hours.yml misc typo fix (#9812) 2025-02-28 23:10:13 +01:00
to_ini.py [PR #11400/236b9c0e backport][stable-12] Sort imports with ruff check --fix (#11409) 2026-01-09 19:36:52 +01:00
to_milliseconds.yml misc typo fix (#9812) 2025-02-28 23:10:13 +01:00
to_minutes.yml misc typo fix (#9812) 2025-02-28 23:10:13 +01:00
to_months.yml misc typo fix (#9812) 2025-02-28 23:10:13 +01:00
to_nice_yaml.yml Add filters to_yaml and to_nice_yaml (#10784) 2025-09-08 18:48:49 +02:00
to_prettytable.py [PR #11049/396f467b backport][stable-12] Improve Python code: address unused variables (#11058) 2025-11-09 09:59:42 +01:00
to_seconds.yml misc typo fix (#9812) 2025-02-28 23:10:13 +01:00
to_time_unit.yml misc typo fix (#9812) 2025-02-28 23:10:13 +01:00
to_toml.py [PR #11423/864695f8 backport][stable-12] Add to_toml filter (#11438) 2026-01-22 07:40:51 +01:00
to_toml.yml [PR #11423/864695f8 backport][stable-12] Add to_toml filter (#11438) 2026-01-22 07:40:51 +01:00
to_weeks.yml misc typo fix (#9812) 2025-02-28 23:10:13 +01:00
to_yaml.py [PR #11423/864695f8 backport][stable-12] Add to_toml filter (#11438) 2026-01-22 07:40:51 +01:00
to_yaml.yml Add filters to_yaml and to_nice_yaml (#10784) 2025-09-08 18:48:49 +02:00
to_years.yml misc typo fix (#9812) 2025-02-28 23:10:13 +01:00
unicode_normalize.py Reformat everything. 2025-11-01 13:46:53 +01:00
version_sort.py Reformat everything. 2025-11-01 13:46:53 +01:00