summaryrefslogtreecommitdiff
path: root/module/acme
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2021-01-06 16:04:22 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2021-01-06 16:04:22 +0100
commit149cf9efadb1da64b9ee716ac9bee1ac0c0e1329 (patch)
tree4e4de8f953d1d3ae96911eb190c281476f08b363 /module/acme
parente84ef1adb8ff0d3b121ea12b2d3e15fa52eb2f00 (diff)
downloadrules-sandbox-149cf9efadb1da64b9ee716ac9bee1ac0c0e1329.tar.gz
rules-sandbox-149cf9efadb1da64b9ee716ac9bee1ac0c0e1329.tar.bz2
rules-sandbox-149cf9efadb1da64b9ee716ac9bee1ac0c0e1329.tar.xz
rules-sandbox-149cf9efadb1da64b9ee716ac9bee1ac0c0e1329.zip
Using agenda groups to sequence phases.
Diffstat (limited to 'module/acme')
-rw-r--r--module/acme/src/main/java/io/trygvis/acme/AcmeAppsMain.java7
-rw-r--r--module/acme/src/main/java/io/trygvis/acme/VpnMain.java7
2 files changed, 12 insertions, 2 deletions
diff --git a/module/acme/src/main/java/io/trygvis/acme/AcmeAppsMain.java b/module/acme/src/main/java/io/trygvis/acme/AcmeAppsMain.java
index f21ebc3..caab325 100644
--- a/module/acme/src/main/java/io/trygvis/acme/AcmeAppsMain.java
+++ b/module/acme/src/main/java/io/trygvis/acme/AcmeAppsMain.java
@@ -2,11 +2,16 @@ package io.trygvis.acme;
import io.trygvis.rules.engine.Engine;
+import java.io.File;
import java.io.IOException;
public class AcmeAppsMain {
public static void main(String[] args) throws IOException {
- try (var engine = new Engine("acme-apps", "acme.yaml")) {
+ try (var engine = new Engine(
+ "acme-apps",
+ "acme.yaml",
+ new File("acme-apps"),
+ new String[]{"init", "generate"})) {
engine.io.dump("acme/apps", engine.session.getFactHandles());
}
}
diff --git a/module/acme/src/main/java/io/trygvis/acme/VpnMain.java b/module/acme/src/main/java/io/trygvis/acme/VpnMain.java
index d6c8061..1859e2a 100644
--- a/module/acme/src/main/java/io/trygvis/acme/VpnMain.java
+++ b/module/acme/src/main/java/io/trygvis/acme/VpnMain.java
@@ -6,11 +6,16 @@ import io.trygvis.rules.machine.Machine;
import io.trygvis.rules.network.Ipv4Address;
import io.trygvis.rules.network.Ipv4Cidr;
+import java.io.File;
import java.io.IOException;
public class VpnMain {
public static void main(String[] args) throws IOException {
- try (var engine = new Engine("acme-wireguard", "acme.yaml")) {
+ try (var engine = new Engine(
+ "acme-wireguard",
+ "acme.yaml",
+ new File("acme-wireguard"),
+ new String[]{"init", "generate"})) {
engine.io.dump("acme/wireguard", engine.session.getFactHandles(), (Object o) ->
o.getClass().getName().contains("Wg")
|| o instanceof Machine