From 9b2a899ea8658ae0d1960383064402d449d9aebd Mon Sep 17 00:00:00 2001 From: Nikolay Edigaryev Date: Tue, 19 Mar 2024 18:32:12 +0400 Subject: [PATCH] Enable UI automation by default (#137) --- scripts/automationmodetool.expect | 6 ++++++ templates/base.pkr.hcl | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 scripts/automationmodetool.expect diff --git a/scripts/automationmodetool.expect b/scripts/automationmodetool.expect new file mode 100644 index 0000000..2248b66 --- /dev/null +++ b/scripts/automationmodetool.expect @@ -0,0 +1,6 @@ +#!/usr/bin/expect -f + +spawn automationmodetool enable-automationmode-without-authentication +expect "Enter the password for user 'admin':" +send "admin\n" +expect "Setting up machine to allow Automation Mode without requiring user authentication... succeeded." diff --git a/templates/base.pkr.hcl b/templates/base.pkr.hcl index 95f2b61..0de2517 100644 --- a/templates/base.pkr.hcl +++ b/templates/base.pkr.hcl @@ -102,4 +102,9 @@ build { "brew install awscli" ] } + + # Enable UI automation, see https://github.com/cirruslabs/macos-image-templates/issues/136 + provisioner "shell" { + script = "scripts/automationmodetool.expect" + } }