Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
# Please see the following blog post for more information: | |
# | |
# https://www.hashicorp.com/blog/using-hashicorp-vault-with-chef.html | |
# | |
resource_name :vault_secret | |
property :path, String, name_property: true | |
property :destination, String |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
# Ubuntu Server automated installation | |
# by Scott Lowe ([email protected]) | |
d-i debian-installer/locale string en_US | |
d-i console-setup/ask_detect boolean false | |
d-i keyboard-configuration/layoutcode string us | |
d-i netcfg/choose_interface select eth0 | |
d-i netcfg/get_hostname string hostname | |
d-i netcfg/get_domain string domain.com | |
d-i netcfg/wireless_wep string |
require 'pg' | |
add_command_under_category "cleanup-bifrost", "cleanup", "Cleanup orphaned bifrost objects.", 2 do | |
erchef_db = setup_erchef_db | |
bifrost_db = setup_bifrost_db | |
puts "Populating hash of valid clients and users." | |
clients_and_users = erchef_db.exec_params("SELECT authz_id FROM clients UNION select authz_id FROM users") | |
real_actor_list = [] | |
clients_and_users.each do |real_actor| |
use_inline_resources | |
require 'json' | |
include ClcLibrary::Helper | |
include Provisioner::Helper | |
def whyrun_supported? | |
true | |
end |
#!/bin/bash | |
MACHINE_TYPE=$1 | |
USER_NAME='provisioner' | |
USER_HOME="/home/$USER_NAME" | |
if [ -d $USER_HOME ] | |
then | |
echo "ALREADY REGISTERED" | |
else |
require 'chef/provisioning' | |
chef_gem 'chef-provisioning-vagrant' | |
count = ['one', 'two'] | |
count.each do |nc| | |
machine "vweb-#{nc}" do | |
action [:ready, :setup, :converge] | |
driver 'vagrant' |
chef_gem 'chef-provisioning-vagrant' | |
with_chef_server "https://api.opscode.com/organizations/zzondlo", | |
:client_name => Chef::Config[:node_name], | |
:signing_key_filename => Chef::Config[:client_key] | |
machine "vweb" do | |
action [:ready, :setup, :converge] | |
driver 'vagrant' | |
machine_options :vagrant_options => { |
with_driver 'ssh' | |
with_chef_server "https://api.opscode.com/organizations/double-z", | |
:client_name => Chef::Config[:node_name], | |
:signing_key_filename => Chef::Config[:client_key] | |
machine "winone" do | |
action [:ready, :setup, :converge] | |
machine_options :transport_options => { | |
'is_windows' => true, |
cat > /etc/chef/user.pem <<'EOP' | |
<%= IO.read(File.expand_path(@chef_config[:client_key])) %> | |
EOP | |
chmod 0600 /etc/chef/user.pem |