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

Convert rancid from cvs to git, remove dnssec logs #193

Merged
merged 1 commit into from
Sep 16, 2017

Conversation

jvperrin
Copy link
Member

These are the changes I've made to pestilence on stretch, it also backs up rancid config diffs to GitHub, which is pretty nice to have, especially since it strips the password (I didn't know it did that). rancid-run already attempts to push to a remote when it is run, so that part doesn't have to be added like it does in the ocf_ldap module for GitHub backups.

I removed the /var/log/dnssec log because bind9 wouldn't start without it and it didn't even seem to be logging anything, so I figured keeping it didn't make sense.

Also backup rancid config diffs to GitHub
# at all, so they don't need to be compressed, there's just a lot of them
# since they are created once for every hour.
cron { 'clean-rancid-logs':
command => 'find /var/log/rancid/* -mtime +14 > /dev/null',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i like how i read this, thought "wtf use logrotate", then read your comment above and saw you pre-empted me :P

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha yeah, I tried logrotate first but couldn't find a good way to do that didn't involve adding a find command somewhere anyway. If we needed compression too I would have done that, but we just want a bit of cleanup here.


# Don't push to GitHub for dev-* hosts to prevent duplicate backups with
# different commit hashes
if $::hostname !~ /^dev-/ {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should really turn this into a global/hiera variable rather than repeating this dev- hostname junk everywhere

maybe a good starter ticket

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, I like the idea of making this a starter ticket because it wouldn't be too hard and would touch a few different parts of puppet, so that would be cool

@jvperrin jvperrin merged commit 27ea535 into ocf:master Sep 16, 2017
@jvperrin jvperrin deleted the pestilence-stretch branch September 16, 2017 20:07
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