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
# | |
# Author:: Adam Jacob (<[email protected]>) | |
# Copyright:: Copyright (c) 2011 Opscode, Inc. | |
# License:: Apache License, Version 2.0 | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
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
export PROMPT='[%n@%M]%(?,,(%?%))$(git_prompt_info)%# ' | |
export RPROMPT=' %~' | |
ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg_bold[green]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})" | |
ZSH_THEME_GIT_PROMPT_DIRTY="*" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" |
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 > var = node.default[:var] | |
=> #<Chef::Node::Attribute @normal={...}, @current_normal=nil, @default={...}, @current_default={}, @override={...}, @current_override=nil, @automatic={...}, @current_automatic=nil, @current_nesting_level=[:var], @auto_vivifiy_on_read=true, @set_unless_value_present=false, @set_type=:default, @has_been_read=false> | |
chef > var[:a] = 'a' | |
=> "a" | |
chef > var[:b][:c] = 'c' | |
=> "c" | |
chef > node.default[:var] | |
=> #<Chef::Node::Attribute @normal={...}, @current_normal=nil, @default={...}, @current_default={"a"=>"a", "b"=>{"c"=>"c"}}, override{....}, current_overridenil, automatic{....}, current_automaticnil, current_nesting_level[:var], auto_vivifiy_on_readtrue, set_unless_value_presentfalse, set_type:default, has_been_readfalse | |
chef > node.default[:var].to_hash | |
=> {"a"=>"a", "b"=>{"c"=>"c"}} |
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
asdf /* this is at the end */ | |
asdf /**/ | |
as | |
dfa | |
sdf | |
as | |
df | |
(fs) |
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
Version 2.0, January 2004 | |
http://www.apache.org/licenses/ | |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | |
1. Definitions. | |
"License" shall mean the terms and conditions for use, reproduction, | |
and distribution as defined by Sections 1 through 9 of this document. |
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
Apache License | |
Version 2.0, January 2004 | |
http://www.apache.org/licenses/ | |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | |
1. Definitions. | |
"License" shall mean the terms and conditions for use, reproduction, |
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
class Chef | |
class Provider | |
class File | |
class Copy << Chef::Provider::File | |
def compare_content | |
checksum(@current_resource.path) == checksum(@new_resource.content) | |
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
begin | |
r = resources(:template => "/tmp/yourthing") | |
rescue Chef::Exceptions::ResourceNotFound => e | |
r = template "/tmp/yourthing" do | |
variables { :your_defaults => ... } | |
end | |
end | |
r.variables[:your_stuff] = "here" |
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
Provider ----- | |
action :install do | |
git "/opt/tumult/src" do | |
repository "[email protected]:pyronicide/foo.git" | |
revision "#{node["branch"]}" | |
ssh_wrapper "/opt/glue/bin/deploy_user.sh" | |
depth 5 | |
action :sync | |
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
require 'chef/platform' | |
redhat_providers = Chef::Platform.platforms[:redhat][:default] | |
Chef::Platform.platforms[:cloudlinux] = { :default => redhat_providers } |