31 lines
1.3 KiB
Scheme
31 lines
1.3 KiB
Scheme
(use-modules
|
|
(ice-9 filesystem)
|
|
(ordo playbook)
|
|
(ordo play)
|
|
(ordo interceptor)
|
|
(ordo interceptor install-file)
|
|
(ordo interceptor create-tmp-dir)
|
|
(ordo interceptor stat-file)
|
|
(ordo interceptor user-info)
|
|
(ordo interceptor debug))
|
|
|
|
(playbook
|
|
#:name "Test some basic filesystem operations"
|
|
#:vars '((file-content . "This is shadowed by the play variable."))
|
|
#:plays (list (play
|
|
#:name "Basic filesystem operations"
|
|
#:host "localhost"
|
|
#:vars '((file-content . "Hello, world!\n"))
|
|
#:interceptors (list (create-tmp-dir #:register 'tmp-dir)
|
|
(user-info)
|
|
(debug-vars 'user-info)
|
|
(install-file
|
|
"install-hello"
|
|
#:path (let-vars (tmp-dir) (file-name-join* tmp-dir "hello.txt"))
|
|
#:content (let-vars (file-content) file-content)
|
|
#:register 'hello)
|
|
(stat-file
|
|
"stat-hello"
|
|
#:path (let-vars (hello) hello)
|
|
#:register 'hello-stat)
|
|
(debug-vars)))))
|