How can I use or with a classes type promise where an element is negated with not().
It's not currently possible to use not() directly within an or classes promise since it returns a string and not boolean.
|
|
Running the policy results in a syntax error
error: Function does not return the required type "missing" or => { not( fileexists( $(f) ) ) }; ^ error: There are syntax errors in policy files
Since the string returned by not() is any
, if it evaluates to false and
!any
if it evaluates to true we can use classify() to see if the result
matches a currently defined class.
|
|
Now the policy works as expected.
R: /tmp/missing is missing