Sha256: 1bf805fe4cd26afc020b0cbbd27f8c1e1609413c52c550a20ef7277b4542a626

Contents?: true

Size: 890 Bytes

Versions: 10

Compression:

Stored size: 890 Bytes

Contents

# This is starter example rna template.
# This is meant be be modified to your needs.
default_includes 'base'
# Pre processing rules that run at the beginning
before do
  if role != 'base'
    node[:application] = nil
    node[:deploy_code] = false
    node[:framework_env] = 'production'
    node[:repository] = nil
  end

  node[:before] = 1
  node[:chef_branch] = 'prod' if role =~ /^prod/
  node[:chef_branch] = 'master' if role =~ /^stag/
end

settings[:sendgrid][:relayhost] = "smtp.sendgrid.net"

# Roles
role 'base' do
  role_list ['base']
end

# Post processing rules that run at the end
after do
  node[:after] = 2
  node[:framework_env] = 'production' if role =~ /^prod/
  node[:framework_env] = 'staging' if role =~ /^stag/

  list = role.split('-')
  if list.size == 3
    env, repo, role = list
    role_list ['base', "#{repo}_#{role}"]
    node[:application] = repo
  end
end

Version data entries

10 entries across 5 versions & 1 rubygems

Version Path
rna-0.4.7 lib/starter_project/config/rna.rb
rna-0.4.7 config/rna.rb
rna-0.4.6 config/rna.rb
rna-0.4.6 lib/starter_project/config/rna.rb
rna-0.4.2 lib/starter_project/config/rna.rb
rna-0.4.2 config/rna.rb
rna-0.4.1 lib/starter_project/config/rna.rb
rna-0.4.1 config/rna.rb
rna-0.4.0 config/rna.rb
rna-0.4.0 lib/starter_project/config/rna.rb