From 02a57ac8ca4682541f8339d99d43389de182b026 Mon Sep 17 00:00:00 2001 From: Elliott Davis Date: Thu, 15 Jan 2015 14:17:45 -0600 Subject: [PATCH] Moved _common to default. Moving _common.rb to default.rb makes this cookbook easier to include in other cookbooks. This also brings this cookbook back in line with its README. Moved _common_install.rb into default as it was only a one line include. --- README.md | 2 -- recipes/_common_install.rb | 1 - recipes/cephfs_install.rb | 2 +- recipes/{_common.rb => default.rb} | 3 ++- recipes/mds.rb | 3 +-- recipes/mds_install.rb | 2 +- recipes/mon.rb | 3 +-- recipes/mon_install.rb | 2 +- recipes/osd.rb | 3 +-- recipes/osd_install.rb | 2 +- recipes/radosgw.rb | 3 +-- recipes/radosgw_apache2.rb | 3 +-- recipes/radosgw_install.rb | 2 +- resources/cephfs.rb | 3 +-- 14 files changed, 13 insertions(+), 21 deletions(-) delete mode 100644 recipes/_common_install.rb rename recipes/{_common.rb => default.rb} (54%) diff --git a/README.md b/README.md index 8e311b6..a30cf86 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,6 @@ Ceph monitor nodes should use the ceph-mon role. Includes: * ceph::default -* ceph::conf ### Ceph Metadata Server @@ -84,7 +83,6 @@ Ceph OSD nodes should use the ceph-osd role Includes: * ceph::default -* ceph::conf ### Ceph Rados Gateway diff --git a/recipes/_common_install.rb b/recipes/_common_install.rb deleted file mode 100644 index 171a227..0000000 --- a/recipes/_common_install.rb +++ /dev/null @@ -1 +0,0 @@ -include_recipe 'ceph::repo' if node['ceph']['install_repo'] diff --git a/recipes/cephfs_install.rb b/recipes/cephfs_install.rb index f75147c..434e22b 100644 --- a/recipes/cephfs_install.rb +++ b/recipes/cephfs_install.rb @@ -1,4 +1,4 @@ -include_recipe 'ceph::_common_install' +include_recipe 'ceph' node['ceph']['cephfs']['packages'].each do |pck| package pck diff --git a/recipes/_common.rb b/recipes/default.rb similarity index 54% rename from recipes/_common.rb rename to recipes/default.rb index f738e65..936bc33 100644 --- a/recipes/_common.rb +++ b/recipes/default.rb @@ -1,4 +1,5 @@ -include_recipe 'ceph::_common_install' +include_recipe 'ceph::repo' if node['ceph']['install_repo'] +include_recipe 'ceph::conf' # Tools needed by cookbook node['ceph']['packages'].each do |pck| diff --git a/recipes/mds.rb b/recipes/mds.rb index 69ca3a5..aedff15 100644 --- a/recipes/mds.rb +++ b/recipes/mds.rb @@ -17,9 +17,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -include_recipe 'ceph::_common' +include_recipe 'ceph' include_recipe 'ceph::mds_install' -include_recipe 'ceph::conf' cluster = 'ceph' diff --git a/recipes/mds_install.rb b/recipes/mds_install.rb index 3ce533a..a04ee5a 100644 --- a/recipes/mds_install.rb +++ b/recipes/mds_install.rb @@ -1,4 +1,4 @@ -include_recipe 'ceph::_common_install' +include_recipe 'ceph' node['ceph']['mds']['packages'].each do |pck| package pck diff --git a/recipes/mon.rb b/recipes/mon.rb index 2a7ccb3..88ac880 100644 --- a/recipes/mon.rb +++ b/recipes/mon.rb @@ -16,9 +16,8 @@ node.default['ceph']['is_mon'] = true -include_recipe 'ceph::_common' +include_recipe 'ceph' include_recipe 'ceph::mon_install' -include_recipe 'ceph::conf' service_type = node['ceph']['mon']['init_style'] diff --git a/recipes/mon_install.rb b/recipes/mon_install.rb index 557ad4c..a125f35 100644 --- a/recipes/mon_install.rb +++ b/recipes/mon_install.rb @@ -1,4 +1,4 @@ -include_recipe 'ceph::_common_install' +include_recipe 'ceph' node['ceph']['mon']['packages'].each do |pck| package pck diff --git a/recipes/osd.rb b/recipes/osd.rb index fc2f9c6..a0ff278 100644 --- a/recipes/osd.rb +++ b/recipes/osd.rb @@ -31,9 +31,8 @@ # } # ] -include_recipe 'ceph::_common' +include_recipe 'ceph' include_recipe 'ceph::osd_install' -include_recipe 'ceph::conf' package 'gdisk' do action :upgrade diff --git a/recipes/osd_install.rb b/recipes/osd_install.rb index 21991ad..f368db3 100644 --- a/recipes/osd_install.rb +++ b/recipes/osd_install.rb @@ -1,4 +1,4 @@ -include_recipe 'ceph::_common_install' +include_recipe 'ceph' node['ceph']['osd']['packages'].each do |pck| package pck diff --git a/recipes/radosgw.rb b/recipes/radosgw.rb index 0a5bb0d..410b557 100644 --- a/recipes/radosgw.rb +++ b/recipes/radosgw.rb @@ -19,9 +19,8 @@ node.default['ceph']['is_radosgw'] = true -include_recipe 'ceph::_common' +include_recipe 'ceph' include_recipe 'ceph::radosgw_install' -include_recipe 'ceph::conf' directory '/var/log/radosgw' do owner node['apache']['user'] diff --git a/recipes/radosgw_apache2.rb b/recipes/radosgw_apache2.rb index 8b266c0..119b7eb 100644 --- a/recipes/radosgw_apache2.rb +++ b/recipes/radosgw_apache2.rb @@ -41,8 +41,7 @@ # end # end -include_recipe 'ceph::_common' -include_recipe 'ceph::_common_install' +include_recipe 'ceph' include_recipe 'ceph::radosgw_apache2_repo' node['ceph']['radosgw']['apache2']['packages'].each do |pck| diff --git a/recipes/radosgw_install.rb b/recipes/radosgw_install.rb index 7944d49..5dde1d7 100644 --- a/recipes/radosgw_install.rb +++ b/recipes/radosgw_install.rb @@ -1,4 +1,4 @@ -include_recipe 'ceph::_common_install' +include_recipe 'ceph' node['ceph']['radosgw']['packages'].each do |pck| package pck diff --git a/resources/cephfs.rb b/resources/cephfs.rb index 191d942..34e64f3 100644 --- a/resources/cephfs.rb +++ b/resources/cephfs.rb @@ -8,7 +8,6 @@ attribute :cephfs_subdir, :kind_of => String, :default => '/' def initialize(*args) super @action = :mount - @run_context.include_recipe 'ceph::_common' + @run_context.include_recipe 'ceph' @run_context.include_recipe 'ceph::cephfs_install' - @run_context.include_recipe 'ceph::conf' end -- 2.47.3