This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo Validation key written. | |
@echo on | |
> C:\chef\client.rb ( | |
echo.log_level :info | |
echo.log_location STDOUT | |
echo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
attribute: | |
default['ge_opsware_agent']['agent_dir'] = "/opt/opsware/stage/agent" | |
recipe: | |
directory node['ge_opsware_agent']['agent_dir'] do | |
owner "root" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include Windows::Helper from Opscode Windows Cookbook | |
::Chef::Recipe.send(:include, Windows::Helper) | |
# now you can call helper methods like win_friendly_path directly | |
my_batch_file = win_friendly_path( | |
::File.join( node['cookbook']['batch_dir'],'foo.bat')) | |
execute "My batch file" do | |
command my_batch_file | |
creates "e:/logs/my_batch_file.log" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if platform_family?("windows") | |
depends 'windows' | |
depends '7-zip' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Salims TK on windows host | |
C:\Users\vinyara\Documents\clients> cd .\ge_tk | |
C:\Users\vinyara\Documents\clients\ge_tk> git clone https://github.com/afiune/tk-windows | |
Cloning into 'tk-windows'... | |
remote: Counting objects: 39, done. | |
remote: Compressing objects: 100% (22/22), done. | |
remote: Total 39 (delta 6), reused 35 (delta 4) | |
Unpacking objects: 100% (39/39), done. | |
C:\Users\vinyara\Documents\clients\ge_tk> cd .\tk-windows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 puts node['ge_netbackup']['bpcd_start_command'] | |
57 service "bpcd" do | |
58 start_command node['ge_netbackup']['bpcd_start_command'] | |
59 action :start | |
60 end | |
12:43PM | |
> [#] Recipe: ge_netbackup::configure_linux | |
> [#] * service[bpcd] action start[2014-07-11T15:38:53-04:00] INFO: Processing service[bpcd] action start (ge_netbackup::configure_linux line 57) | |
> [#] | |
> [#] * service[bpcd]: unable to locate the init.d script! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'chef/provider' | |
require 'restclient' | |
class Chef | |
class Provider | |
class Artifact < Chef::Provider | |
def load_current_resource | |
@current_resource = Chef::Resource::Artifact.new(new_resource.name) | |
art_user = new_resource.user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Server = "VCENTER SERVER" | |
$datacenter = Get-Datacenter -Name "DATACENTER NAME" | |
$cluster = Get-Cluster -Name "CLUSTER NAME" -Location $datacenter | |
$TemplateName = "TEMPLATE NAME" | |
$Template = Get-Template -Name $TemplateName -Location $datacenter | |
$Datastore = Get-DatastoreCluster -Name "DATASTORE NAME" | |
$ResourcePool = Get-ResourcePool -Name "RESOURCE POOL NAME" -Location $cluster | |
$folder = "FOLDER NAME" | |
$vmname = "VM NAME" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chef:recipe > a = 'stuff' | |
chef:recipe > | |
chef:recipe > service 'testing_start' do | |
chef:recipe > action defined?(a) ? :start : :stop | |
chef:recipe ?> end | |
=> <service[testing_start] @name: "testing_start" @noop: nil @before: nil @params: {} @provider: nil @allowed_actions: [:nothing, :enable, :disable, :start, :stop, :restart, :reload] @action: [:start] @updated: false @updated_by_last_action: false @supports: {:restart=>false, :reload=>false, :status=>false} @ignore_failure: false @retries: 0 @retry_delay: 2 @source_line: "(irb#2):144:in `irb_binding'" @guard_interpreter: :default @elapsed_time: 0 @resource_name: :service @service_name: "testing_start" @enabled: nil @running: nil @parameters: nil @pattern: "testing_start" @start_command: nil @stop_command: nil @status_command: nil @restart_command: nil @reload_command: nil @init_command: nil @priority: nil @cookbook_name: nil @recipe_name: nil> | |
chef:recipe > | |
chef:recipe > | |
chef:recipe > d | |
' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chef:attributes > | |
chef:attributes > default['ge_registry_framework']['HKLM\Software\Policies\Microsoft\Windows\TCPIP\v6Transition'] = | |
chef:attributes > {:name => 'Force_Tuneling', :type => :multi_string, :data => 'Enabled'} | |
=> {:name=>"Force_Tuneling", :type=>:multi_string, :data=>"Enabled"} | |
chef:attributes > | |
chef:attributes > recipe_mode | |
chef:recipe > | |
chef:recipe > | |
chef:recipe > | |
chef:recipe > node['ge_registry_framework'].each do |k,v| |