Class: KlarnaChef::Generators::Chef

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/klarna_chef/generators/chef.rb

Instance Method Summary collapse

Instance Method Details

#create_cheffileObject



41
42
43
# File 'lib/klarna_chef/generators/chef.rb', line 41

def create_cheffile
  template('Cheffile', "#{name}/Cheffile")
end

#create_example_newrelic_data_bagObject



24
25
26
# File 'lib/klarna_chef/generators/chef.rb', line 24

def create_example_newrelic_data_bag
  template('example_newrelic_data_bag.json', "#{name}/data_bags/newrelic/license.json")
end

#create_example_nodeObject



37
38
39
# File 'lib/klarna_chef/generators/chef.rb', line 37

def create_example_node
  template('example_node.yml', "#{name}/nodes/example.yml")
end

#create_example_user_data_bagObject



20
21
22
# File 'lib/klarna_chef/generators/chef.rb', line 20

def create_example_user_data_bag
  template('example_user_data_bag.json', "#{name}/data_bags/team/example.json")
end

#create_gemfileObject



49
50
51
# File 'lib/klarna_chef/generators/chef.rb', line 49

def create_gemfile
  template('Gemfile', "#{name}/Gemfile")
end

#create_git_known_hosts_data_bagsObject



28
29
30
31
# File 'lib/klarna_chef/generators/chef.rb', line 28

def create_git_known_hosts_data_bags
  template('git_internal_machines.json', "#{name}/data_bags/ssh_known_hosts/git_internal_machines.json")
  template('git_ip_address.json', "#{name}/data_bags/ssh_known_hosts/git_ip_address.json")
end

#create_gitignoreObject



12
13
14
# File 'lib/klarna_chef/generators/chef.rb', line 12

def create_gitignore
  template('gitignore', "#{name}/.gitignore")
end

#create_readmeObject



45
46
47
# File 'lib/klarna_chef/generators/chef.rb', line 45

def create_readme
  template('README.md', "#{name}/README.md")
end

#create_vagrant_nodeObject



33
34
35
# File 'lib/klarna_chef/generators/chef.rb', line 33

def create_vagrant_node
  template('vagrant.yml', "#{name}/nodes/vagrant.yml")
end

#create_vagrantfileObject



53
54
55
# File 'lib/klarna_chef/generators/chef.rb', line 53

def create_vagrantfile
  template('Vagrantfile', "#{name}/Vagrantfile")
end

#create_web_app_roleObject



16
17
18
# File 'lib/klarna_chef/generators/chef.rb', line 16

def create_web_app_role
  template('web_app_role.rb', "#{name}/roles/web_app.rb")
end