summaryrefslogtreecommitdiff
path: root/playground/Rakefile
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-02-18 19:02:29 +0200
committerPaul Buetow <paul@buetow.org>2025-02-18 19:02:29 +0200
commit21c96e516044cf59a3b89c3b40c7efb279b0767c (patch)
tree30ccc58ee47ff0b5798ca55f4ea021cbd0e21401 /playground/Rakefile
parentde93bdd4a9897a4dbe1e54a8e13944cce62b7ac9 (diff)
refactor file DSL
Diffstat (limited to 'playground/Rakefile')
-rw-r--r--playground/Rakefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/playground/Rakefile b/playground/Rakefile
index 35ae811..d5c8fcc 100644
--- a/playground/Rakefile
+++ b/playground/Rakefile
@@ -8,13 +8,15 @@ task :wireguard do
only_when { hostname is :earth }
file '/tmp/test/wg/wg0.conf' do
- create_parent_directory and from_template
+ manage directory
+ from template
'the content is here and the result is <%= 1 + 2 %>'
end
file '/tmp/test/wg/wg1.conf' do
- create_parent_directory and from_sourcefile
+ manage directory
+ from sourcefile
'./Rakefile'
end
@@ -27,7 +29,7 @@ task :hosts do
only_when { hostname is :earth }
file '/etc/hosts.test' do
- ensure_line '192.168.1.101 foo'
+ line '192.168.1.101 foo'
end
end
end
@@ -36,7 +38,8 @@ desc 'foo'
task :foo do
configure do
file '/tmp/foo.txt' do
- ensure_line 'foo'
+ line ensure_line 'foo'
+ # TODO: Rename to requires
depends_on file '/tmp/bar.txt'
end