Fixes and simplifications

* Move remote-cmd from connection to an action module.
* Inventory now populates a global variable instead of returning a list.
* Added a `describe` method to connections.
* Cleaned up execute/continue-on-error etc.
* Removed workflow class.
This commit is contained in:
Ray Miller 2025-07-05 16:29:59 +01:00
parent ae8c24aa63
commit 78beb037e7
Signed by: ray
GPG key ID: 043F786C4CD681B8
11 changed files with 84 additions and 83 deletions

View file

@ -1,15 +1,12 @@
(use-modules (ordo core)
(ordo inventory)
(ordo connection)
(ordo action remote-cmd)
(ordo logger)
(srfi srfi-26))
(define uptime (task #:name "uptime" #:action (cut remote-cmd <> "uptime" #:return car)))
(define flow (workflow
(execute uptime "limiting-factor" '(#:sudo #t))))
(define resolver (load-inventory "examples/inventory.scm"))
;; IDEA: have load-inventory! set an *inventory* parameter and remove the execute methods
;; that take a <host-resolver> argument, making this implicit.
;;(setup-logging! #:level 'DEBUG)
;;(load-inventory! "examples/inventory.scm")
;;(execute uptime 'all '())