Skip to content

Commit 85c89d5

Browse files
committed
Test
1 parent 1667d9a commit 85c89d5

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

cookbooks/aws-parallelcluster-platform/recipes/install/cookbook_virtualenv.rb

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,24 @@
3333
not_if { ::File.exist?("#{cookbook_virtualenv_path}/bin/activate") }
3434
end
3535

36-
remote_file "#{node['cluster']['base_dir']}/cookbook-dependencies.tgz" do
37-
source pypi_s3_uri
38-
mode '0644'
39-
retries 3
40-
retry_delay 5
41-
action :create_if_missing
42-
end
36+
if aws_region.start_with?("us-iso")
37+
remote_file "#{node['cluster']['base_dir']}/cookbook-dependencies.tgz" do
38+
source pypi_s3_uri
39+
mode '0644'
40+
retries 3
41+
retry_delay 5
42+
action :create_if_missing
43+
end
4344

44-
bash 'pip install' do
45-
user 'root'
46-
group 'root'
47-
cwd "#{node['cluster']['base_dir']}"
48-
code <<-REQ
45+
bash 'pip install' do
46+
user 'root'
47+
group 'root'
48+
cwd "#{node['cluster']['base_dir']}"
49+
code <<-REQ
4950
set -e
5051
tar xzf cookbook-dependencies.tgz
5152
cd #{dependency_package_name}
5253
#{virtualenv_path}/bin/pip install * -f ./ --no-index
5354
REQ
55+
end
5456
end

0 commit comments

Comments
 (0)