aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2013-10-30 21:56:26 +0100
committervarac <varacanero@zeromail.org>2013-10-30 21:56:26 +0100
commitb481103c024036e745c22d8f75e676ed875f83cb (patch)
treea2ccc93dc78d8a826160e246192cfdc83773bf73
parent90bf49387b3a1e3f5a8cc873e19f0e740a401e27 (diff)
parentf2746ddc5a4cdf104970d3998ad33303a2af74fb (diff)
downloadleap_cli-b481103c024036e745c22d8f75e676ed875f83cb.tar.gz
leap_cli-b481103c024036e745c22d8f75e676ed875f83cb.tar.bz2
Merge branch 'master' of ssh://code.leap.se/leap_cli
-rw-r--r--README.md15
-rw-r--r--lib/leap_cli/commands/compile.rb2
-rw-r--r--lib/leap_cli/commands/new.rb2
-rw-r--r--lib/leap_cli/remote/leap_plugin.rb2
-rw-r--r--lib/leap_cli/remote/tasks.rb2
5 files changed, 12 insertions, 11 deletions
diff --git a/README.md b/README.md
index 7d7ee0d..90bce52 100644
--- a/README.md
+++ b/README.md
@@ -10,20 +10,21 @@ Install prerequisites:
sudo apt-get install git ruby ruby-dev rsync openssh-client openssl rake
+NOTE: leap_cli requires ruby 1.9 or later.
+
Optionally install Vagrant in order to be able to test with local virtual machines (recommended):
sudo apt-get install vagrant virtualbox
-NOTE: leap_cli should work with ruby1.8, but has only been tested using ruby1.9.
-
-Install the `leap` command:
+NOTE: the packaged virtualbox and vagrant that comes with Debian and Ubuntu are rather ancient. Most people have better luck by downloading these packages from the upstream:
- sudo gem install leap_cli
+* https://downloads.vagrantup.com/
+* https://www.virtualbox.org/wiki/Downloads
-Alternately, you can install `leap` from source:
+Install the `leap` command:
sudo apt-get install rake
- git clone git://leap.se/leap_cli.git
+ git clone https://leap.se/git/leap_cli.git
cd leap_cli
rake build
@@ -75,7 +76,7 @@ Install from git
Download the source:
- git clone git://leap.se/leap_cli
+ git clone https://github.com/leapcode/leap_cli.git
cd leap_cli
Running from the source directory
diff --git a/lib/leap_cli/commands/compile.rb b/lib/leap_cli/commands/compile.rb
index 8d0c9de..8ef7c6b 100644
--- a/lib/leap_cli/commands/compile.rb
+++ b/lib/leap_cli/commands/compile.rb
@@ -52,7 +52,7 @@ module LeapCli
def compile_zone_file
hosts_seen = {}
f = $stdout
- f.puts ZONE_HEADER % {:domain => provider.domain, :ns => provider.domain, :contact => provider.contacts.default.sub('@','.')}
+ f.puts ZONE_HEADER % {:domain => provider.domain, :ns => provider.domain, :contact => provider.contacts.default.first.sub('@','.')}
max_width = manager.nodes.values.inject(0) {|max, node| [max, relative_hostname(node.domain.full).length].max }
put_line = lambda do |host, line|
host = '@' if host == ''
diff --git a/lib/leap_cli/commands/new.rb b/lib/leap_cli/commands/new.rb
index dc37265..286fde7 100644
--- a/lib/leap_cli/commands/new.rb
+++ b/lib/leap_cli/commands/new.rb
@@ -25,7 +25,7 @@ module LeapCli; module Commands
private
- DEFAULT_REPO = 'git://leap.se/leap_platform' # TODO: use https
+ DEFAULT_REPO = 'https://leap.se/git/leap_platform.git'
#
# creates a new provider directory
diff --git a/lib/leap_cli/remote/leap_plugin.rb b/lib/leap_cli/remote/leap_plugin.rb
index f5bf490..04b1e2c 100644
--- a/lib/leap_cli/remote/leap_plugin.rb
+++ b/lib/leap_cli/remote/leap_plugin.rb
@@ -6,7 +6,7 @@
module LeapCli; module Remote; module LeapPlugin
def required_packages
- "puppet ruby-hiera-puppet rsync lsb-release"
+ "puppet ruby-hiera-puppet rsync lsb-release locales"
end
def log(*args, &block)
diff --git a/lib/leap_cli/remote/tasks.rb b/lib/leap_cli/remote/tasks.rb
index 0721c34..5b0418a 100644
--- a/lib/leap_cli/remote/tasks.rb
+++ b/lib/leap_cli/remote/tasks.rb
@@ -14,13 +14,13 @@ end
task :install_prerequisites, :max_hosts => MAX_HOSTS do
leap.mkdirs LeapCli::PUPPET_DESTINATION
- run "echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen; locale-gen"
leap.log :updating, "package list" do
run "apt-get update"
end
leap.log :installing, "required packages" do
run "DEBIAN_FRONTEND=noninteractive apt-get -q -y -o DPkg::Options::=--force-confold install #{leap.required_packages}"
end
+ run "echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen; locale-gen"
leap.mkdirs("/etc/leap", "/srv/leap")
leap.mark_initialized
end