Factor out CLI into its own module
This commit is contained in:
parent
54b6fd0377
commit
1535baa68b
3 changed files with 17 additions and 13 deletions
|
@ -1,5 +1,4 @@
|
|||
(use-modules (ordo inventory)
|
||||
(ordo connection))
|
||||
(use-modules (ordo))
|
||||
|
||||
(add-host! "little-rascal"
|
||||
(local-connection)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
(define-module (ordo)
|
||||
#:declarative? #f
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (ordo playbook)
|
||||
#:use-module (ordo play)
|
||||
|
@ -9,14 +8,4 @@
|
|||
#:use-module (ordo inventory)
|
||||
#:use-module (ordo vars)
|
||||
#:use-module (ordo logger)
|
||||
#:export (main)
|
||||
#:re-export (add-host! local-connection ssh-connection run playbook play task handler $))
|
||||
|
||||
(define (main args)
|
||||
(match-let (((_ inventory-path playbook-path) args))
|
||||
(setup-logging #:level 'DEBUG)
|
||||
(init-command-line-vars! '())
|
||||
(load inventory-path)
|
||||
(let ((playbook (load playbook-path)))
|
||||
(run-playbook playbook)))
|
||||
(quit))
|
||||
|
|
16
modules/ordo/cli.scm
Normal file
16
modules/ordo/cli.scm
Normal file
|
@ -0,0 +1,16 @@
|
|||
(define-module (ordo cli)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (ordo logger)
|
||||
#:use-module (ordo vars)
|
||||
#:use-module (ordo playbook)
|
||||
#:declarative? #f
|
||||
#:export (main))
|
||||
|
||||
(define (main args)
|
||||
(match-let (((_ inventory-path playbook-path) args))
|
||||
(setup-logging #:level 'DEBUG)
|
||||
(init-command-line-vars! '())
|
||||
(load inventory-path)
|
||||
;; (let ((playbook (load playbook-path)))
|
||||
;; (run-playbook playbook))
|
||||
(quit)))
|
Loading…
Add table
Add a link
Reference in a new issue