skx / marionette

Something like puppet, for the localhost only.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider types - integers and booleans at least

skx opened this issue · comments

The http module allows a HTTP-status code to be matched, which looks odd as a string. Similarly file-permissions for the file module must currently be expressed as a string because we have no support for numeric types.

Additionally the shell module has a shell => "true" option, which could be a boolean. Although there's no obvious other place where that is used yet.

I think we should parse values as either strings or numbers. We don't necessarily need to make any changes to usage the "StringValue" can convert at run-time easily enough.

The conversion could happen in the parser, or later. But the end result would be that:

  "mode" => 0755

Or

"expect" => 200

Would be synonymous with "mode => "0755" or "expect => "200".

There's also force => "yes" in the docker module and update => "yes" in the package module which could also be booleans.

Good catch, thanks!