Can add a role under another role?


#1

Hi All,

Is it possible to add a role directly under another role ?.

Say I have these two roles “myserver_mysql” and “myserver_webservice”.
created already. Can I add these roles directly under a base role
"myserver_all" ?

myserver_all
|__myserver_mysql
|__myserver_webservice

thanks
ans


#2

Yes you can.

Actually roles contains other role + recipes, at runlist execution time all
roles evaluated in order.
Ex:
Role1 = [recipe[recipe1]]
Role2(contains role1) = [role[role1], recipe[recipe2]]

and your Node runlist contains Role2 then,
at execution time Role2 becomes => [recipe[recipe1], recipe[recipe2] ]
Final runlist contains only recipes.

To add one Role to another Role you can use https://manage.opscode.com/ go
to Roles->select role (i.e in which you want add other roles) -> edit ->
and then by using drag and drop you can add or remove roles+recipes from
runlist

Or

You can use knife plugin to edit role see $knife role --help

On Thu, Feb 6, 2014 at 3:38 PM, ans ans.bob@gmail.com wrote:

Hi All,

Is it possible to add a role directly under another role ?.

Say I have these two roles “myserver_mysql” and “myserver_webservice”.
created already. Can I add these roles directly under a base role
"myserver_all" ?

myserver_all
|__myserver_mysql
|__myserver_webservice

thanks
ans


Regards*,*

Siddheshwar More

Software Engineer,

Clogeny Technologies | http://clogeny.com

(M) 0091-9763416916


#3

Thanks Siddheshwar :slight_smile:

On Thu, Feb 6, 2014 at 5:09 PM, Siddheshwar More <
siddheshwar.more@clogeny.com> wrote:

Yes you can.

Actually roles contains other role + recipes, at runlist execution time
all roles evaluated in order.

Ex:
Role1 = [recipe[recipe1]]
Role2(contains role1) = [role[role1], recipe[recipe2]]

and your Node runlist contains Role2 then,
at execution time Role2 becomes => [recipe[recipe1], recipe[recipe2] ]
Final runlist contains only recipes.

To add one Role to another Role you can use https://manage.opscode.com/ go
to Roles->select role (i.e in which you want add other roles) -> edit ->
and then by using drag and drop you can add or remove roles+recipes from
runlist

Or

You can use knife plugin to edit role see $knife role --help

On Thu, Feb 6, 2014 at 3:38 PM, ans ans.bob@gmail.com wrote:

Hi All,

Is it possible to add a role directly under another role ?.

Say I have these two roles “myserver_mysql” and “myserver_webservice”.
created already. Can I add these roles directly under a base role
"myserver_all" ?

myserver_all
|__myserver_mysql
|__myserver_webservice

thanks
ans


Regards*,*

Siddheshwar More

Software Engineer,

Clogeny Technologies | http://clogeny.com

(M) 0091-9763416916


Regards
ans


We need to forget what we think we are, so that we can really become what
we are…