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
Contributor

@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 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants