]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cookbooks.git/commitdiff
Fix rubocop
authorGuilhem Lettron <guilhem.lettron@gmail.com>
Fri, 2 May 2014 12:09:33 +0000 (14:09 +0200)
committerGuilhem Lettron <guilhem.lettron@gmail.com>
Fri, 2 May 2014 12:09:33 +0000 (14:09 +0200)
libraries/default.rb
providers/client.rb
recipes/mds.rb
recipes/mon.rb
recipes/osd.rb
recipes/radosgw.rb

index b6ddecd876eafe6918d4f52c9112f14bb63674bd..142b31475a3af2531be173378c82007d26d2d384 100644 (file)
@@ -31,7 +31,7 @@ end
 def find_node_ip_in_network(network, nodeish = nil)
   nodeish = node unless nodeish
   net = IPAddr.new(network)
-  nodeish['network']['interfaces'].each do |iface, addrs|
+  nodeish['network']['interfaces'].each do |_iface, addrs|
     addresses = addrs['addresses'] || []
     addresses.each do |ip, params|
       return ip_address_to_ceph_address(ip, params) if ip_address_in_network?(ip, params, net)
index e17636571006bbd3f58d700f5a2251027709e3bc..d2154d3868ce32c956be2c777c278a908bd8919e 100644 (file)
@@ -35,7 +35,7 @@ def load_current_resource
   @current_resource.as_keyring(@new_resource.as_keyring)
   @current_resource.keyname(@new_resource.keyname || "client.#{current_resource.name}.#{node['hostname']}")
   @current_resource.caps(get_caps(@current_resource.keyname))
-  default_filename = "/etc/ceph/ceph.client.#{@new_resource.name}.#{node['hostname']}.#{@new_resource.as_keyring ? "keyring" : "secret"}"
+  default_filename = "/etc/ceph/ceph.client.#{@new_resource.name}.#{node['hostname']}.#{@new_resource.as_keyring ? 'keyring' : 'secret'}"
   @current_resource.filename(@new_resource.filename || default_filename)
   @current_resource.key = get_key(@current_resource.keyname)
   @current_resource.caps_match = true if @current_resource.caps == @new_resource.caps
index 699c9384b1c2ac9b167747d828ce28231f226185..01111353d688754a9c6bd1953a4a400fa965a41a 100644 (file)
@@ -22,7 +22,7 @@ include_recipe 'ceph::conf'
 
 cluster = 'ceph'
 
-directory "/var/lib/ceph/mds/#{cluster}-#{node["hostname"]}" do
+directory "/var/lib/ceph/mds/#{cluster}-#{node['hostname']}" do
   owner 'root'
   group 'root'
   mode 00755
@@ -36,7 +36,7 @@ ceph_client 'mds' do
   filename "/var/lib/ceph/mds/#{cluster}-#{node['hostname']}/keyring"
 end
 
-file "/var/lib/ceph/mds/#{cluster}-#{node["hostname"]}/done" do
+file "/var/lib/ceph/mds/#{cluster}-#{node['hostname']}/done" do
   owner 'root'
   group 'root'
   mode 00644
@@ -50,7 +50,7 @@ when 'upstart'
 else
   filename = 'sysvinit'
 end
-file "/var/lib/ceph/mds/#{cluster}-#{node["hostname"]}/#{filename}" do
+file "/var/lib/ceph/mds/#{cluster}-#{node['hostname']}/#{filename}" do
   owner 'root'
   group 'root'
   mode 00644
index 489ddb37ec58740432b02d8ad2372a6456e04ea8..69dfb64c67dbc8262de3d631ce3479751aad4a7e 100644 (file)
@@ -29,7 +29,7 @@ directory '/var/run/ceph' do
   action :create
 end
 
-directory "/var/lib/ceph/mon/ceph-#{node["hostname"]}" do
+directory "/var/lib/ceph/mon/ceph-#{node['hostname']}" do
   owner 'root'
   group 'root'
   mode 00755
@@ -40,7 +40,7 @@ end
 # TODO: cluster name
 cluster = 'ceph'
 
-unless File.exist?("/var/lib/ceph/mon/ceph-#{node["hostname"]}/done")
+unless File.exist?("/var/lib/ceph/mon/ceph-#{node['hostname']}/done")
   keyring = "#{Chef::Config[:file_cache_path]}/#{cluster}-#{node['hostname']}.mon.keyring"
 
   if node['ceph']['encrypted_data_bags']
@@ -62,7 +62,7 @@ unless File.exist?("/var/lib/ceph/mon/ceph-#{node["hostname"]}/done")
   ruby_block 'finalise' do
     block do
       ['done', service_type].each do |ack|
-        ::File.open("/var/lib/ceph/mon/ceph-#{node["hostname"]}/#{ack}", 'w').close
+        ::File.open("/var/lib/ceph/mon/ceph-#{node['hostname']}/#{ack}", 'w').close
       end
     end
   end
index a0e8506d794cf54749c1e6d4bb3809b89cbdfedf..dd20e699f38be56684af259c871f01b6a6db02ad 100644 (file)
@@ -76,7 +76,7 @@ execute 'format as keyring' do
 end
 
 if crowbar?
-  node['crowbar']['disks'].each do |disk, data|
+  node['crowbar']['disks'].each do |disk, _data|
     execute "ceph-disk-prepare #{disk}" do
       command "ceph-disk-prepare /dev/#{disk}"
       only_if { node['crowbar']['disks'][disk]['usage'] == 'Storage' }
index c576b295c4f84866a3e0c9c2c53ac9a6f99a6093..4c86cc71fdec2a62869a6410a85f0fa4bd814083 100644 (file)
@@ -47,7 +47,7 @@ include_recipe 'ceph::conf'
 
 if !::File.exist?("/var/lib/ceph/radosgw/ceph-radosgw.#{node['hostname']}/done")
   if node['ceph']['radosgw']['webserver_companion']
-    include_recipe "ceph::radosgw_#{node["ceph"]["radosgw"]["webserver_companion"]}"
+    include_recipe "ceph::radosgw_#{node['ceph']['radosgw']['webserver_companion']}"
   end
 
   ceph_client 'radosgw' do