On Wed, Feb 19, 2020 at 9:22 AM Bruno Rocha <rochacbr...@redhat.com> wrote:
> 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: > https://dynaconf.readthedocs.io/en/latest/guides/environment_variables.html#precedence-and-type-casting > > 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. > Also there is an issue opened regarding the YAML null values: > https://github.com/rochacbruno/dynaconf/issues/288 > > > On Wed, Feb 19, 2020 at 10:57 AM Dennis Kliban <dkli...@redhat.com> wrote: > >> ansible-pulp currently tries to generate a Python settings file.from >> settings provided by the user in the playbook[0]. However, the generated >> Python code is not always syntactically correct[1]. >> >> 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 >> settings.py. >> >> Are there any objections or other ideas? >> >> [0] >> https://github.com/pulp/ansible-pulp/blob/master/roles/pulp/templates/settings.py.j2 >> [1] https://pulp.plan.io/issues/5687 >> >> _______________________________________________ >> Pulp-dev mailing list >> Pulp-dev@redhat.com >> https://www.redhat.com/mailman/listinfo/pulp-dev >> >
_______________________________________________ Pulp-dev mailing list Pulp-dev@redhat.com https://www.redhat.com/mailman/listinfo/pulp-dev