Open doubletwist13 opened 2 years ago
@doubletwist13 Thanks for the report. That change was provided in https://github.com/saltstack-formulas/apache-formula/commit/1f488b6af3f63aeaa1803d913684a4871f9a9411. @ixs, would you be able to respond to this?
Yeah, this looks good. Thank you @doubletwist13 for the good description and digging. Reference vs. copy is exactly what's going on.
I'll whip up a PR to fix this issue now.
Just checking in. I didn't see a PR for this and it looks like the error still exists in the master branch.
I could maybe do a PR - as long as the change doesn't require any changes to tests - as that's a bit beyond my current ability
Your setup
Formula commit hash / release tag
apache-formula 1.2.2
Versions reports (master & minion)
Pillar / config used
Bug details
Describe the bug
In apache/config/vhosts/standard.sls lines 8-11 attempt to make a copy of the 'apache' variable to 'map' and then trim to only include the 'sites' data but instead of making a copy it just makes a reference. This causes the map.pop to trim the 'apache' variable as well as the 'map' variable.
Steps to reproduce the bug
Expected behaviour
map.pop should trim only the 'map' variable, not the 'apache' variable.
Attempts to fix the bug
Just need to tell it to copy the variable instead of creating a reference by changing from:
TO
Additional context