From ac2d1f9862ef1d569375f896aa130ea62982f552 Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Mon, 2 Dec 2013 17:26:48 +0000 Subject: [PATCH] Fix it so the radosgw_apache2 recipe is always included in runs. Only including it in the initial run doens't allow you to make changes later, and isn't idempotent. --- recipes/radosgw.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/radosgw.rb b/recipes/radosgw.rb index e438caa..1e86d18 100644 --- a/recipes/radosgw.rb +++ b/recipes/radosgw.rb @@ -43,11 +43,11 @@ include_recipe "ceph::conf" -unless File.exists?("/var/lib/ceph/radosgw/ceph-radosgw.#{node['hostname']}/done") - if node["ceph"]["radosgw"]["webserver_companion"] - include_recipe "ceph::radosgw_#{node["ceph"]["radosgw"]["webserver_companion"]}" - end +if node["ceph"]["radosgw"]["webserver_companion"] + include_recipe "ceph::radosgw_#{node["ceph"]["radosgw"]["webserver_companion"]}" +end +unless File.exists?("/var/lib/ceph/radosgw/ceph-radosgw.#{node['hostname']}/done") ruby_block "create rados gateway client key" do block do keyring = %x[ ceph auth get-or-create client.radosgw.#{node['hostname']} osd 'allow rwx' mon 'allow rw' --name mon. --key='#{node["ceph"]["monitor-secret"]}' ]