From 3a16a36d6b6e0683b41a5d25da82005b6ebaa1c2 Mon Sep 17 00:00:00 2001 From: briri Date: Tue, 20 Apr 2021 15:28:14 -0700 Subject: [PATCH] removed redundant RAILS_MASTER_KEY handling in deploy.rb --- config/deploy.rb | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/config/deploy.rb b/config/deploy.rb index cce969fd7..74605c413 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -28,25 +28,9 @@ namespace :deploy do before :compile_assets, "deploy:retrieve_credentials" - before :compile_assets, "deploy:retrieve_master_key" after :deploy, "git:version" after :deploy, "cleanup:remove_example_configs" - desc 'Retrieve master.key contents from SSM ParameterStore' - task :retrieve_master_key do - on roles(:app), wait: 1 do - if ENV.has_key?('SSM_ROOT_PATH') - begin - ssm = Uc3Ssm::ConfigResolver.new - master_key = ssm.parameter_for_key('master_key') - ENV['RAILS_MASTER_KEY'] = master_key.chomp unless master_key.nil? or master_key.empty? - rescue => e - ActiveSupport::Logger.new($stdout).warn("Could not retrieve master_key from SSM Parameter Store: #{e.full_message}") - end - end - end - end - desc 'Retrieve encrypted crendtials file from SSM ParameterStore' task :retrieve_credentials do on roles(:app), wait: 1 do