summaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands/deploy.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2012-11-28 01:40:20 -0800
committerelijah <elijah@riseup.net>2012-11-28 01:40:20 -0800
commitc76221182ca98ed804cc0c5259982250fa45f67c (patch)
treecdc3385f04eadc793274c4943e21fe419b406ccb /lib/leap_cli/commands/deploy.rb
parentc91b94d10ae5540c5d4128f8ca8748bd897f2cfb (diff)
give the user a nice error if 'init-node' has not yet been run (or if there are required packages that are missing).
Diffstat (limited to 'lib/leap_cli/commands/deploy.rb')
-rw-r--r--lib/leap_cli/commands/deploy.rb19
1 files changed, 4 insertions, 15 deletions
diff --git a/lib/leap_cli/commands/deploy.rb b/lib/leap_cli/commands/deploy.rb
index 63e6c73..bee09a0 100644
--- a/lib/leap_cli/commands/deploy.rb
+++ b/lib/leap_cli/commands/deploy.rb
@@ -2,8 +2,8 @@ module LeapCli
module Commands
desc 'Apply recipes to a node or set of nodes'
- long_desc 'The node filter can be the name of a node, service, or tag.'
- arg_name '<node filter>'
+ long_desc 'The node-filter can be the name of a node, service, or tag.'
+ arg_name 'node-filter'
command :deploy do |c|
c.action do |global_options,options,args|
init_submodules
@@ -17,11 +17,7 @@ module LeapCli
end
ssh_connect(nodes) do |ssh|
- # directory setup
- ssh.leap.mkdir("/etc/leap")
- ssh.leap.mkdir("/srv/leap")
- ssh.leap.chown_root("/etc/leap")
- ssh.leap.chown_root("/srv/leap")
+ ssh.leap.assert_initialized
# sync hiera conf
ssh.leap.log :updating, "hiera.yaml" do
@@ -31,14 +27,7 @@ module LeapCli
end
end
- # sync puppet
- #
- # what we want:
- # puppet apply --confdir /srv/leap/puppet /srv/leap/puppet/manifests/site.pp | grep -v 'warning:.*is deprecated'
- #
- # what we get currently:
- #
- #
+ # sync puppet manifests and apply them
ssh.set :puppet_source, [Path.platform, 'puppet'].join('/')
ssh.set :puppet_destination, '/srv/leap'
ssh.set :puppet_command, '/usr/bin/puppet apply --color=false'