Puppet install less compiler from wheezy backports

Recently I was building my Symfony development box with Vagrant and faced problem how to install less compiler. After some searches I decided that best(?) way to install lessc is from Debian backports. Now I had another problem, how to install package from backports? Solution wasn’t easy to find, however I used these steps:

Install apt puppet module, in Vagrantfile add these lines:

$script = <<EOF
mkdir -p /etc/puppet/modules
(puppet module list | grep puppetlabs-apt) ||
   puppet module install puppetlabs-apt --version 1.4.2

  config.vm.provision :shell, :inline => $script

Now in your puppet manifest file include apt, add backports source, and install package like any other:

include apt
class node-less {
	include apt::backports

	apt::source { 'debian_backports':
		location => 'http://ftp.lt.debian.org/debian',
		release => 'wheezy-backports',
		repos => 'main',
		include_src => false,
	package { 'node-less':
		ensure => present,
                require => apt::source['debian_backports']
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.
This entry was posted in Linux, Programming, Server and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *