Module: ChefWorkstationInitialize::SelfBootstrap::WithChef::WorkstationHelpers
- Includes:
- UsersHelpers
- Included in:
- WorkstationResourceHelpers
- Defined in:
- lib/selfbootstrap/withchef/workstation.rb
Instance Attribute Summary
Attributes included from NoChef::SelfBootstrapHelpers
Attributes included from NoChef::WorkstationHelpers
Instance Method Summary collapse
- #auto_repo(auto_repo_action = nil, auto_repo_compile_time = false) ⇒ Object
- #node_infra_chef ⇒ Object
Methods included from UsersHelpers
#create_group, #create_user, #generate_secret, #generate_user_data, #set_cookbook_user_secret_key
Methods included from ChefRepoHelpers
#define_cron_job, #render_template
Methods included from ChefHelpers
#generate_databag, #generate_secret_databag, #get_databag
Methods included from GitHelpers
#get_git_server, #get_git_submodule
Methods included from CommandlineHelpers
Methods included from DefaultMethodsHelpers
Methods included from NoChef::SelfBootstrapHelpers
#boostrapp_once, #boostrapped?, #bootstrap_self, #bootstrap_self_command, #chef_client_self_bootstrap_cmd, #chef_solo_options, #chef_solo_options_command, #chef_solo_options_encode, #for_search_local_node?, #for_solo?, #install_this_gem, #is_boostrapping?, #is_self_bootsrapping?, #is_solo?, #remove_bootstrap_file, #restart_bootstrap, #run_as_root?, #set_chef_profile, #skip_boostrap?, #solo_options, #unauthorized_to_boostrap?
Methods included from NoChef::WorkstationResourceHelpers
#default_workstation_data, #get_workstation, #set_workstation_data, #set_workstation_resource, #swap_workstation, #workstation_resource, #workstation_resource_keys
Methods included from NoChef::WorkstationHelpers
#bootstrapping_progress_file, #change_unix_permission, #create_main_generator, #main_generator_name, #new_cookbook_name, #prepare_new_resource, #project_name, #workstation_acl_path, #workstation_berks_vendor_dir, #workstation_cache_dir, #workstation_cache_options_syntaxe_path, #workstation_cache_path, #workstation_checksum_path, #workstation_chef_environments_dir, #workstation_chef_repo_path, #workstation_client_d_dir, #workstation_client_key_path, #workstation_client_path, #workstation_config_d_dir, #workstation_config_dir, #workstation_container_path, #workstation_cookbook_artifact_path, #workstation_cookbooks_dir, #workstation_data_bags_dir, #workstation_download_dir, #workstation_file, #workstation_file_backup_path, #workstation_file_cache_path, #workstation_generators_dir, #workstation_group_path, #workstation_libraries_dir, #workstation_logs_dir, #workstation_nodes_dir, #workstation_ohai_segment_plugin_path, #workstation_policy_dir, #workstation_policy_files_dir, #workstation_policy_group_dir, #workstation_resources_dir, #workstation_roles_dir, #workstation_scripts_dir, #workstation_solo_d_dir, #workstation_syntax_check_cache_path, #workstation_trusted_certs_dir, #workstation_user_path
Methods included from NoChef::UsersHelpers
#create_group, #create_user, #generate_secret, #generate_ssh_user_key, #generate_user_data, #secretdatabag, #secretdatabagitem, #secretdatabagkey, #set_cookbook_user_secret_key, #user_fully_created?, #userdatabag
Methods included from NoChef::UpdateHelpers
Methods included from NoChef::KnifeHelpers
#get_solo_cmd, #is_knife?, #knife, #knife_get_node_attribute, #knife_search_self_cmd, #knife_self_bootstrap_cmd, #self_bootstrap_options
Methods included from NoChef::ChefRepoHelpers
#create_attribute_file, #create_chef_additionnal_dir, #create_chef_infra_cookbook, #create_cookbook, #create_generator, #create_recipe, #create_template_file, #define_cron_job, #ensure_main_environment, #project_environment_json, #project_role_json, #render_template, #write_Solo_file, #write_kitchen_file, #write_main_environment, #write_main_role, #write_main_role_environment, #write_role_environment
Methods included from NoChef::KitchenHelpers
#building_kitchen, #generate_kitchen, #generate_machine, #is_kitchen_command?, #kitchen, #kitchen_machine, #kitchen_root
Methods included from NoChef::ProvisionersHelpers
#chef_zero_provisioner, #provisioners
Methods included from NoChef::PlatformsHelpers
Methods included from NoChef::SuitesHelpers
Methods included from NoChef::VerifiersHelpers
Methods included from NoChef::ChefHelpers
#chef, #chef_client, #install_chef_workstation, #is_chef_cli_command?, #is_chef_client_command?, #is_chef_command?, #is_chef_enabled?, #is_chef_installed?, #is_chef_profile_set?, #is_chefworkstation_available?, #is_knife_gem_install?
Methods included from NoChef::BerksHelpers
#berks, #berks_vendor, #berks_vendor_all_cookbook, #berks_vendor_cookbook, #berks_vendor_init, #delete_all_berkslock, #delete_cookbook_berkslock, #reset_berks_vendor_dir, #self_berks_vendor
Methods included from NoChef::GitHelpers
#all_cookbooks, #generate_git_submodules, #generate_json_repo, #get_git_path, #get_git_relative_path, #get_git_server, #get_git_submodule, #get_self_git, #git_exec, #git_submodule_init, #repository_list
Methods included from NoChef::SSHHelpers
#delete_hostkey, #delete_hostkey_ip_or_name, #generate_private_key, #ssh, #ssh_command, #ssh_keygen
Methods included from NoChef::CommandlineHelpers
#base_command, #get_homedir, #is_mixlib_disabled?, #main_command, #run_options
Methods included from NoChef::DefaultMethodsHelpers
#analyse_object, #check_install_dir, #debug_worklog, #default_chefzero_portrange, #default_hostname, #default_install_dir, #define_resource_requirements, #error_worklog, #generate_default_install_dir, #generate_directory, #get_out_of_cache_path, #get_out_of_folder, #get_out_of_local_chef_path, #get_path, #is_chef_constant_enabled?, #parent_nil?, #require_implement_method, #search_local_project_folder, #warning_worklog, #worklog, #worklog_counter
Instance Method Details
#auto_repo(auto_repo_action = nil, auto_repo_compile_time = false) ⇒ Object
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/selfbootstrap/withchef/workstation.rb', line 20 def auto_repo(auto_repo_action = nil, auto_repo_compile_time = false) auto_chef_repo workstation_resource[:project_name] do extend DefaultValuesHelpers install_dir workstation_resource[:install_dir] unless workstation_resource[:install_dir].nil? project_name workstation_resource[:project_name] unless workstation_resource[:project_name].nil? project_description workstation_resource[:project_description] unless workstation_resource[:project_description].nil? environments workstation_resource[:environments] unless workstation_resource[:environments].nil? initial_command workstation_resource[:initial_command] unless workstation_resource[:initial_command].nil? cron_chef_solo_command workstation_resource[:cron_chef_solo_command] unless workstation_resource[:cron_chef_solo_command].nil? chef_boostrapped workstation_resource[:chef_boostrapped] unless workstation_resource[:chef_boostrapped].nil? environment workstation_resource[:environment] unless workstation_resource[:environment].nil? user workstation_resource[:user] unless workstation_resource[:user].nil? group workstation_resource[:group] unless workstation_resource[:group].nil? home workstation_resource[:home] unless workstation_resource[:home].nil? run_for_type workstation_resource[:run_for_type] unless workstation_resource[:run_for_type].nil? gitinfo workstation_resource[:gitinfo] unless workstation_resource[:gitinfo].nil? cron workstation_resource[:cron] unless workstation_resource[:cron].nil? provisioners workstation_resource[:provisioners] unless workstation_resource[:provisioners].nil? verifiers workstation_resource[:verifiers] unless workstation_resource[:verifiers].nil? platforms workstation_resource[:platforms] unless workstation_resource[:platforms].nil? suites workstation_resource[:suites] unless workstation_resource[:suites].nil? default_attributes workstation_resource[:default_attributes] unless workstation_resource[:default_attributes].nil? override_attributes workstation_resource[:override_attributes] unless workstation_resource[:override_attributes].nil? action auto_repo_action unless auto_repo_action.nil? compile_time auto_repo_compile_time optional_actions yield if block_given? # infra:, end end |
#node_infra_chef ⇒ Object
50 51 52 53 54 55 |
# File 'lib/selfbootstrap/withchef/workstation.rb', line 50 def node_infra_chef if parent_nil?(node, 'infra_chef', 'project_name') node.override['infra_chef']['project_name'] = cookbook_name node.override['infra_chef']['install_dir'] = workstation_chef_repo_path end end |