arillso.system.from_toml filter – Convert TOML string to dictionary
Note
This filter plugin is part of the arillso.system collection (version 1.0.5).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install arillso.system.
To use it in a playbook, specify: arillso.system.from_toml.
New in arillso.system 1.0.0
Synopsis
Converts a TOML-formatted string into a Python dictionary.
Uses tomllib (Python 3.11+) or tomli package for parsing.
Input
This describes the input of the filter, the value before | arillso.system.from_toml.
Parameter |
Comments |
|---|---|
TOML string to parse |
Examples
# Parse TOML string
- name: Parse TOML configuration
ansible.builtin.set_fact:
config: "{{ toml_string | arillso.system.from_toml }}"
# Parse TOML from file
- name: Load TOML config file
ansible.builtin.set_fact:
app_config: "{{ lookup('file', 'config.toml') | arillso.system.from_toml }}"
Return Value
Key |
Description |
|---|---|
Python dictionary representation of the TOML input Returned: success |