From 520b94e24a252211141ceef95e3c10890ba7bd0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Tue, 12 Aug 2025 14:48:59 +0200 Subject: [PATCH] templates/packer: stop setting up Pulp credentials MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomáš Hozza --- .../get_pulp_creds.sh | 34 ------------------- .../files/worker-initialization.service | 1 - 2 files changed, 35 deletions(-) delete mode 100755 templates/packer/ansible/roles/common/files/worker-initialization-scripts/get_pulp_creds.sh diff --git a/templates/packer/ansible/roles/common/files/worker-initialization-scripts/get_pulp_creds.sh b/templates/packer/ansible/roles/common/files/worker-initialization-scripts/get_pulp_creds.sh deleted file mode 100755 index 190a3c25d..000000000 --- a/templates/packer/ansible/roles/common/files/worker-initialization-scripts/get_pulp_creds.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -set -euo pipefail -source /tmp/cloud_init_vars - -echo "Deploy Pulp credentials." - -PULP_PASSWORD_ARN=${PULP_PASSWORD_ARN:-} -if [[ -z "$PULP_PASSWORD_ARN" ]]; then - echo "PULP_PASSWORD_ARN not defined, skipping." - exit 0 -fi - -/usr/local/bin/aws secretsmanager get-secret-value \ - --endpoint-url "${SECRETS_MANAGER_ENDPOINT_URL}" \ - --secret-id "${PULP_PASSWORD_ARN}" | jq -r ".SecretString" > /tmp/pulp_credentials.json - -PULP_PASSWORD=$(jq -r ".password" /tmp/pulp_credentials.json) -rm /tmp/pulp_credentials.json - -PULP_USERNAME=${PULP_USERNAME:-admin} -PULP_SERVER=${PULP_SERVER:-} - -sudo tee /etc/osbuild-worker/pulp_credentials.json > /dev/null << EOF -{ - "username": "$PULP_USERNAME", - "password": "$PULP_PASSWORD" -} -EOF - -sudo tee -a /etc/osbuild-worker/osbuild-worker.toml > /dev/null << EOF -[pulp] -server_address = "$PULP_SERVER" -credentials = "/etc/osbuild-worker/pulp_credentials.json" -EOF diff --git a/templates/packer/ansible/roles/common/files/worker-initialization.service b/templates/packer/ansible/roles/common/files/worker-initialization.service index a988af61c..2d3b03df3 100644 --- a/templates/packer/ansible/roles/common/files/worker-initialization.service +++ b/templates/packer/ansible/roles/common/files/worker-initialization.service @@ -19,7 +19,6 @@ ExecStart=/usr/local/libexec/worker-initialization-scripts/get_azure_creds.sh ExecStart=/usr/local/libexec/worker-initialization-scripts/get_gcp_creds.sh ExecStart=/usr/local/libexec/worker-initialization-scripts/get_koji_creds.sh ExecStart=/usr/local/libexec/worker-initialization-scripts/get_oci_creds.sh -ExecStart=/usr/local/libexec/worker-initialization-scripts/get_pulp_creds.sh ExecStart=/usr/local/libexec/worker-initialization-scripts/get_ldap_sa_mtls_creds.sh ExecStart=/usr/local/libexec/worker-initialization-scripts/worker_service.sh ExecStopPost=/usr/local/libexec/worker-initialization-scripts/on_exit.sh