From 81d74e4a9daedc57e307597684945021baeb87b3 Mon Sep 17 00:00:00 2001 From: dhh Date: Fri, 15 Sep 2023 10:20:29 -0700 Subject: [PATCH] Record push of env files for audit on app servers --- lib/kamal/cli/env.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/kamal/cli/env.rb b/lib/kamal/cli/env.rb index 7d4dac102..44763554a 100644 --- a/lib/kamal/cli/env.rb +++ b/lib/kamal/cli/env.rb @@ -5,6 +5,8 @@ class Kamal::Cli::Env < Kamal::Cli::Base def push mutating do on(KAMAL.hosts) do + execute *KAMAL.auditor.record("Pushed env files"), verbosity: :debug + KAMAL.roles_on(host).each do |role| role_config = KAMAL.config.role(role) execute *KAMAL.app(role: role).make_env_directory @@ -31,6 +33,8 @@ def push def delete mutating do on(KAMAL.hosts) do + execute *KAMAL.auditor.record("Deleted env files"), verbosity: :debug + KAMAL.roles_on(host).each do |role| role_config = KAMAL.config.role(role) execute *KAMAL.app(role: role).remove_env_file