Giter Club home page Giter Club logo

puppet_transplant's Introduction

PuppetTransplant

This gem is a rubygems plugin that is expected to be installed in the same gemset as Puppet. The intent is to modify the puppet gem to relocate the default confdir and vardir. This behaviors allows multiple versions of puppet to exist in different gemsets with distinct default base directories.

The relocation directory is based on the Ruby PREFIX. For example, if the puppet gem is installed using a ruby with a prefix of /opt/operations then operations will be used to construct a default system confdir of /etc/operations/puppet and a default system vardir of /var/lib/operations/puppet. Similarly, /opt/crossfader/versions/ruby/1.9.3-p448 will result in /etc/crossfader/puppet and /var/lib/crossfader/puppet.

The design of modifying the default confdir and vardir has been chosen to support Puppet operating as a library in addition to Puppet operating as an application. This approach has the goal of keeping behavior consistent between library based use cases and application based use cases as compared to a wrapper script which sets --confdir and --vardir which introduces an inconsistency between application and library use cases.

Installation

Install this gem before installing Puppet to ensure puppet will be relocated upon installation.

$ gem install puppet_transplant

If you do not have permission to write to $GEM_HOME, try preserving your environment in sudo:

$ sudo -E gem install puppet_transplant

Usage

Simply install the gem into the current gemset then install a puppet gem afterwards. For example:

$ which gem
/opt/operations/bin/gem

$ sudo -E gem install puppet_transplant
Fetching: puppet_transplant-0.0.2.gem (100%)
Successfully installed puppet_transplant-0.0.2
1 gem installed
Installing ri documentation for puppet_transplant-0.0.2...
Installing RDoc documentation for puppet_transplant-0.0.2...

$ sudo -E gem install puppet --no-ri --no-rdoc
Fetching: puppet-3.4.2.gem (100%)
Transplanted confdir: /etc/operations/puppet
Transplanted vardir:  /var/lib/operations/puppet
Successfully installed puppet-3.4.2
1 gem installed

$ sudo -E puppet agent --configprint confdir
/etc/operations/puppet
$ sudo -E puppet agent --configprint vardir
/var/lib/operations/puppet

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

puppet_transplant's People

Watchers

 avatar

Forkers

mattkirby

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.