From b5609d6eddcf431bc8e7596f1972498fae0375fc Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sun, 3 Nov 2024 12:11:14 +0900 Subject: [PATCH] Provide the task to provision LXC containers. --- tasks/lxc.rake | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tasks/lxc.rake diff --git a/tasks/lxc.rake b/tasks/lxc.rake new file mode 100644 index 0000000..5142621 --- /dev/null +++ b/tasks/lxc.rake @@ -0,0 +1,9 @@ +#!/usr/bin/env rake + +desc 'Invoke itamae command for the lxc container' +task :lxc do + node = `ls -1 nodes/*.json | xargs -I % basename % .json | fzf` + node.chomp! + + sh "ITAMAE_PASSWORD=musashi bundle ex itamae ssh --host #{node} -j nodes/#{node}.json -u root entrypoint.rb" +end