File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ Source26: 53-ec2-read-ahead-kb.rules
18
18
URL: https://github.com/aws/amazon-ec2-utils
19
19
BuildArch: noarch
20
20
Provides: ec2-utils = %{version }-%{release }
21
- Obsoletes: ec2-utils < 2.1
21
+ Obsoletes: ec2-utils < 2.2
22
22
Provides: ec2-metadata = %{version }-%{release }
23
- Obsoletes: ec2-metadata <= 0.1
23
+ Obsoletes: ec2-metadata <= 0.1.3
24
24
Requires: curl
25
25
Requires: python3
26
26
BuildRequires: python3-devel
@@ -76,9 +76,14 @@ rm -rf $RPM_BUILD_ROOT
76
76
77
77
%changelog
78
78
*
Thu Jan 18 2024 Keith Gable <[email protected] > -
2.2.0-1
79
+ - Corrected issue where an ec2-metadata error was written to stdout
79
80
- Change ec2nvme-nsid to use Bash string manipulation to improve
80
81
performance and reliability
81
82
83
+ *
Mon Jun 5 2023 Guillaume Delacour <[email protected] > -
2.2.0-1
84
+ - Add `--quiet` option to `ec2-metadata --help` output
85
+ - Add `-R`/`--region` option to `ec2-metadata` to discover the EC2 instance's region
86
+
82
87
*
Thu Apr 6 2023 Noah Meyerhans <[email protected] > -
2.1.0-1
83
88
- Add --quiet option to ec2-metadata
84
89
- Add --partition support to ec2-metadata
Original file line number Diff line number Diff line change 8
8
9
9
function print_help()
10
10
{
11
- echo " ec2-metadata v0.1.3
11
+ echo " ec2-metadata v0.1.4
12
12
Use to retrieve EC2 instance metadata from within a running EC2 instance.
13
13
e.g. to retrieve instance id: ec2-metadata -i
14
14
to retrieve ami id: ec2-metadata -a
@@ -53,7 +53,7 @@ function set_imds_token()
53
53
if [ -z " ${IMDS_TOKEN} " ]; then
54
54
IMDS_TOKEN=$( curl -s -f -X PUT -H " X-aws-ec2-metadata-token-ttl-seconds: 900" ${METADATA_BASEURL} /${METADATA_TOKEN_PATH} )
55
55
if [ " ${?} " -gt 0 ] || [ -z " ${IMDS_TOKEN} " ]; then
56
- echo ' [ERROR] Could not get IMDSv2 token. Instance Metadata might have been disabled or this is not an EC2 instance.'
56
+ echo ' [ERROR] Could not get IMDSv2 token. Instance Metadata might have been disabled or this is not an EC2 instance.' >&2
57
57
exit 1
58
58
fi
59
59
fi
You can’t perform that action at this time.
0 commit comments