Story #5290
closedAs a plugin writer, I can provide all of my settings with their defaults in one place.
100%
Description
Problem¶
Currently pulp_ansible has several settings. There isn't a consolidated way currently for dynaconf to overlay settings from the pulp_ansible codebase onto the settings file provided by pulpcore.app.settings
Solution¶
1. Document in the plugin writer's guide a convention that settings should live in pluginname.app.settings
2. Then here you build the list of python paths to the settings file.
3. Then here you have dynaconf load those settings.
This needs to come with documentation for plugin writers and a release note in pulpcore-plugin, even though the changes will mostly occur in pulpcore.
Updated by rochacbruno about 5 years ago
Dynaconf issue: https://github.com/rochacbruno/dynaconf/issues/207
Updated by rochacbruno almost 5 years ago
Dynaconf PR: https://github.com/rochacbruno/dynaconf/pull/209
That RFC will be included in the next release
Updated by rochacbruno almost 5 years ago
Dynaconf 2.0.4 released adding support for this issue to be resolved: https://github.com/rochacbruno/dynaconf/releases/tag/2.0.4
Updated by Anonymous almost 5 years ago
- Status changed from NEW to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulpcore|5b41e98d3d7768177531b5be7105e3a011f2aba6.
Updated by bmbouter almost 5 years ago
- Status changed from MODIFIED to ASSIGNED
- Assignee set to bmbouter
@bruno awesome thanks! I'm bringing back to ASSIGNED so I can add documentation for plugin writers.
Updated by bmbouter almost 5 years ago
- Sprint set to Sprint 58
This was groomed for the last sprint planning but it did not have the Sprint actually set. This is needed for core to allow pulp_ansible to set settings so we need to have it on the sprint.
Updated by Anonymous almost 5 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulpcore|157facaefb1d10e4ead25bb4ef89e39dfb7f1f1d.
Added by Bruno Rocha almost 5 years ago
Updated by bmbouter almost 5 years ago
- Status changed from ASSIGNED to POST
docs PR available at: https://github.com/pulp/pulpcore-plugin/pull/124
Added by bmbouter almost 5 years ago
Revision 2120cd3b | View on GitHub
Add settings.py.j2 for plugin settings
Plugins now have their settings loaded when placed in the file at
<your plugin>.app.settings.py
.
Updated by bmbouter almost 5 years ago
- Status changed from POST to MODIFIED
Applied in changeset plugin_template|2120cd3bb4973cb430c1c35dbad5c031f05a20cd.
Updated by bmbouter almost 5 years ago
- Status changed from MODIFIED to POST
PR for settings.py added to plugin_template: https://github.com/pulp/plugin_template/pull/104
Bringing back to POST for the docs PR to merge and move to MODIFIED.
Updated by bmbouter almost 5 years ago
- Status changed from POST to MODIFIED
Applied in changeset commit:pulpcore-plugin|d2af53939a82933f0fb2a92962f44fa9de688f7b.
Updated by bmbouter over 4 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Add load of plugin default settings.
{plugin_name}/app/settings.py
/etc/pulp/settings.py
PULP_
RPM
,FILE
,ANSIBLE
etc...example:
ANSIBLE_SOMEKEY = 'value'
on settings.py can be overriden viaexport PULP_ANSIBLE_SOMEKEY='othervalue'
closes #5290