Skip to content

Commit 2a93ed0

Browse files
authored
Merge pull request #3402 from victormlg/CFE-4019-getbundlemetatags-docs
Added getbundlemetatags policy function
2 parents f17695b + 198037d commit 2a93ed0

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
layout: default
3+
title: getbundlemetatags
4+
published: true
5+
---
6+
7+
[%CFEngine_function_prototype(bundlename, optional_tag)%]
8+
9+
**Description:** Returns the list of [`meta`][Promise types#meta] tags for bundle `bundlename`.
10+
11+
[%CFEngine_function_attributes(bundlename, optional_tag)%]
12+
13+
The `optional_tag` can be used to look up a specific tag's value. If you have
14+
```
15+
bundle agent example
16+
{
17+
meta:
18+
"tags"
19+
slist => { "mykey=myvalue1", "mykey=myvalue2", "yourkey=yourvalue1" };
20+
}
21+
```
22+
then `getbundlemetatags( "example", "mykey" )` will return a list with two entries, `{ "myvalue1",
23+
"myvalue2" }`.
24+
25+
**Example:**
26+
27+
[%CFEngine_include_snippet(getbundlemetatags.cf, #\+begin_src cfengine3, .*end_src)%]
28+
29+
Output:
30+
31+
[%CFEngine_include_snippet(getbundlemetatags.cf, #\+begin_src\s+example_output\s*, .*end_src)%]
32+
33+
**Notes:**
34+
35+
**See also:** `getvariablemetatags()`, `getclassmetatags()`
36+
37+
**History:**
38+
39+
* Function added in 3.26.0.

0 commit comments

Comments
 (0)