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:
parent
ae8c24aa63
commit
78beb037e7
11 changed files with 84 additions and 83 deletions
|
@ -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 '())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue