Sha256: 2a7e0e0c49470d0a18e9efa8626c4d8533c948f875be35b576afe9b89025a500

Contents?: true

Size: 750 Bytes

Versions: 60

Compression:

Stored size: 750 Bytes

Contents

class Subspace::Commands::Configure < Subspace::Commands::Base
  def initialize(args, options)
    require_configuration
    run
  end

  def run
    Subspace.config.hosts.each do |host|
      update_host_configuration(host)
    end
    Subspace.config.groups.each do |group|
      update_group_configuration(group)
    end
  end

  private

  def update_host_configuration(host)
    say "Generating config/provisiong/host_vars/#{host}"
    template "host_vars/template", "host_vars/#{host}", Subspace.config.binding_for(host: host)
  end

  def update_group_configuration(group)
    say "Generating config/provisiong/group_vars/#{group}"
    template "group_vars/template", "group_vars/#{group}", Subspace.config.binding_for(group: group)
  end
end

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
subspace-2.5.10 lib/subspace/commands/configure.rb
subspace-2.5.9 lib/subspace/commands/configure.rb
subspace-2.5.8 lib/subspace/commands/configure.rb
subspace-2.5.7 lib/subspace/commands/configure.rb
subspace-2.5.6 lib/subspace/commands/configure.rb
subspace-2.5.5 lib/subspace/commands/configure.rb
subspace-2.5.4 lib/subspace/commands/configure.rb
subspace-2.5.3 lib/subspace/commands/configure.rb
subspace-2.5.2 lib/subspace/commands/configure.rb
subspace-2.5.1 lib/subspace/commands/configure.rb
subspace-2.5 lib/subspace/commands/configure.rb
subspace-2.4.2 lib/subspace/commands/configure.rb
subspace-2.4.1 lib/subspace/commands/configure.rb
subspace-2.4.0 lib/subspace/commands/configure.rb
subspace-2.3.3 lib/subspace/commands/configure.rb
subspace-2.3.2 lib/subspace/commands/configure.rb
subspace-2.3.1 lib/subspace/commands/configure.rb
subspace-2.3.0 lib/subspace/commands/configure.rb
subspace-2.2.3 lib/subspace/commands/configure.rb
subspace-2.2.2 lib/subspace/commands/configure.rb