Update run to work with new syntax
This commit is contained in:
parent
69f50fbadb
commit
66a2a887fd
1 changed files with 7 additions and 6 deletions
|
@ -16,12 +16,13 @@ this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
|#
|
||||
|
||||
(define-module (ordo cli run)
|
||||
#:declarative? #f
|
||||
#:use-module (config)
|
||||
#:use-module (config api)
|
||||
#:use-module (ice-9 filesystem)
|
||||
#:use-module (ordo core)
|
||||
#:use-module (ordo inventory)
|
||||
#:use-module (ordo logger)
|
||||
#:use-module (ordo playbook)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-26)
|
||||
#:export (config handler))
|
||||
|
@ -57,12 +58,12 @@ this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
(arguments
|
||||
(list
|
||||
(argument
|
||||
(name 'playbook)
|
||||
(name 'workflow)
|
||||
(handler (cut expand-file-name <> #f #t))
|
||||
(example "examples/uptime.scm")
|
||||
(test file-exists?))))
|
||||
(synopsis "Run a playbook")))
|
||||
(synopsis "Run a workflow")))
|
||||
|
||||
(define (handler options)
|
||||
(let ((inventory (load-inventory (option-ref options 'inventory)))
|
||||
(playbook (load-playbook (option-ref options '(playbook)))))
|
||||
(run-playbook playbook inventory)))
|
||||
(load-inventory! (option-ref options 'inventory))
|
||||
(load (option-ref options '(workflow))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue