Create slist of installed packages without using classic arrays #5275
Unanswered
olehermanse
asked this question in
Q&A
Replies: 2 comments 2 replies
-
I was able to accomplish this without using classic associative arrays using https://docs.cfengine.com/docs/3.21/reference-functions-mapdata.html Here is a small example:
|
Beta Was this translation helpful? Give feedback.
2 replies
-
For real this time, I was able to accomplish this without using classic associative arrays using https://docs.cfengine.com/docs/3.21/reference-functions-maparray.html Here is a small example:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have the following policy:
(Needs to be run with masterfiles / standard lib for package module variables to exist).
Which works, converting the results from
packagesmatching()
into a simpleslist
of package names of installed packages.How can I achieve the same conversion without using a classic array? (Classic arrays have other quirks, like leaving behind variables when things change, i.e. when packages are uninstalled).
Beta Was this translation helpful? Give feedback.
All reactions