diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2021-01-06 21:01:33 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2021-01-06 21:01:33 +0100 |
commit | ede2372547db659e7b0e9cfd3b531ff542018229 (patch) | |
tree | 433dcb7d2bf84c6cc0ee30d92c32c6220dc53641 /module/ri-engine/src/main/resources | |
parent | 149cf9efadb1da64b9ee716ac9bee1ac0c0e1329 (diff) | |
download | rules-sandbox-ede2372547db659e7b0e9cfd3b531ff542018229.tar.gz rules-sandbox-ede2372547db659e7b0e9cfd3b531ff542018229.tar.bz2 rules-sandbox-ede2372547db659e7b0e9cfd3b531ff542018229.tar.xz rules-sandbox-ede2372547db659e7b0e9cfd3b531ff542018229.zip |
Generating Wireguard files too.
Diffstat (limited to 'module/ri-engine/src/main/resources')
-rw-r--r-- | module/ri-engine/src/main/resources/META-INF/kmodule.xml | 7 | ||||
-rw-r--r-- | module/ri-engine/src/main/resources/io/trygvis/rules/engine/init.drl (renamed from module/ri-engine/src/main/resources/io/trygvis/rules/engine/default.drl) | 5 |
2 files changed, 8 insertions, 4 deletions
diff --git a/module/ri-engine/src/main/resources/META-INF/kmodule.xml b/module/ri-engine/src/main/resources/META-INF/kmodule.xml index ffba357..79c5e79 100644 --- a/module/ri-engine/src/main/resources/META-INF/kmodule.xml +++ b/module/ri-engine/src/main/resources/META-INF/kmodule.xml @@ -3,6 +3,9 @@ xmlns="http://www.drools.org/xsd/kmodule" xsi:schemaLocation="http://www.drools.org/xsd/kmodule https://www.drools.org/xsd/kmodule_7_1.xsd"> - <kbase name="engine" packages="io.trygvis.rules.dba,io.trygvis.rules.engine,io.trygvis.rules.machine,io.trygvis.rules.terraform"> - </kbase> + <kbase name="all" packages="io.trygvis.rules.*"/> + <kbase name="engine" packages="io.trygvis.rules.engine"/> + <kbase name="dba" packages="io.trygvis.rules.dba"/> + <kbase name="machine" packages="io.trygvis.rules.machine"/> + <kbase name="terraform" packages="io.trygvis.rules.terraform"/> </kmodule> diff --git a/module/ri-engine/src/main/resources/io/trygvis/rules/engine/default.drl b/module/ri-engine/src/main/resources/io/trygvis/rules/engine/init.drl index a933bd9..267cc4a 100644 --- a/module/ri-engine/src/main/resources/io/trygvis/rules/engine/default.drl +++ b/module/ri-engine/src/main/resources/io/trygvis/rules/engine/init.drl @@ -5,12 +5,13 @@ import org.apache.commons.io.FileSystem import org.apache.commons.io.FileUtils import java.io.File +global io.trygvis.rules.engine.TemplateEngine te; + rule "Clean directories" agenda-group "init" when not(KeyValue(key == "rm-gen")); then - System.out.println("Cleaning gen!"); - FileUtils.deleteDirectory(new File("gen")); + te.clean(); insert(new KeyValue("rm-gen", null)); end |