Expand file names before loading
This commit is contained in:
parent
8a1e1b244f
commit
7401263664
1 changed files with 12 additions and 9 deletions
|
@ -1,4 +1,5 @@
|
||||||
(define-module (ordo cli)
|
(define-module (ordo cli)
|
||||||
|
#:use-module (ice-9 filesystem)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
#:use-module (logging logger)
|
#:use-module (logging logger)
|
||||||
#:use-module (ordo logger)
|
#:use-module (ordo logger)
|
||||||
|
@ -9,12 +10,14 @@
|
||||||
|
|
||||||
(define (main args)
|
(define (main args)
|
||||||
(match-let (((_ inventory-path playbook-path) args))
|
(match-let (((_ inventory-path playbook-path) args))
|
||||||
(setup-logging #:level 'DEBUG)
|
(let ((inventory-path (expand-file-name inventory-path))
|
||||||
(log-msg 'DEBUG "Initializing context")
|
(playbook-path (expand-file-name playbook-path)))
|
||||||
(init-context!)
|
(setup-logging #:level 'DEBUG)
|
||||||
(load inventory-path)
|
(log-msg 'DEBUG "Initializing context")
|
||||||
(log-msg 'DEBUG "Loaded inventory: " inventory-path)
|
(init-context!)
|
||||||
(let ((playbook (load playbook-path)))
|
(load inventory-path)
|
||||||
(log-msg 'DEBUG "Loaded playbook: " playbook-path)
|
(log-msg 'DEBUG "Loaded inventory: " inventory-path)
|
||||||
(run-playbook playbook))
|
(let ((playbook (load playbook-path)))
|
||||||
(quit)))
|
(log-msg 'DEBUG "Loaded playbook: " playbook-path)
|
||||||
|
(run-playbook playbook))
|
||||||
|
(quit))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue