You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However if a run_list includes multiple cookbooks (and it usually does) and more than one cookbook tries that pattern, it will fail. Because you can not include_recipe twice.
So, node.default['users'] = ['exampleuser', 'exampleuser2'] has to be set somewhere else, outside the cookbook as an extra step, such as on a role or node.
Or, have user_account directly:
In your_cookbook/recipes/default.rb
user_account 'hsolo' do
ssh_keygen true
end
Then the data is not in a data_bag, it must be directly in the cookbook.
It would be nice if user_account could load data from a data_bag, or if a new lwrp loaded a user_account from a databag. or you could include_recipe twice.
what is the easiest way to handle this case?
The text was updated successfully, but these errors were encountered:
A pattern that might be followed in a cookbook is:
node.default['users'] << 'exampleuser'
include_recipe 'user::data_bag'
However if a run_list includes multiple cookbooks (and it usually does) and more than one cookbook tries that pattern, it will fail. Because you can not include_recipe twice.
So, node.default['users'] = ['exampleuser', 'exampleuser2'] has to be set somewhere else, outside the cookbook as an extra step, such as on a role or node.
Or, have user_account directly:
In your_cookbook/recipes/default.rb
user_account 'hsolo' do
ssh_keygen true
end
Then the data is not in a data_bag, it must be directly in the cookbook.
It would be nice if user_account could load data from a data_bag, or if a new lwrp loaded a user_account from a databag. or you could include_recipe twice.
what is the easiest way to handle this case?
The text was updated successfully, but these errors were encountered: