Skip to content

Conversation

@stratus-ss
Copy link

@stratus-ss stratus-ss commented Mar 24, 2025

This PR adds a new option to preserve hosts, domains and custom options instead of wiping them out eat time the play runs.

Fixes #153

As requested, by default this option is set to false.

The new option looks like this

  preserve:
    description: Preserve the current DNS entries instead of overriding them.
    required: false
    default: false
    type: bool

I wondered whether this should be a required setting?

I added a fixture for the tests, however I wasn't able to come up with how to test this appropriately. Sometimes I am a little slow untangling test cases to base off of. I don't mind doing the work but I probably need a poke in the right direction. I took several swings at this but didn't get anywhere.

@stratus-ss stratus-ss force-pushed the preserve_unbound_hosts branch from 9616417 to 11454b3 Compare March 24, 2025 14:35
@Tanchwa
Copy link

Tanchwa commented May 14, 2025

hey @opoplawski can we merge this guy in?

@opoplawski opoplawski force-pushed the preserve_unbound_hosts branch 2 times, most recently from b433b02 to e0ec25d Compare May 16, 2025 03:07
@opoplawski
Copy link
Contributor

Sorry, I'll try to find some time soon to review this. In the mean time I managed to fix the CI so there are some things to clean up there.

@stratus-ss
Copy link
Author

I made a pep8 push today. Just need the CI to run to confirm

@opoplawski opoplawski force-pushed the preserve_unbound_hosts branch 2 times, most recently from ce6264c to 1bdc637 Compare August 19, 2025 04:13
stratus-ss and others added 3 commits November 10, 2025 20:16
…rve: true, the current dns settings will be preserved and appended to and not overwritten
@opoplawski opoplawski force-pushed the preserve_unbound_hosts branch from 7b2382d to 7875e7a Compare November 11, 2025 03:16
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.

DNS Resolver: Adding hosts should not delete what already exists

3 participants