From b78aee2026dfc34e78ac7346fb345e0652b62018 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sat, 7 Nov 2020 13:01:28 +0900 Subject: [PATCH] Deploy the `/etc/multppath.conf` not to output the error message. --- cookbooks/base/default.rb | 15 +++++++++++++++ cookbooks/base/files/etc/multipath.conf | 6 ++++++ 2 files changed, 21 insertions(+) create mode 100644 cookbooks/base/files/etc/multipath.conf diff --git a/cookbooks/base/default.rb b/cookbooks/base/default.rb index 5b904d1..7c1175a 100644 --- a/cookbooks/base/default.rb +++ b/cookbooks/base/default.rb @@ -72,6 +72,21 @@ if node['platform_version'].to_f == 16.04 include_recipe './unnecessary.rb' end +# recipes for Ubuntu 20.04 +if node['platform_version'].to_f == 20.04 + remote_file '/etc/multipath.conf' do + owner 'root' + group 'root' + mode '0644' + + notifies :restart, 'service[multipath-tools]' + end + + service 'multipath-tools' do + action :nothing + end +end + # AWS EC2 Swap Setting: if node['is_ec2'] include_recipe './aws_ec2.rb' diff --git a/cookbooks/base/files/etc/multipath.conf b/cookbooks/base/files/etc/multipath.conf new file mode 100644 index 0000000..ebb713e --- /dev/null +++ b/cookbooks/base/files/etc/multipath.conf @@ -0,0 +1,6 @@ +defaults { + user_friendly_names yes +} +blacklist { + devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st|sda)[0-9]*" +}