Skip to content

Commit 150a729

Browse files
committed
Add craft ssh key
1 parent de5983e commit 150a729

File tree

1 file changed

+25
-26
lines changed

1 file changed

+25
-26
lines changed

cookbooks/boxcutter_builder/recipes/default.rb

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -46,32 +46,31 @@
4646

4747
include_recipe 'boxcutter_github::runner_user'
4848
node.default['fb_users']['groups']['docker']['members'] << 'github-runner'
49-
# node.default['fb_ssh']['authorized_keys_users'] << 'github-runner'
50-
51-
# node.default['fb_ssh']['authorized_keys']['github-runner']['aws-arm64-github-runner'] = \
52-
# Boxcutter::OnePassword.op_read('op://Automation-Org/craft SSH Key/public key')
53-
54-
# directory '/home/github-runner/.ssh' do
55-
# owner 'github-runner'
56-
# group 'github-runner'
57-
# mode '0700'
58-
# end
59-
#
60-
# ssh_known_hosts_entry 'github.com' do
61-
# file_location '/home/github-runner/.ssh/known_hosts'
62-
# owner 'github-runner'
63-
# group 'github-runner'
64-
# end
65-
#
66-
# craft_rsa_ssh_key_private = \
67-
# Boxcutter::OnePassword.op_read('op://Automation-Org/craft SSH Key/private key')
68-
#
69-
# file '/home/github-runner/.ssh/id_rsa' do
70-
# owner 'github-runner'
71-
# group 'github-runner'
72-
# mode '0600'
73-
# content craft_rsa_ssh_key_private
74-
# end
49+
50+
node.default['fb_ssh']['authorized_keys']['github-runner']['craft'] = \
51+
Boxcutter::OnePassword.op_read('op://Automation-Org/craft SSH Key/public key')
52+
53+
directory '/home/github-runner/.ssh' do
54+
owner 'github-runner'
55+
group 'github-runner'
56+
mode '0700'
57+
end
58+
59+
ssh_known_hosts_entry 'github.com' do
60+
file_location '/home/github-runner/.ssh/known_hosts'
61+
owner 'github-runner'
62+
group 'github-runner'
63+
end
64+
65+
craft_rsa_ssh_key_private = \
66+
Boxcutter::OnePassword.op_read('op://Automation-Org/craft SSH Key/private key')
67+
68+
file '/home/github-runner/.ssh/id_rsa' do
69+
owner 'github-runner'
70+
group 'github-runner'
71+
mode '0600'
72+
content craft_rsa_ssh_key_private
73+
end
7574
end
7675

7776
aws_amd64_github_self_host_runner_list = [

0 commit comments

Comments
 (0)