Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mount: add not_change parameter to set_fstab and similars #52962

Merged
merged 1 commit into from May 10, 2019

Conversation

aplanas
Copy link
Collaborator

@aplanas aplanas commented May 10, 2019

What does this PR do?

The current 'set_' family search the entry based on a 'match_on'
parameter. If the line is found check that there is no difference
between the expectations and the present line. If there are changes
this line gets replaced.

This default behaviour is the correct one in cases where the Salt
code owns all the changes made on entries. But in some scenarios
we do not want to overwrite the line if is already present, even
if there are diferences in other parameters, like the option field.

This patch add a new parameter, 'not_change', that if is True will
not overwrite the present line in any case.

Also update the mount state to transfer this new parameter.

Tests written?

Yes

The current 'set_' family search the entry based on a 'match_on'
parameter. If the line is found check that there is no difference
between the expectations and the present line. If there are changes
this line gets replaced.

This default behaviour is the correct one in cases where the Salt
code owns all the changes made on entries. But in some scenarios
we do not want to overwrite the line if is already present, even
if there are diferences in other parameters, like the option field.

This patch add a new parameter, 'not_change', that if is True will
not overwrite the present line in any case.

Also update the `mount` state to transfer this new parameter.
@garethgreenaway garethgreenaway self-requested a review May 10, 2019
@garethgreenaway garethgreenaway merged commit b050ccf into saltstack:develop May 10, 2019
10 of 11 checks passed
@aplanas aplanas deleted the fix_fstab branch May 27, 2019
@waynew waynew added this to PR needs port to master in PRs to port to master Oct 24, 2019
@garethgreenaway garethgreenaway moved this from PR needs port to master to PR has port to master in PRs to port to master Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
PRs to port to master
  
PR has port to master
Development

Successfully merging this pull request may close these issues.

None yet

2 participants