Sha256: 0e903106ffd46c4320bf37218d48b52b93c70c720f343c8627e786a36e754067

Contents?: true

Size: 1.68 KB

Versions: 39

Compression:

Stored size: 1.68 KB

Contents

# frozen_string_literal: true

module Takeltau
  # takeltau init packer
  class InitPacker < SubCommandBase
    include Thor::Actions
    include LoggingModule
    include SystemModule
    include ConfigModule
    include ProjectModule
    include GitCheckClean
    include GitCheckWorkspace
    include InitLib
    include InitPackerDocker

    argument :name

    # Define templates
    # rubocop:disable Metrics/MethodLength
    def initialize(args = [], local_options = {}, 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
    # rubocop:enable Metrics/MethodLength

    # Provide template path for Thor:Actions
    def self.source_root
      File.dirname(__FILE__)
    end

    #
    # init packer docker
    #
    desc 'docker [NAME]', 'Initialize packer project [NAME] for docker images'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    Initialize packer project [NAME] for docker images
    LONGDESC
    # Initialize packer project [NAME] for docker images.
    def docker
      exit init_packer_docker
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
takeltau-0.46.9 lib/takeltau/init/packer/cli.rb
takeltau-0.46.8 lib/takeltau/init/packer/cli.rb
takeltau-0.46.5 lib/takeltau/init/packer/cli.rb
takeltau-0.46.1 lib/takeltau/init/packer/cli.rb
takeltau-0.46.0 lib/takeltau/init/packer/cli.rb
takeltau-0.45.27 lib/takeltau/init/packer/cli.rb
takeltau-0.45.26 lib/takeltau/init/packer/cli.rb
takeltau-0.45.24 lib/takeltau/init/packer/cli.rb
takeltau-0.45.23 lib/takeltau/init/packer/cli.rb
takeltau-0.45.22 lib/takeltau/init/packer/cli.rb
takeltau-0.45.21 lib/takeltau/init/packer/cli.rb
takeltau-0.45.19 lib/takeltau/init/packer/cli.rb
takeltau-0.45.17 lib/takeltau/init/packer/cli.rb
takeltau-0.45.16 lib/takeltau/init/packer/cli.rb
takeltau-0.45.14 lib/takeltau/init/packer/cli.rb
takeltau-0.45.13 lib/takeltau/init/packer/cli.rb
takeltau-0.45.12 lib/takeltau/init/packer/cli.rb
takeltau-0.45.11 lib/takeltau/init/packer/cli.rb
takeltau-0.45.10 lib/takeltau/init/packer/cli.rb
takeltau-0.45.9 lib/takeltau/init/packer/cli.rb