Skip to content

Instantly share code, notes, and snippets.

@garystafford
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garystafford/41d8878305b1279c3b80 to your computer and use it in GitHub Desktop.
Save garystafford/41d8878305b1279c3b80 to your computer and use it in GitHub Desktop.
###############################################################################
# Helpful Puppet commands and code snippets
###############################################################################
sudo puppet module list # different paths w/ or w/o sudo
puppet config print
puppet config print | grep <search_term>
sudo cat /etc/puppet/puppet.conf | grep <search_term>
sudo vi /etc/puppet/puppet.conf
sudo puppet module install <author>/<module_name>
sudo puppet module install <author>-<module_name>-<version>.tar.gz # Geppetto Export Module to File System
sudo puppet module install -i /etc/puppet/environments/production/modules <author>/<module_name>
sudo puppet module uninstall <module_name>
sudo rm -rf /etc/puppet/environments/production/module/<module_name> # use remove vs. uninstall when in env. path
sudo puppet apply <manifest>.pp
# Install Modules from GitHub onto Foreman node:
# Apache Config Example
wget -N https://github.com/garystafford/garystafford-apache_example_config/archive/v0.1.0.tar.gz && \
sudo puppet module install -i /etc/puppet/environments/production/modules ~/v0.1.0.tar.gz --force
# HAProxy Config Example
wget -N https://github.com/garystafford/garystafford-haproxy_node_config/archive/v0.1.0.tar.gz && \
sudo puppet module install -i /etc/puppet/environments/production/modules ~/v0.1.0.tar.gz --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment