Questions tagged [databags]

A data bag is a global variable that is stored as JSON data and is accessible from a Chef Server. A data bag is indexed for searching and can be loaded by a recipe or accessed during a search. The contents of a data bag can vary, but they often include sensitive information (such as database passwords).

83 questions
0
votes
1 answer

Chef Json values to ERB files

How are values from data bag JSON files accessed from ERB files in Chef templates. I have a data bag file named chef-repo/data_bags/test.json containing this data: { "id": "test", "test": { "name": "doel" } } Within the…
Doel
  • 962
  • 7
  • 14
0
votes
2 answers

Chef: create a user only for certain roles?

I'd like to setup a user (called 'deployer'), but only for certain roles. I'm using the Opscode users cookbook. I'm calling it from a 'base' (included by all other cookbooks) wrapper cookbook. So, users in my data_bags/users directory are getting…
David J.
  • 31,569
  • 22
  • 122
  • 174
0
votes
1 answer

How to Batch edit a data_bag

I have a data_bag with 40+ items and need to add certain parameters to most of them. Is there a way to edit, e.g. with knife, all data_bag items? So far, all I can see is to have each item open in my editor.
berkes
  • 26,996
  • 27
  • 115
  • 206
0
votes
1 answer

chef knife bootstrap admin users

For reasons I won't go into I have some chef recipes that need to edit the contents of a data bag. Thus, I believe, the node user profile needs to be "admin: true". So when I bootstrap a node (knife bootstrap) the first pass fails with a http 403…
clh
  • 839
  • 8
  • 11
-1
votes
1 answer

How to access an array and assign data to each object in Java?

Problem: I'm trying to figure out how to access the Student Array class in order to create four entries for each Student object, but I'm not sure how to do so, while also allowing the program to create more than just one Student. public class…
Ashley Yu
  • 1
  • 3
-1
votes
2 answers

Joining both hashsets together

My aim is to create a database like code where i add planets and the year they are found, and once the user inputs planets it shows all the planets and the year they are found, so far i have created this. import java.util.HashSet; import…
Amr Mixy
  • 83
  • 1
  • 8
-2
votes
2 answers

Concatenate multiple databags on a recipe chef

I am trying to concatenate multiple databags into a single array : jettyrealm_prop=[] data_bag_item('data_' + node.chef_environment, node['product']['realm_databag'].each do |item| jettyrealm_prop.insert(item) end) node['product']['realm_databag']…
And-M31
  • 3
  • 1
-3
votes
1 answer

Pass CLI arguments to chef-client while knife ssh

I am trying to automate application deployment using chef. I had prepared cookbook which is generic(works based on input attribute values) to deploy APIs. I've kept all the attributes in my attribute folder. Here the problem am facing is I am able…
1 2 3 4 5
6