Skip to content

Instantly share code, notes, and snippets.

@benneuman
Created May 23, 2014 15:31
Show Gist options
  • Save benneuman/b28d924c8cedd2c0e81d to your computer and use it in GitHub Desktop.
Save benneuman/b28d924c8cedd2c0e81d to your computer and use it in GitHub Desktop.
Bash script for pushing data bags. Put in chef-repo dir on your workstation. Make sure you have encryption key at chef-repo/.chef/encrypted_data_bag_secret.
#!/bin/bash
DATA_BAGS=data_bags/users/*
for f in $DATA_BAGS
do
knife data bag from file users $f --secret-file .chef/encrypted_data_bag_secret
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment