Skip to content

Instantly share code, notes, and snippets.

@chribben
Created February 1, 2013 23:00
Show Gist options
  • Save chribben/4694772 to your computer and use it in GitHub Desktop.
Save chribben/4694772 to your computer and use it in GitHub Desktop.
class mosquitto {
exec { 'apt-get update':
command => '/usr/bin/apt-get update'
}
package { 'python-software-properties':
ensure => installed,
require => Exec['apt-get update'],
}
exec { 'sudo add-apt-repository ppa:mosquitto-dev/mosquitto-ppa':
command => 'add-apt-repository ppa:mosquitto-dev/mosquitto-ppa',
path => '/usr/bin/',
require => Package['python-software-properties']
}
exec { 'apt-get update II':
command => '/usr/bin/apt-get update',
require => Exec['sudo add-apt-repository ppa:mosquitto-dev/mosquitto-ppa']
}
package { 'mosquitto':
ensure => installed,
require => Exec['apt-get update II'],
}
package { 'mosquitto-clients':
ensure => installed,
require => Exec['apt-get update II'],
}
exec { 'start mosquitto':
command => '/usr/sbin/mosquitto',
timeout => 0,
require => Package['mosquitto']
}
}
include mosquitto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment