The most recent version of the Amazon Linux VMI (2015.09.1) seems to install version 2 of Puppet by default. However, if you need to install Puppet 3, that is also easy enough. Just type in the following to install it: sudo yum install puppet3 If any errors pop up in respect to incorrect dependencies (this can … Continue reading Install Puppet 3 in Amazon Linux
Tag: Puppet
Install Oracle JDK with Puppet
Problem You would like to install Oracle JDK using Puppet. Using the puppetlabs/java module, you might get an error message such as: Error: Java distribution oracle-jdk is not supported. at […]/init.pp:57 on node […] Solution Use the module puppet-jdk-oracle. Just follow the installation instruction from the GitHub page. Note that you might want to set … Continue reading Install Oracle JDK with Puppet
Check if MySQL User Exists on Command Line (and in Puppet)
If you are using Linux, there is simple way to check if a user exists in MySQL: echo `mysql -u root -p[your root password] -e 'use mysql; SELECT user FROM user;'` | grep '[user name]' Executing this command will exit with return code 0 if the user exists and otherwise exit with 1. This is very … Continue reading Check if MySQL User Exists on Command Line (and in Puppet)
Puppet Slow With Processing Directory with ‘recurse => true’
The Problem Puppet allows deploying a structure of directories and files conveniently using the file resource. Using the attributes 'source => …' and 'recurse => true', it is possible to create a copy of a set of files stored in the puppet module on target servers. Unfortunately, using these attributes can slow down puppet significantly … Continue reading Puppet Slow With Processing Directory with ‘recurse => true’