File tree 4 files changed +11
-6
lines changed
roles/common/files/ssh-keys
4 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
3
3
sha : " {{ lookup('aws_ssm', '/docs-rs/builder/sha') }}"
4
- vars_repository_sha : " {{ sha | ternary(sha, 'HEAD') }}"
4
+ vars_repository_sha : " {{ sha | ternary(sha, 'HEAD') }}"
5
+
6
+ vars_extra_sudo_users :
7
+ - rylev
Original file line number Diff line number Diff line change 9
9
- role : common
10
10
papertrail_url : " {{ vars_papertrail_url }}"
11
11
collect_metrics_from : " {{ global_collect_metrics_from }}"
12
- sudo_users : " {{ global_sudo_users }}"
12
+ sudo_users : " {{ global_sudo_users + vars_extra_sudo_users }}"
13
13
14
14
- role : docs-rs-builder
Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDj2ga6r2r4AzZDyJJ3w81mTQIntuq5TdFlylZ1gwbd
3
3
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDro4UttZ6XQshnFBq4LdLXr0VDeunZFNRcv90ckpkZQrxbErzmpEvng0QUi9TI9gU/W4+cXhXAyEOcm+fVChesJBpqLFDJbQDmCPioPPsKVZ6ErBu3RHOgd4mD/Cfuly36L9AENql16R6ecxgbRVgpUISDYKo5jzRC7fJD40+bOai5Fv8+xvbuHPNJhj/IKxKCPDYCJ2+7H+6TMLZn5HjBvP42KES6030kR7pVWnug/OXSKESF0gm3tfspmFcw1aS57zVpyT7IlZvLb5zNvX8G8CEGV3KY//z80cbNMOa8QXggUGaLgFzwI2ng2W5CFHkOAXbX3bOtshsAmj0JWoM3ya+n70+E9tnGbwliOV/EfzQ1f0USyci8V2f1TkVLoRzWLBjtH5HsomsWN/8eNYcmDdbxy0TdclDEY6FavsDnQwD+JsDoeJaN+d31jyGSlYxcF+TZRgK5rFsRBZyXOc2sXi1bOQDWr5nt8y18yDhij7hj/wzV9DFwM4FVPOKNasImSZiVILwBUkdEGVAsTBuee6llrsApL1WmPsIb1xMrhN0+n1ZP7/07U69Eiqygbd6gb3a931H1z73j44MLvfh1BFsnrrmpFOb2PaSV+nwoi4pxSMOEiFZpno7hnc4OD3I+P/hBP3+6a42joHI42H08JsPZ0PgfiD8tjl/Z0/XLyw==
4
4
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILNkAIu1i0W8zWY/VO7yJ1I09KPlXa15Upfo8kIe21Up
5
5
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAHkoXhB9Pq+JKC+gPySI5yKwhYtGA++EfJ+7Ng3NNhN
6
+ ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMxnE3/tgSLhXGQMjTzFBWBvpOJkNL+bojUthFVN4qCw
Original file line number Diff line number Diff line change @@ -13,10 +13,12 @@ data "amazon-parameterstore" "revision" {
13
13
14
14
locals {
15
15
revision = data. amazon-parameterstore . revision . value
16
+ pretty_revision = substr (local. revision , 0 , 8 )
17
+ timestamp = regex_replace (timestamp (), " [- TZ:]" , " " )
16
18
}
17
19
18
20
source "amazon-ebs" "ubuntu" {
19
- ami_name = " docs-rs-builder-${ local . revision } "
21
+ ami_name = " docs-rs-builder-${ local . pretty_revision } - ${ local . timestamp } "
20
22
instance_type = " t2.large"
21
23
region = " us-east-1"
22
24
source_ami_filter {
@@ -43,12 +45,11 @@ build {
43
45
44
46
provisioner "ansible" {
45
47
command = " .venv/bin/ansible-playbook"
46
- # The default is "default"
47
- host_alias = " docs-rs-builder"
48
+ groups = [" docs-rs-builder" ]
48
49
inventory_directory = " ./env"
49
50
playbook_file = " ./play/playbook.yml"
50
51
# The default is the user running packer
51
52
user = " ubuntu"
52
- extra_arguments = [ " --extra-vars" , " vars_repository_sha=${ local . revision } " ]
53
+ extra_arguments = [" --extra-vars" , " vars_repository_sha=${ local . revision } " ]
53
54
}
54
55
}
You can’t perform that action at this time.
0 commit comments