Showing content from https://raw.github.com/cfengine/core/master/examples/reference_values_inside_data.cf below:
#!/var/cfengine/bin/cf-agent -f- #+begin_src cfengine3 bundle agent example_reference_values_inside_data { vars: "data" data => '{ "Key1": "Value1", "Key2": "Value2", "Key3": [ "Value3", "Value4" ] }'; reports: "Key1 contains '$(data[Key1])'"; "Key2 contains '$(data[Key2])'"; "Key3 iterates and contains '$(data[Key3])'"; } bundle agent __main__ { methods: "example_reference_values_inside_data"; } #+end_src ############################################################################### #+begin_src example_output #@ ``` #@ R: Key1 contains 'Value1' #@ R: Key2 contains 'Value2' #@ R: Key3 iterates and contains 'Value3' #@ R: Key3 iterates and contains 'Value4' #@ ``` #+end_src
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4