Skip to content

Instantly share code, notes, and snippets.

@hailwood
Created October 30, 2014 03:34
Show Gist options
  • Select an option

  • Save hailwood/20640c1d27f898b182dd to your computer and use it in GitHub Desktop.

Select an option

Save hailwood/20640c1d27f898b182dd to your computer and use it in GitHub Desktop.
exec { 'install-puppet-apache':
path => '/bin:/sbin:/usr/bin:/usr/sbin',
command => 'puppet module install puppetlabs-apache',
cwd => '/home/vagrant'
}
class { 'composer::install': }
class { 'beanstalkd::install': }
# Install beanstalkd
class beanstalkd::install {
exec { 'install-beanstalkd':
path => '/bin:/sbin:/usr/bin:/usr/sbin',
command => 'apt-get install beanstalkd -y',
cwd => '/home/vagrant'
}
exec { 'install-console':
path => '/bin:/sbin:/usr/bin:/usr/sbin',
command => 'composer create-project ptrofimov/beanstalk_console -s dev /var/www/beanstalk',
cwd => '/home/vagrant'
}
apache::vhost { 'localhost':
ip => '127.0.0.1',
port => '81',
docroot => '/var/www/beanstalk/public'
}
file { '/var/www/beanstalk/config.php':
ensure => file,
source => "puppet:////modules/beanstalkd/config.php"
}
file { '/var/www/beanstalk/storage.json':
mode => 777
}
}
@inhumantsar

Copy link
Copy Markdown

or even

class { [ 'composer::install', 'beanstalkd::install'] : require => Exec['install-puppet-apache'], }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment