kafo 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of kafo might be problematic. Click here for more details.

data/README.md CHANGED
@@ -190,7 +190,8 @@ Kafo support password arguments. It's adding some level of protection for you
190
190
  passwords. Usually people generate random strings for passwords. However all
191
191
  values are stored in config/answers.yaml which introduce some security risk.
192
192
 
193
- If this is something to concern for you, you can use password type. It will
193
+ If this is something to consider for you, you can use password type (see
194
+ Argument types for more info how to define parameter type). It will
194
195
  generate a secure (random) password of decent length (32 chars) and encrypts
195
196
  it using AES 256 in CBC mode. It uses a passphrase that is stored in
196
197
  config/kafo.yaml so if anyone gets an access to this file, he can read all
@@ -289,6 +290,21 @@ bin/foreman-installer --foreman-db-password=UNDEF
289
290
 
290
291
  It also works in interactive mode.
291
292
 
293
+ ## Custom paths
294
+
295
+ Usually when you package your installer you want to load files from specific
296
+ paths. In order to do that you can use following configuration options:
297
+
298
+ * :answer_file: /etc/kafo/kafo.yaml
299
+ * :installer_dir: /usr/share/kafo/
300
+ * :modules_dir: /usr/share/kafo/modules
301
+
302
+ Answer file is obvious. Installer dir is a place where you installer is
303
+ installed. E.g. system checks will be loaded from here (under checks
304
+ subdirectory). On debian systems you may want to specify modules dir
305
+ independent on your installer location. If you specify this option your
306
+ installer puppet modules will be loaded from here.
307
+
292
308
  ## Order of puppet modules execution
293
309
 
294
310
  When you have more than one module you may end up in situation where you need
@@ -5,8 +5,10 @@
5
5
  ## Installer configuration
6
6
  # Path to answer file, if the file does not exist a $pwd/config/answers.yaml is used as a fallback
7
7
  # :answer_file: /etc/kafo/kafo.yaml
8
- # Uncomment if you want to load puppet modules from a specific path, $pwd/modules is used by default
8
+ # Custome installer path
9
9
  # :installer_dir: /usr/share/kafo/
10
+ # Uncomment if you want to load puppet modules from a specific path, $pwd/modules is used by default
11
+ # :modules_dir: /usr/share/kafo/modules
10
12
 
11
13
  ## Kafo tuning, customization of core functionality
12
14
  # :no_prefix: false
@@ -13,6 +13,7 @@ class Configuration
13
13
  :mapping => {},
14
14
  :answer_file => '/etc/kafo/kafo.yaml',
15
15
  :installer_dir => '.',
16
+ :modules_dir => './modules',
16
17
  :default_values_dir => '/tmp'
17
18
  }
18
19
 
@@ -30,8 +30,10 @@ class PuppetCommand
30
30
  private
31
31
 
32
32
  def modules_path
33
+ installer_modules = KafoConfigure.config.app[:modules_dir] ||
34
+ (KafoConfigure.config.app[:installer_dir] + '/modules')
33
35
  [
34
- KafoConfigure.config.app[:installer_dir] + '/modules',
36
+ installer_modules,
35
37
  File.join(KafoConfigure.gem_root, 'modules')
36
38
  ].join(':')
37
39
  end
data/lib/kafo/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # encoding: UTF-8
2
2
  module Kafo
3
- VERSION = "0.0.9"
3
+ VERSION = "0.0.10"
4
4
  end
@@ -4,7 +4,7 @@
4
4
  module Puppet::Parser::Functions
5
5
  newfunction(:load_kafo_answer_file, :type => :rvalue) do |args|
6
6
  answer_file = lookupvar('kafo_answer_file')
7
- if answer_file && !answer_file.empty?
7
+ if answer_file && answer_file != :undefined && !answer_file.empty?
8
8
  answer_file
9
9
  else
10
10
  YAML.load_file(lookupvar('kafo_config_file'))[:answer_file]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kafo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-05 00:00:00.000000000 Z
12
+ date: 2013-09-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -134,7 +134,6 @@ extra_rdoc_files: []
134
134
  files:
135
135
  - bin/kafo-configure
136
136
  - bin/kafofy
137
- - config/kafo.yaml
138
137
  - config/kafo.yaml.example
139
138
  - config/config_header.txt
140
139
  - lib/kafo/puppet_module.rb
data/config/kafo.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- !ruby/sym log_dir: /var/log/kafo
3
- !ruby/sym log_level: !ruby/sym debug
4
- !ruby/sym no_prefix: false
5
- !ruby/sym mapping: {}
6
- !ruby/sym password: ibZ9oHb0CC6joJHhmOzIvDD8tjwa3jX5hGU6mEdYHcM
7
- !ruby/sym answer_file: /home/ares/z/kafotest/config/answers.yaml