Autoloading json files

27 views
Skip to first unread message

Bas van der Vlies

unread,
Feb 6, 2018, 2:48:59 PM2/6/18
to help-cfengine

I had just an idea when travelling by train. In 3.12 we can specify which extra json files to load via the ‘auguments’ variable in def.json. What I propose is an autoloading feature for json files ala ‘autorun’ bundles.
When we enable autoload ison. Then all files that are place in, eg $(sys.inputdir)/json.d” will be automatically read in an merged. So we can easily override/set values without editing def.json, eg 
 * enabling autorun, place in ‘json.d/autorun.json”
{
   "classes" :
   {
    "services_autorun" : "any"
   }
}

It can be enabled by an extra command line option or by setting the class ‘json_autoload” , eg`-Djson_autoload”

So we can easily set classes and variables by dropping files in this directory without touching any config files.

--
Bas van der Vlies
| Operations, Support & Development | SURFsara | Science Park 140 | 1098 XG  Amsterdam
| T +31 (0) 20 800 1300  | bas.van...@surfsara.nl | www.surfsara.nl |




Nick Anderson

unread,
Mar 23, 2018, 9:13:11 AM3/23/18
to help-cfengine
Hey Bas,

Did you ever open an issue to track this discussion further?

Bas van der Vlies

unread,
Mar 23, 2018, 9:24:43 AM3/23/18
to Nick Anderson, help-cfengine
Nick,

 I only send it to the list.  Should I open a issue?


--
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to help-cfengin...@googlegroups.com.
To post to this group, send email to help-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/help-cfengine.
For more options, visit https://groups.google.com/d/optout.

Nick Anderson

unread,
Mar 23, 2018, 9:41:16 AM3/23/18
to help-cfengine
It seems like a feature worth discussing and having a record of users thoughts.


On Tuesday, February 6, 2018 at 1:48:59 PM UTC-6, Bas van der Vlies wrote:
Reply all
Reply to author
Forward
0 new messages