Skip to content
New issue

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

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

Already on GitHub? # to your account

Ignore a file after initial deployment #4125

Closed
2 tasks done
wzzrd opened this issue Dec 8, 2024 · 2 comments
Closed
2 tasks done

Ignore a file after initial deployment #4125

wzzrd opened this issue Dec 8, 2024 · 2 comments
Labels
support Support request

Comments

@wzzrd
Copy link

wzzrd commented Dec 8, 2024

What exactly are you trying to do?

I want to initially deploy a kubeconfig or mc.ini file to a new machine. After that, I might want to forcefully redeploy it from the central repo, but otherwise I want to ignore any local changes by default.

Reasoning behind this is that those specific two files will have local changes based on normal usage that I will not want to overwrite from the central repo, nor adopt them into the central repo. I just want to deploy once, most of the time ignore changes, until I choose to redeploy forcefull. Hope that makes sense.

What have you tried so far?

Normal workflow and just hit 'ignore' every time

Where else have you checked for solutions?

Additional context

Maybe this is simply out of scope, or maybe I'm misinterpreting what is already possible. Just trying to figure this out :)

@wzzrd wzzrd added the support Support request label Dec 8, 2024
@twpayne
Copy link
Owner

twpayne commented Dec 8, 2024

For this you can use the create_ attribute. chezmoi will create the file if it does not already exist, otherwise chezmoi will ignore it.

@wzzrd
Copy link
Author

wzzrd commented Dec 8, 2024

Ah, see, I knew there would be something! Thanks!

@wzzrd wzzrd closed this as completed Dec 8, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 16, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
support Support request
Projects
None yet
Development

No branches or pull requests

2 participants