Wait.. what happened to my file? ... oh ... the puppet master blew out my changes.

A friend of mine found out an interesting plugin for those admins out there that use ViM. It makes it easier for you (and your colleages) to see when you are editing a file that is managed by puppet:

http://blog.mricon.com/2012/04/puppet-eyes.html

This module will only work when your editor has root privileges, since the file it parses, state.yaml, is accessible only to root (for relatively evident reasons). When you try to modify a file that is currently managed by puppet, you will see a white on red warning telling you "This file is managed by Puppet":

puppet-views warns you out when you open a file that is managed by puppet

This should let you know that your local changes will be overwritten on the next puppet run.

To install it, either just dowload the plugin/puppet-eyes.vim script and place it in your ~/.vim/plugin directory, or if you use vim-pathogen simply clone the entire repository under ~/.vim/bundle/.

Tags:

Comments

Add new comment

Markdown

  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
E
M
T
A
6
D
9
Y
X
j
Enter the code without spaces.