Class HammerCLIImport::ImportCommand::ConfigFileImportCommand
In: lib/hammer_cli_import/configfile.rb
Parent: BaseCommand

Methods

Included Modules

Open3

Attributes

interview_questions  [RW] 

Public Instance methods

We‘re going to build a product-per-org, with a repo-per-channel and upload the built-puppet-module, one-per-repo

We‘re using the hammer-repository-upload subcommand to do this, because the direct-API-route is ‘touchy’ and repo-upload already does all the Right Stuff

puppet-module-names are username-classname usernames can only be alphanumeric classnames can only be alphanumeric and ‘_‘

If module ‘name’ has been generated, throw away it filesystem existence

For each module, write file-content to <module>/files or <module>/templates, and fill <module>/manifests/init.pp with appropriate metadata

Load the macro-mapping and interview-answers ONLY once-per-run

If we haven‘t seen this module-name before, arrange to do ‘puppet generate module’ for it

Create a puppet module-template on the filesystem, inside of working-directory

Store all files into a hash keyed by module-name

Return a mapped puppet-fact for a macro, if there is one Otherwise, leave the macro in place

[Validate]