methods/pk_client.rb
# Create Preseed (Ubuntu and Debian) client
Create Preseed (Ubuntu and Debian) client
Create Preseed ( Ubuntu and Debian ) client
def create_packer_ps_install_files(options)
  output_file = options['clientdir']+"/packer/"+options['vm']+"/"+options['name']+"/"+options['name']+".cfg"
  check_dir_exists(options,options['clientdir'])
  delete_file(options,output_file)
  options = populate_ps_questions(options)
  process_questions(options)
  if !options['service'].to_s.match(/purity/)
    output_ps_header(options,output_file)
    output_file = options['clientdir']+"/packer/"+options['vm']+"/"+options['name']+"/"+options['name']+"_post.sh"
    post_list   = populate_ps_post_list(options)
    output_ks_post_list(options,post_list,output_file)
    output_file = options['clientdir']+"/packer/"+options['vm']+"/"+options['name']+"/"+options['name']+"_first_boot.sh"
    post_list   = populate_ps_first_boot_list(options)
    output_ks_post_list(options,post_list,output_file)
    print_contents_of_file(options,"",output_file)
    if options['livecd'] == true
      output_file = options['clientdir']+"/packer/"+options['vm']+"/"+options['name']+"/subiquity/http/user-data"
      user_data,exec_data = populate_packer_cc_user_data(options)
      delete_file(options,output_file)
      output_packer_cc_user_data(options,user_data,exec_data,output_file)
      output_file = options['clientdir']+"/packer/"+options['vm']+"/"+options['name']+"/subiquity/http/meta-data"
      FileUtils.touch(output_file)
    end
  end
  return options
end
def create_packer_ps_install_files ( options ) output_file = options [ 'clientdir' ] + "/packer/" + options [ 'vm' ] + "/" + options [ 'name' ] + "/" + options [ 'name' ] + ".cfg" check_dir_exists ( options , options [ 'clientdir' ] ) delete_file ( options , output_file ) options = populate_ps_questions ( options ) process_questions ( options ) if ! options [ 'service' ] . to_s . match ( / purity / ) output_ps_header ( options , output_file ) output_file = options [ 'clientdir' ] + "/packer/" + options [ 'vm' ] + "/" + options [ 'name' ] + "/" + options [ 'name' ] + "_post.sh" post_list = populate_ps_post_list ( options ) output_ks_post_list ( options , post_list , output_file ) output_file = options [ 'clientdir' ] + "/packer/" + options [ 'vm' ] + "/" + options [ 'name' ] + "/" + options [ 'name' ] + "_first_boot.sh" post_list = populate_ps_first_boot_list ( options ) output_ks_post_list ( options , post_list , output_file ) print_contents_of_file ( options , "" , output_file ) if options [ 'livecd' ] == true output_file = options [ 'clientdir' ] + "/packer/" + options [ 'vm' ] + "/" + options [ 'name' ] + "/subiquity/http/user-data" user_data , exec_data = populate_packer_cc_user_data ( options ) delete_file ( options , output_file ) output_packer_cc_user_data ( options , user_data , exec_data , output_file ) output_file = options [ 'clientdir' ] + "/packer/" + options [ 'vm' ] + "/" + options [ 'name' ] + "/subiquity/http/meta-data" FileUtils . touch ( output_file ) end end return options end
Create Preseed (Ubuntu and Debian) client
Create Preseed ( Ubuntu and Debian ) client
options
<not_specific>