This repository has been archived by the owner on Dec 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved DB packages installation from configure to setup
- Loading branch information
Igor Rzegocki
committed
Apr 10, 2016
1 parent
730857f
commit e23f2d4
Showing
4 changed files
with
30 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# frozen_string_literal: true | ||
# | ||
# Cookbook Name:: opsworks_ruby | ||
# Recipe:: setup | ||
# | ||
|
||
if Chef::Config[:solo] | ||
Chef::Log.warn('This recipe uses search. Chef Solo does not support search.') | ||
end | ||
|
||
applications = search(:aws_opsworks_app) | ||
rdses = search(:aws_opsworks_rds_db_instance) | ||
|
||
node['deploy'].each do |deploy_app_id, _deploy| | ||
application = applications.detect { |app| app['id'] == deploy_app_id } | ||
next unless application | ||
rdses.each do |rds| | ||
database = Drivers::Db::Factory.build(application, node, rds: rds) | ||
database.setup(self) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters