Skip to content

Commit 8877078

Browse files
committed
Added check for aws ec2 metadata content to make CI more reliable
Ticket: ENT-6115 Changelog: none
1 parent 83c4e0c commit 8877078

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

inventory/any.cf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ bundle agent cfe_autorun_inventory_aws_ec2_metadata_cache
607607
create => "true",
608608
edit_line => lines_present( "$(response[content])" ),
609609
edit_defaults => empty,
610-
if => isvariable( response );
610+
if => regcmp( ".*", "$(response[content][version])" );
611611

612612
@if minimum_version(3.11)
613613
# template_method inline_mustache introduced in 3.11
@@ -617,7 +617,7 @@ bundle agent cfe_autorun_inventory_aws_ec2_metadata_cache
617617
edit_template_string => "{{{content}}}",
618618
template_data => @(response),
619619
create => "true",
620-
if => isvariable( response );
620+
if => regcmp( ".*", "$(response[content][version])" );
621621
@endif
622622
}
623623

0 commit comments

Comments
 (0)