Skip to content
Browse files

COOK-820, guard applicable calls with check for chef-solo

  • Loading branch information...
1 parent b69d81a commit 2ade5943ff6cdfa9ebb8e4a3072ebf56acc3311d @jtimberman jtimberman committed Nov 10, 2011
Showing with 11 additions and 8 deletions.
  1. +1 −1 drbd/recipes/default.rb
  2. +3 −2 sql_server/recipes/server.rb
  3. +7 −5 wordpress/recipes/default.rb
2 drbd/recipes/default.rb
@@ -18,7 +18,7 @@
# limitations under the License.
#prime the search to avoid 2 masters unless Chef::Config[:solo]
package "drbd8-utils" do
action :install
5 sql_server/recipes/server.rb
@@ -24,7 +24,8 @@
# generate and set a password for the 'sa' super user
node.set_unless['sql_server']['server_sa_password'] = secure_password # force a save so we don't lose our generated password on a failed chef run
+# force a save so we don't lose our generated password on a failed chef run unless Chef::Config[:solo]
config_file_path = win_friendly_path(File.join(Chef::Config[:file_cache_path], "ConfigurationFile.ini"))
@@ -71,4 +72,4 @@
notifies :restart, "service[#{service_name}]", :immediately
-include_recipe 'sql_server::client'
+include_recipe 'sql_server::client'
12 wordpress/recipes/default.rb
@@ -80,15 +80,17 @@
m ="localhost", "root", node['mysql']['server_root_password'])
- notifies :create, "ruby_block[save node data]", :immediately
+ notifies :create, "ruby_block[save node data]", :immediately unless Chef::Config[:solo]
# save node data after writing the MYSQL root password, so that a failed chef-client run that gets this far doesn't cause an unknown password to get applied to the box without being saved in the node data.
-ruby_block "save node data" do
- block do
+unless Chef::Config[:solo]
+ ruby_block "save node data" do
+ block do
+ end
+ action :create
- action :create
log "Navigate to 'http://#{server_fqdn}/wp-admin/install.php' to complete wordpress installation" do

0 comments on commit 2ade594

Please sign in to comment.
Something went wrong with that request. Please try again.