user3540835
user3540835

Reputation: 453

How to specify multiple role and recipe in bootstrap command in the run_list

When I try to specify multiple roles in the run_list of knife bootstrap command, it fails with following error

Unable to create Chef::RunList::RunListItem from String:"role[A],role[B]"

How can I specify multiple roles/recipe or a combination of role/recipe in knife bootstrap command ?

Upvotes: 2

Views: 2506

Answers (2)

BoomShadow
BoomShadow

Reputation: 962

You would need to use the following:

knife bootstrap HOSTNAME --run-list 'role[A],role[B]'

Upvotes: 1

Tim Johnson
Tim Johnson

Reputation: 33

I would recommend using wrapper cookbooks to define roles for a node instance of using chef's role feature. You achieve the same end, and you also can write tests around your roles.

Upvotes: 1

Related Questions