Create a Self-Registering Relay with Chef
Generating the Token
Create the Recipe
strong-dm
├── recipes
│ └── default.rb
└── templates
└── default
└── init.sh.erbdefault.rb
template '/usr/local/bin/sdm-init.sh' do
source 'init.sh.erb'
variables(
myip: node['ec2']['local_ipv4'],
admin_token: Chef::EncryptedDataBagItem.load('strongdm', 'admin-token')['content']
)
mode '0500'
owner 'ubuntu'
notifies :run, 'execute[sdm-init]', :immediately
action :create_if_missing
end
execute 'sdm-init' do
command '/usr/local/bin/sdm-init.sh'
action :nothing
endinit.sh.erb
Verify Your New Node
Last updated
Was this helpful?

