0

I have the created a role file with the below contents.

name "Windows_role_150719"
description "Windows_role_150719"

run_list "recipe[deep-sec1]",
"recipe[deep-sec1::install]",
"recipe[deep-sec1::activate]"

override_attributes({
})

The deep-sec1::install & deep-sec1::activate has multiple versions. Like v1, v2, v3, v4, v5

In the roles file how can i specify the version that needs to be installed on the particular node rather than being the latest which is v5.

By default when i upload the role using the "knife role from file command" it takes the latest version and not v2 which i ideally want to apply on the node.

Any help is greatly appreciated

anish anil
  • 2,299
  • 7
  • 21
  • 41

1 Answers1

1

specifying (pinning\locking) a cookbook version is done using an environment, and you associate each node with an environment.

when the chef-client run will start on a node, the cookbooks will be synchronized to the node fullfilling the (cookbook) constraints specified in the environment which the node belongs to.

Mr.
  • 9,429
  • 13
  • 58
  • 82