Sha256: 41900dda6cf9f300c176927b1c4d6cc52b45eec062fafdfcb136e528a0c92902
Contents?: true
Size: 1.1 KB
Versions: 5
Compression:
Stored size: 1.1 KB
Contents
require 'securerandom' require_relative 'services/init' require_relative 'services/mongodb' require_relative 'services/mysql' module DanarchyDeploy module Services def self.new(deployment, options) puts "\n" + self.name deployment[:services].each do |service, params| next if service == :init puts "\nConfiguring service: #{service}" if params[:archives] && !params[:archives].empty? puts "\n" + self.name puts " > Deploying archives for #{service}" DanarchyDeploy::Archiver.new(params[:archives], options) end if params[:templates] && !params[:templates].empty? puts " > Configuring templates for #{service}" DanarchyDeploy::Templater.new(params[:templates], options) end if %w[mysql mariadb].include?(service.to_s) DanarchyDeploy::Services::MySQL.new(deployment[:os], params, options) end if %[mongodb].include?(service.to_s) DanarchyDeploy::Services::MongoDB.new(deployment[:os], params, options) end end deployment end end end
Version data entries
5 entries across 5 versions & 1 rubygems