Skip to content

Instantly share code, notes, and snippets.

@roderickm
Created January 13, 2016 16:57
Show Gist options
  • Save roderickm/4fa93a83d013491ac3d2 to your computer and use it in GitHub Desktop.
Save roderickm/4fa93a83d013491ac3d2 to your computer and use it in GitHub Desktop.
Puppet tips, tricks, and one-liners

Use 'apply' to eval puppet vars

puppet apply -e 'notify { "$::osfamily/$::operatingsystem": }'
Notice: Compiled catalog for bdb33588915b.localdomain in environment production in 0.01 seconds
Notice: Debian/Ubuntu
Notice: /Stage[main]/Main/Notify[Debian/Ubuntu]/message: defined 'message' as 'Debian/Ubuntu'
Notice: Finished catalog run in 0.01 seconds

Go from empty VM to running app with a couple commands

apt-get udpate && apt-get install -y puppet
puppet module install trulabs-kamailio
puppet apply -v \
  /etc/puppet/modules/kamailio/tests/init.pp \
  --show_diff --noop

# Verify it's installed and running:
dpkg -l | grep kamilio
netstat -nap | grep 506
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment