From 6b41dca31f1a035ca9e88e4c23fcb6aebb13b44d Mon Sep 17 00:00:00 2001 From: Sergei Semenov Date: Wed, 8 Nov 2023 17:02:26 +0300 Subject: [PATCH 1/2] change part of the code for uzing aws_cli_v2 --- manifests/init.pp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index af5f17b4..048326d3 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -59,24 +59,24 @@ # Using bundled install option: # http://docs.aws.amazon.com/cli/latest/userguide/installing.html#install-bundle-other-os - file { '/opt/awscli-bundle': + file { '/opt/aws': ensure => 'directory', } - archive { 'awscli-bundle.zip': + archive { 'awscli-exe-linux-x86_64.zip': ensure => present, - path => '/opt/awscli-bundle/awscli-bundle.zip', - source => 'https://s3.amazonaws.com/aws-cli/awscli-bundle.zip', + path => '/opt/aws/awscli-exe-linux-x86_64.zip', + source => 'https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip', extract => true, extract_path => '/opt', - creates => '/opt/awscli-bundle/install', + creates => '/opt/aws/install', cleanup => true, } exec { 'install_aws_cli': - command => '/opt/awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws', + command => '/opt/aws/install -i /usr/local/aws-cli -b /usr/local/bin', refreshonly => true, - subscribe => Archive['awscli-bundle.zip'], + subscribe => Archive['awscli-exe-linux-x86_64.zip'], } } } From b0d255f892dc4e6e077341f7cc5dcf1c67a90da4 Mon Sep 17 00:00:00 2001 From: Sergei Semenov Date: Wed, 8 Nov 2023 17:25:44 +0300 Subject: [PATCH 2/2] fix archiveSpecs.erv --- spec/classes/archive_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/classes/archive_spec.rb b/spec/classes/archive_spec.rb index c1752edc..e1d113df 100644 --- a/spec/classes/archive_spec.rb +++ b/spec/classes/archive_spec.rb @@ -14,8 +14,8 @@ context 'default' do it { is_expected.not_to contain_package('7zip') } - it { is_expected.not_to contain_file('/opt/awscli-bundle') } - it { is_expected.not_to contain_archive('awscli-bundle.zip') } + it { is_expected.not_to contain_file('/opt/aws') } + it { is_expected.not_to contain_archive('awscli-exe-linux-x86_64.zip') } it { is_expected.not_to contain_exec('install_aws_cli') } it { is_expected.to compile.with_all_deps } it { is_expected.to contain_class('archive::params') } @@ -28,8 +28,8 @@ } end - it { is_expected.to contain_file('/opt/awscli-bundle') } - it { is_expected.to contain_archive('awscli-bundle.zip') } + it { is_expected.to contain_file('/opt/aws') } + it { is_expected.to contain_archive('awscli-exe-linux-x86_64.zip') } it { is_expected.to contain_exec('install_aws_cli') } end @@ -69,7 +69,7 @@ ) end - it { is_expected.not_to contain_archive('awscli-bundle.zip') } + it { is_expected.not_to contain_archive('awscli-exe-linux-x86_64.zip') } end context 'with 7zip msi package' do