summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/rcm18
1 files changed, 18 insertions, 0 deletions
diff --git a/bin/rcm b/bin/rcm
new file mode 100755
index 0000000..2a7b6cd
--- /dev/null
+++ b/bin/rcm
@@ -0,0 +1,18 @@
+#!/usr/bin/env ruby
+# CLI entry point for RCM configuration management.
+# Usage: rcm <config.rb> [--dry] [--debug] [--hosts host1,host2]
+
+if ARGV.empty? || ARGV.first.start_with?('-')
+ warn "Usage: rcm <config.rb> [--dry] [--debug] [--hosts host1,host2]"
+ exit 1
+end
+
+config_file = ARGV.shift
+
+unless File.exist?(config_file)
+ warn "Error: file not found: #{config_file}"
+ exit 1
+end
+
+require 'rcm'
+load config_file