Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
###############################################################################
# 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