2025-01-22 22:00:13 +00:00
|
|
|
(use-modules
|
|
|
|
(ice-9 filesystem)
|
2025-01-25 15:46:12 +00:00
|
|
|
(ordo playbook)
|
|
|
|
(ordo play)
|
2025-01-23 17:08:06 +00:00
|
|
|
(ordo interceptor)
|
2025-01-25 14:41:37 +00:00
|
|
|
(ordo interceptor install-file)
|
|
|
|
(ordo interceptor create-tmp-dir)
|
|
|
|
(ordo interceptor stat-file)
|
|
|
|
(ordo interceptor user-info)
|
2025-01-25 15:46:12 +00:00
|
|
|
(ordo interceptor debug))
|
2025-01-22 22:00:13 +00:00
|
|
|
|
2025-01-25 15:46:12 +00:00
|
|
|
(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)))))
|