Sha256: 482631871047981024a6ae95c26b93c1037008417c71ac9d5f171e504804910e

Contents?: true

Size: 394 Bytes

Versions: 1

Compression:

Stored size: 394 Bytes

Contents

require 'yaml'
require 'awesome_print'

namespace :operator do
  task :check do

    set :operation, ENV['operation']

    if fetch(:operation).nil?
      puts 'please set operation.(e.g. bundle exec cap staging check:yaml operation=sample)'
      exit 1
    end

    on roles(:all) do |host|
      yaml = YAML.load_file("./operations/#{fetch(:operation)}.yml")
      ap yaml
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
capistrano-operator-1.0.0 lib/capistrano/tasks/check.rake