[Pulp-dev] switch from Python to JSON settngs file
dkliban at redhat.com
Wed Feb 19 15:12:51 UTC 2020
On Wed, Feb 19, 2020 at 9:39 AM Dennis Kliban <dkliban at redhat.com> wrote:
> On Wed, Feb 19, 2020 at 9:22 AM Bruno Rocha <rochacbruno at redhat.com>
>> From the issue:
>> Writing aws_default_acl: None in the pulp_settings variable gets
>>> rendered to AWS_DEFAULT_ACL = "None", not AWS_DEFAULT_ACL = None
>> As TOML does not allow `null` values dynaconf has a special syntax for
>> expressing that:
>> aws_default_acl: "@none None" might be a workaround.
> Thank you Bruno! Could you please comment on the issue?
> This should resolve the issue that I linked in my original email.
> However,there is still a problem when the setting value is a list or a
> dictionary. The template needs to be much more robust to handle that. It
> still makes sense to switch to JSON.
The other option is to make no change at all and simply add documentation
that says you can provide values to ansible-pulp in the same format as you
would using environment variables. In that case everything can be treated
as a string and Dynaconf interprets it into Python at runtime. I am leaning
toward this option.
>> Also there is an issue opened regarding the YAML null values:
>> On Wed, Feb 19, 2020 at 10:57 AM Dennis Kliban <dkliban at redhat.com>
>>> ansible-pulp currently tries to generate a Python settings file.from
>>> settings provided by the user in the playbook. However, the generated
>>> Python code is not always syntactically correct.
>>> The settings file is generated using a Jinja template. Jinja provides a
>>> to_json that can be used to generate the settings as JSON. I propose that
>>> we change the behavior of ansible-pulp to generate settings.json instead of
>>> Are there any objections or other ideas?
>>>  https://pulp.plan.io/issues/5687
>>> Pulp-dev mailing list
>>> Pulp-dev at redhat.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pulp-dev