It's not clear to me how to run the Simple Example from the Open Policy Agent Playground from the CLI.
play.rego
package play
default hello = false
hello {
m := input.message
m == "world"
}
input.json
{
"message": "world"
}
I tried using:
opa eval -i input.json -d play.rego "data.play.hello"
But, I could not get this result
{
"hello": true
}
Unfortunately, I got this: :(
{
"result": [
{
"expressions": [
{
"value": true,
"text": "data.play.hello",
"location": {
"row": 1,
"col": 1
}
}
]
}
]
}
I thought others might find it useful to understand how to run these example from the CLI, so I had to ask.