Skip to content

Commit

Permalink
templates/packer: allow setting executor type in worker config
Browse files Browse the repository at this point in the history
Currently the worker images always have to use aws.ec2, this way we can
use the host executor for fedora.
  • Loading branch information
croissanne committed Oct 28, 2024
1 parent 4afcd8c commit 0ef0ae7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ source /tmp/cloud_init_vars
echo "Writing osbuild_executor config to worker configuration."
OSBUILD_EXECUTOR_IAM_PROFILE=${OSBUILD_EXECUTOR_IAM_PROFILE:-osbuild-executor}
OSBUILD_EXECUTOR_CLOUDWATCH_GROUP=${OSBUILD_EXECUTOR_CLOUDWATCH_GROUP:-}
OSBUILD_EXECUTOR_TYPE=${OSBUILD_EXECUTOR_TYPE:-aws.ec2}

CLOUDWATCH_GROUP_CONFIG=""
if [ -n "${OSBUILD_EXECUTOR_CLOUDWATCH_GROUP}" ]; then
Expand All @@ -14,7 +15,7 @@ fi

sudo tee -a /etc/osbuild-worker/osbuild-worker.toml > /dev/null << EOF
[osbuild_executor]
type = "aws.ec2"
type = "${OSBUILD_EXECUTOR_TYPE}"
iam_profile = "${OSBUILD_EXECUTOR_IAM_PROFILE}"
${CLOUDWATCH_GROUP_CONFIG}
EOF

0 comments on commit 0ef0ae7

Please sign in to comment.