Kind of working workflows...

This commit is contained in:
Ray Miller 2025-06-28 18:12:49 +01:00
parent c1cb9aa3db
commit 17abb6019c
Signed by: ray
GPG key ID: 043F786C4CD681B8
8 changed files with 213 additions and 132 deletions

View file

@ -1,11 +1,11 @@
(use-modules
(ordo blueprint)
(ordo core)
((ordo action filesystem) #:prefix fs:)
((ordo action quadlet) #:prefix quadlet:)
((ordo action systemctl) #:prefix systemctl:))
(define* (install-forgejo #:key (version "11"))
"Create a blueprint to install Forgejo on a CoreOS system"
(blueprint (format #f "Install forgejo version ~a" version)
(task "Install configuration directory"
#:action fs:install-dir

View file

@ -2,22 +2,22 @@
(ordo inventory))
(list
(host #:name "little-rascal"
#:connection (local-connection)
(host #:name "root@little-rascal"
#:connection (local-connection #:become? #t)
#:tags '(#:linux #:guix))
(host #:name "limiting-factor"
#:connection (ssh-connection "limiting-factor" #:user "core")
(host #:name "root@limiting-factor"
#:connection (ssh-connection #:host "limiting-factor" #:user "core" #:become? #t)
#:tags '(#:linux #:coreos))
(host #:name "screw-loose"
#:connection (ssh-connection "screw-loose" #:user "core")
(host #:name "root@screw-loose"
#:connection (ssh-connection #:host "screw-loose" #:user "core" #:become? #t)
#:tags '(#:linux #:coreos))
(host #:name "control-surface"
#:connection (ssh-connection "control-surface" #:user "ray")
(host #:name "root@control-surface"
#:connection (ssh-connection #:host "control-surface" #:user "ray" #:become? #t)
#:tags '(#:linux #:debian))
(host #:name "cargo-cult"
#:connection (ssh-connection "cargo-cult" #:user "ray")
(host #:name "root@cargo-cult"
#:connection (ssh-connection #:host "cargo-cult" #:user "ray" #:become? #t)
#:tags '(#:linux #:synology)))

12
examples/uptime.scm Normal file
View file

@ -0,0 +1,12 @@
(use-modules (ordo core)
(ordo inventory)
(ordo connection)
(ordo logger)
(srfi srfi-26))
(define uptime (task #:name "uptime" #:action (cut remote-cmd <> "uptime" #:return car)))
(define flow (workflow
(step #:action uptime #:target "root@limiting-factor" #:continue-on-err? #t)))
(define resolver (load-inventory "examples/inventory.scm"))