diff options
Diffstat (limited to 'lib/leap_cli/commands/deploy.rb')
-rw-r--r-- | lib/leap_cli/commands/deploy.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/leap_cli/commands/deploy.rb b/lib/leap_cli/commands/deploy.rb index f94465f..cc2ea96 100644 --- a/lib/leap_cli/commands/deploy.rb +++ b/lib/leap_cli/commands/deploy.rb @@ -16,17 +16,18 @@ module LeapCli end end - nodes.each_node do |node| - assert_files_exist! Path.named_path([:hiera, node.name]), :msg => 'try running `leap compile`' - end + compile_hiera_files(nodes) ssh_connect(nodes) do |ssh| - ssh.leap.assert_initialized + ssh.leap.log :checking, 'node' do + ssh.leap.assert_initialized + end # sync hiera conf - ssh.leap.log :updating, "hiera.yaml" do + ssh.leap.log :syching, "hiera.yaml" do ssh.leap.rsync_update do |server| node = manager.node(server.host) + ssh.leap.log Path.relative_path([:hiera, node.name]) + ' -> ' + node.name + ':/etc/leap/hiera.yaml' {:source => Path.named_path([:hiera, node.name]), :dest => "/etc/leap/hiera.yaml"} end end |