Class: Takeltau::InitPacker
- Inherits:
-
SubCommandBase
- Object
- Thor
- SubCommandBase
- Takeltau::InitPacker
- Includes:
- ConfigModule, GitCheckClean, GitCheckWorkspace, InitLib, InitPackerDocker, LoggingModule, ProjectModule, SystemModule, Thor::Actions
- Defined in:
- lib/takeltau/init/packer/cli.rb
Overview
takeltau init packer
Class Method Summary collapse
-
.source_root ⇒ Object
Provide template path for Thor:Actions.
Instance Method Summary collapse
-
#docker ⇒ Object
Initialize packer project [NAME] for docker images.
-
#initialize(args = [], local_options = {}, configuration = {}) ⇒ InitPacker
constructor
Define templates rubocop:disable Metrics/MethodLength.
Methods included from InitPackerDocker
Methods included from GitCheckWorkspace
Methods included from GitCheckClean
Methods included from ProjectModule
Methods included from ConfigModule
#config, #configured?, #initialize_config
Methods included from SystemModule
#command_available_else_error?, #hash_to_yaml, #read_yaml_erb_file, #read_yaml_file, #rm_fr, #run, #run_and_capture, #run_and_exit, #run_and_fork, #try, #write_file
Methods included from LoggingModule
Methods inherited from SubCommandBase
Constructor Details
#initialize(args = [], local_options = {}, configuration = {}) ⇒ InitPacker
Define templates rubocop:disable Metrics/MethodLength
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/takeltau/init/packer/cli.rb', line 20 def initialize(args = [], = {}, configuration = {}) # initialize thor parent class super @gitignore = { name: '.gitignore', template: '../templates/gitignore.tt' } @groupvarsprojectyml = { name: 'ansible/group_vars/all/project.yml', template: 'templates/groupvarsprojectyml.tt' } @hgclone = { name: 'hgclone', template: 'templates/hgclone.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_root ⇒ Object
Provide template path for Thor:Actions
52 53 54 |
# File 'lib/takeltau/init/packer/cli.rb', line 52 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#docker ⇒ Object
Initialize packer project [NAME] for docker images.
64 65 66 |
# File 'lib/takeltau/init/packer/cli.rb', line 64 def docker exit init_packer_docker end |