diff options
author | elijah <elijah@riseup.net> | 2016-02-01 15:04:14 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2016-02-01 15:04:14 -0800 |
commit | 80f2bded4642e31a7cf8265f5fcddf2232a2191a (patch) | |
tree | d75ace43cbf0f17847a49809cb8e23e43c204e59 /lib | |
parent | cc63aa3d94d5292a4bfa561ee216f1abe605c5c0 (diff) |
make /etc/leap a config option
Diffstat (limited to 'lib')
-rw-r--r-- | lib/leap/platform.rb | 2 | ||||
-rw-r--r-- | lib/leap_cli/remote/tasks.rb | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/leap/platform.rb b/lib/leap/platform.rb index 36a13f8..9112ef3 100644 --- a/lib/leap/platform.rb +++ b/lib/leap/platform.rb @@ -14,6 +14,7 @@ module Leap attr_accessor :monitor_username attr_accessor :reserved_usernames + attr_accessor :hiera_dir attr_accessor :hiera_path attr_accessor :files_dir attr_accessor :leap_dir @@ -24,6 +25,7 @@ module Leap def define(&block) # some defaults: @reserved_usernames = [] + @hiera_dir = '/etc/leap' @hiera_path = '/etc/leap/hiera.yaml' @leap_dir = '/srv/leap' @files_dir = '/srv/leap/files' diff --git a/lib/leap_cli/remote/tasks.rb b/lib/leap_cli/remote/tasks.rb index 928d026..9d4587e 100644 --- a/lib/leap_cli/remote/tasks.rb +++ b/lib/leap_cli/remote/tasks.rb @@ -60,8 +60,8 @@ task :install_prerequisites, :max_hosts => MAX_HOSTS do run %[#{apt_get} install $( (egrep -q '(^wheezy|^7\.)' /etc/debian_version && echo #{leap.required_wheezy_packages}) || echo #{leap.required_packages} )] end #run "locale-gen" - leap.mkdirs("/etc/leap", "/srv/leap") - run "chmod 0755 /etc/leap" + leap.mkdirs Leap::Platform.hiera_dir + run "chmod 0755 #{Leap::Platform.hiera_dir}" leap.mark_initialized end |