Class: Takelage::InitPacker

Overview

takelage init packer

Class Method Summary collapse

Instance Method Summary collapse

Methods included from InitPackerDocker

#init_packer_docker

Methods included from BitRequireImport

#bit_require_import

Methods included from BitClipboardPaste

#bit_clipboard_paste

Methods included from BitClipboardCopy

#bit_clipboard_copy

Methods included from BitCheckWorkspace

#bit_check_workspace

Methods included from GitCheckWorkspace

#git_check_workspace

Methods included from GitCheckBit

#git_check_bit

Methods included from GitCheckClean

#git_check_clean

Methods included from ProjectModule

#initialize_project, #project

Methods included from ConfigModule

#config, #configured?, #initialize_config

Methods included from SystemModule

#command_available_else_error?, #command_available_else_warn?, #hash_to_yaml, #read_yaml_erb_file, #read_yaml_file, #rm_fr, #run, #run_and_capture, #run_and_exit, #run_and_fork, #try

Methods included from LoggingModule

#initialize_logging, #log

Methods inherited from SubCommandBase

banner, subcommand_prefix

Constructor Details

#initialize(args = [], local_options = {}, configuration = {}) ⇒ InitPacker

Initialize bit require Define templates rubocop:disable Metrics/MethodLength



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/takelage/init/packer/cli.rb', line 28

def initialize(args = [], local_options = {}, configuration = {})
  # initialize thor parent class
  super args, local_options, configuration

  @bit_require_file = config.active['bit_require_file']

  @ansiblelint = {
    name: 'ansible/.ansible-lint',
    template: 'templates/ansiblelint.tt'
  }
  @bitrequireyml = {
    name: 'bitrequire.yml',
    template: 'templates/bitrequireyml.tt'
  }
  @gitignore = {
    name: '.gitignore',
    template: '../templates/gitignore.tt'
  }
  @groupvarsprojectyml = {
    name: 'ansible/group_vars/all/project.yml',
    template: 'templates/groupvarsprojectyml.tt'
  }
  @playbooksiteyml = {
    name: 'ansible/playbook-site.yml',
    template: 'templates/playbooksiteyml.tt'
  }
  @projectyml = {
    name: 'project.yml',
    template: 'templates/projectyml.tt'
  }
  @rakefile = {
    name: 'Rakefile',
    template: '../templates/Rakefile.tt'
  }
end

Class Method Details

.source_rootObject

Provide template path for Thor:Actions



66
67
68
# File 'lib/takelage/init/packer/cli.rb', line 66

def self.source_root
  File.dirname(__FILE__)
end

Instance Method Details

#dockerObject

Initialize packer project [NAME] for docker images.



78
79
80
# File 'lib/takelage/init/packer/cli.rb', line 78

def docker
  exit init_packer_docker
end