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)
|
||||
#:use-module (ice-9 filesystem)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (logging logger)
|
||||
#:use-module (ordo logger)
|
||||
|
@ -9,12 +10,14 @@
|
|||
|
||||
(define (main args)
|
||||
(match-let (((_ inventory-path playbook-path) args))
|
||||
(setup-logging #:level 'DEBUG)
|
||||
(log-msg 'DEBUG "Initializing context")
|
||||
(init-context!)
|
||||
(load inventory-path)
|
||||
(log-msg 'DEBUG "Loaded inventory: " inventory-path)
|
||||
(let ((playbook (load playbook-path)))
|
||||
(log-msg 'DEBUG "Loaded playbook: " playbook-path)
|
||||
(run-playbook playbook))
|
||||
(quit)))
|
||||
(let ((inventory-path (expand-file-name inventory-path))
|
||||
(playbook-path (expand-file-name playbook-path)))
|
||||
(setup-logging #:level 'DEBUG)
|
||||
(log-msg 'DEBUG "Initializing context")
|
||||
(init-context!)
|
||||
(load inventory-path)
|
||||
(log-msg 'DEBUG "Loaded inventory: " inventory-path)
|
||||
(let ((playbook (load playbook-path)))
|
||||
(log-msg 'DEBUG "Loaded playbook: " playbook-path)
|
||||
(run-playbook playbook))
|
||||
(quit))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue