Skip to content

Instantly share code, notes, and snippets.

@robinbowes
Last active August 29, 2015 14:16
Show Gist options
  • Save robinbowes/90843002f46f9fb1a74a to your computer and use it in GitHub Desktop.
Save robinbowes/90843002f46f9fb1a74a to your computer and use it in GitHub Desktop.
class role::myapp(
$environment,
) {
include profile::apache
include profile::apache::status
include ::apache::mod::php
include ::apache::mod::deflate
#include ::apache::mod::setenvif
apache::vhost { 'myapp.mysite.com':
vhost_name => '*',
port => '80',
docroot => '/var/www/myapp',
serveradmin => '[email protected]',
#servername => 'myapp.mysite.com',
serveraliases => [
'qa4.myapp.mysite.com',
],
# THIS IS THE SPOT THAT'S NOT WORKING. I want to set our environment variable accordingly
setenv => ["MDOT_ENV $environment"],
}
}
class role::myapp::dev{
class{'::role::myapp':
environment => 'dev',
}
}
@bluekayak3
Copy link

What's the syntax I should use for the 3rd line in the code below?

class role::myapp::dev inherits role::myapp {
$myapp_env_var = "dev"
environment => 'dev',
}

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