Skip to content

Add support for multi-line settings #541

@webcompas

Description

@webcompas

Use Case

There are Ini-style config files which contain settings with multiple values. They are provided in a Heredoc style like in the following example excerpt of snmptt.ini:

snmptt_conf_files = <<END
/etc/snmp/snmptt.conf
/etc/snmp/snmptt.conf.vendor1
/etc/snmp/snmptt.conf.vendor2
END

Unfortunately managing such a setting is not yet supported.

Proposed solution

I'd like to get such multi-line settings supported. The delimiter to use (e.g. "END") should be customizable by a corresponding parameter. The solution could either make use of additional parameters to ini_setting or introduce a new type ( for example ini_setting_multiline).

Considered alternatives

Just serving the whole file is not suitable in my use case. I also tried to solve it using Augeas but there's no corresponding lens available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions