Skip to content

Instantly share code, notes, and snippets.

@domcleal
Created July 17, 2013 12:10
Show Gist options
  • Select an option

  • Save domcleal/6019995 to your computer and use it in GitHub Desktop.

Select an option

Save domcleal/6019995 to your computer and use it in GitHub Desktop.

puppet-configure

puppet-configure is a library for writing Puppet-based installers.

It's essentially a wrapper around puppet apply that supports command line and interactive configuration of parameters, answers files, logging, password inputs and more. Running apply by itself is sufficient for users familiar with Puppet, but this library provides a more polished UI for other users.

One of the key design goals is to reuse existing Puppet modules seamlessly and to not require any non-standard extensions (functions, layout or metadata) to manifests.

Key features

  • use parameterised Puppet modules without changes
  • reads Puppet manifests and rdoc to discover parameters
  • will run from and generate an answers file
  • be reusable in a puppetmaster setup
  • supports command line arguments to set parameters
  • support an interactive menu for common parameters
  • accept passwords interactively
  • provides a progress bar
  • stores separate logs from every execution

Writing Puppet modules

Puppet modules should be written with the following in mind to make best use of puppet-configure:

  • classes must be parameterised to be configurable
  • Puppet rdoc describing class parameters gets used for descriptions in the UI
  • role/profile modules are preferred if you have dependencies between modules

About

This library was created out of the Foreman and Katello projects, which each had their own installer wrappers.

Contributing

  • Fork the project
  • Commit and push until you are happy with your contribution
  • Send a pull request with a description of your changes

Licensing

Copyright (c) 2013 Red Hat, Inc. or their respective owners

Except where specified in provided modules, this program and entire repository is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment