Reputation: 5933
I installed one module from :
Now I have the directory structure as follows :
Contents of g_redis.pp :
class g_redis{
include redis
class {'redis' :
version => '2.6.14',
redis_port => '7000' ----->A
}
redis::instance{ 'redis-7000'
redis_port => '7000', ----->B
}
}
Contents of site.pp is :
import 'classes/*.pp'
node default{}
node 'nodename'{
include g_redis
}
Now I have questions like :
Upvotes: 0
Views: 371
Reputation: 3806
For your first question, class{'redis':}
will start a default instance, so I think you don't need to instantiate a redis:instance, unless you want to have two different instances running in your box.
For your second question
include redis
class {'redis' :
version => '2.6.14',
redis_port => '7000' ----->A
}
Here you are instantiating twice redis class.
include redis
is almost equivalent to
class {'redis' :
}
So second Class['redis'] gives you this error
You should choose between using a basic redis setup or a customized one. If you want two different versions of redis running simultaneously you will have to work hard on the recipes.
node 'nodename'{
class{'redis':
version => '2.6.14',
redis_port => '7000'
}
}
Upvotes: 1