Skip to content

Commit e659633

Browse files
author
Himani Deshpande
committed
Replacing creation of directories with chef resource
1 parent c914e55 commit e659633

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

cookbooks/aws-parallelcluster-platform/resources/enroot/partial/_enroot_common.rb

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
directory "#{node['cluster']['shared_dir']}/enroot" do
3737
owner node['cluster']['cluster_user']
3838
# group node['cluster']['cluster_user']
39-
# mode '0755'
39+
mode '1777'
4040
action :create
4141
end
4242

@@ -47,25 +47,22 @@
4747
action :create
4848
end
4949

50+
directory "/tmp/enroot/data" do
51+
mode '1777'
52+
action :create
53+
recursive true
54+
end
55+
5056
bash "Configure enroot" do
5157
user 'root'
5258
code <<-ENROOT_CONFIGURE
5359
set -e
5460
ENROOT_CONFIG_RELEASE=pyxis
5561
SHARED_DIR=#{node['cluster']['shared_dir']}
56-
NONROOT_USER=#{node['cluster']['cluster_user']}
5762
5863
ENROOT_CACHE_PATH=${SHARED_DIR}/enroot envsubst < /tmp/enroot.template.conf > /tmp/enroot.conf
5964
mv /tmp/enroot.conf /etc/enroot/enroot.conf
6065
chmod 0644 /etc/enroot/enroot.conf
61-
62-
mkdir -p /tmp/enroot
63-
chmod 1777 /tmp/enroot
64-
mkdir -p /tmp/enroot/data
65-
chmod 1777 /tmp/enroot/data
66-
67-
chmod 1777 ${SHARED_DIR}/enroot
68-
6966
ENROOT_CONFIGURE
7067
retries 3
7168
retry_delay 5

0 commit comments

Comments
 (0)