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)
|
(define-module (ordo cli run)
|
||||||
|
#:declarative? #f
|
||||||
#:use-module (config)
|
#:use-module (config)
|
||||||
#:use-module (config api)
|
#:use-module (config api)
|
||||||
#:use-module (ice-9 filesystem)
|
#:use-module (ice-9 filesystem)
|
||||||
|
#:use-module (ordo core)
|
||||||
#:use-module (ordo inventory)
|
#:use-module (ordo inventory)
|
||||||
#:use-module (ordo logger)
|
#:use-module (ordo logger)
|
||||||
#:use-module (ordo playbook)
|
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (srfi srfi-26)
|
#:use-module (srfi srfi-26)
|
||||||
#:export (config handler))
|
#:export (config handler))
|
||||||
|
@ -57,12 +58,12 @@ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
(argument
|
(argument
|
||||||
(name 'playbook)
|
(name 'workflow)
|
||||||
(handler (cut expand-file-name <> #f #t))
|
(handler (cut expand-file-name <> #f #t))
|
||||||
|
(example "examples/uptime.scm")
|
||||||
(test file-exists?))))
|
(test file-exists?))))
|
||||||
(synopsis "Run a playbook")))
|
(synopsis "Run a workflow")))
|
||||||
|
|
||||||
(define (handler options)
|
(define (handler options)
|
||||||
(let ((inventory (load-inventory (option-ref options 'inventory)))
|
(load-inventory! (option-ref options 'inventory))
|
||||||
(playbook (load-playbook (option-ref options '(playbook)))))
|
(load (option-ref options '(workflow))))
|
||||||
(run-playbook playbook inventory)))
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue