Bug #22353
openSatellite 6.3 foreman-templates plugin Negate/Prefix doesn't work as intended for exports to remote git repo
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1493345
Description of problem:
Exporting to remote git repo, prefix is not negated. Thus, when the template is imported, the prefix is added. This ends up creating a lot of templates both in the system and in the remote git repo as the prefix is appended for each iteration.
Version-Release number of selected component (if applicable):
tfm-rubygem-foreman_templates-5.0.1-1.fm1_15.el7sat.noarch
How reproducible:
Add a prefix to foreman-templates settings.
Point it to a repo for which you have write access.
Perform a few Import and Export cycles.
Steps to Reproduce:
1. hammer settings set --name template_sync_prefix --value "Local:"
2. hammer settings set --name=template_sync_repo --value "http://user:pass@git.example.com/sat/templates
3. foreman-rake templates:sync
4. foreman-rake templates:export
5. [ repeat steps 4 and 5 ]
Actual results:
Templates are created with prefix not negated, but appended. Thus results in lots of templates with the pattern of (in the case of my prefix): "Local:Local:Local:..."
Expected results:
The prefix is negated on import and export, and the number of templates does not increase in the remote repo, nor locally.
Updated by The Foreman Bot over 7 years ago
- Status changed from New to Ready For Testing
- Assignee set to Ondřej Pražák
- Pull request https://github.com/theforeman/foreman_templates/pull/80 added