0

I'm using puppet to manage my linux systems. I have to use /etc/puppet directory to keep manifest files instead of user home directory, and I want to manage them by git. But because /etc/puppet's owner is root, after I execute 'sudo git init', I always need to use sudo for writing(git add, git commit, etc).

  1. Are there any way to avoid using sudo? If I have to manage system directory using git, do I have to always use it?

  2. Is it OK to use sudo using git repeatedly? I've never done that, because I always edited source files in my home directories.

1

Puppet makes some assumptions about the permissions of some files in /etc/puppet (and the directory itself, I believe). As such, you likely will not be able to make that location writeable to your regular account.

This is usually not a good choice anyway. If you want to work in /etc/puppet directly, you should work as root - sudo is an ill fit here. Try sudo su or sudo -i.

Note that you can make Puppet read manifests from locations outside of /etc if you set appropriate

options in puppet.conf.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.