From 09610d64315ce3194f509f69cab01c55bd61509f Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Tue, 16 Jan 2024 16:22:42 +0100 Subject: move examples --- example/test/actions.yml | 14 ++++++++++++++ example/test/endpoints.yml | 21 +++++++++++++++++++++ example/test/triggers.yml | 10 ++++++++++ 3 files changed, 45 insertions(+) create mode 100644 example/test/actions.yml create mode 100644 example/test/endpoints.yml create mode 100644 example/test/triggers.yml (limited to 'example/test') diff --git a/example/test/actions.yml b/example/test/actions.yml new file mode 100644 index 0000000..caf6e70 --- /dev/null +++ b/example/test/actions.yml @@ -0,0 +1,14 @@ +--- +send-hello: + trigger: + - conditional: + interval: 30 + when: + - host1.user.jonas > 0 + - True + then: + - host1.notify: + msg: Hello + - host1.notify: + msg: World! + - host1.wol: {} diff --git a/example/test/endpoints.yml b/example/test/endpoints.yml new file mode 100644 index 0000000..e52cd70 --- /dev/null +++ b/example/test/endpoints.yml @@ -0,0 +1,21 @@ +host1: + info: + hostname: 'localhost' + mac: 90:1b:0e:4a:d8:1b + transports: + ssh: + class: automato.transport.SshTransport + hostname: 'localhost' + username: 'jonas' + allow_agent: True + commands: + notify: + class: automato.command.NotifyCommand + transport: ssh + wol: + class: automato.command.WakeOnLanCommand + states: + user: + class: automato.state.UserSessionState + transport: ssh + ttl: 30 diff --git a/example/test/triggers.yml b/example/test/triggers.yml new file mode 100644 index 0000000..b1b38c7 --- /dev/null +++ b/example/test/triggers.yml @@ -0,0 +1,10 @@ +conditional: + class: automato.trigger.ConditionalTrigger + +#mqtt: +# class: trigger.Mqtt +# server: asdf +# user: OwO +# +#timer: +# class: trigger.Timer -- cgit v1.2.3