falkorlib 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/falkorlib/puppet/modules.rb +3 -3
- data/lib/falkorlib/version.rb +1 -1
- data/templates/puppet/modules/.vagrant_init.rb +6 -4
- data/templates/puppet/modules/Vagrantfile +1 -1
- data/templates/puppet/modules/files/README.md.erb +5 -5
- data/templates/puppet/modules/manifests/init.pp.erb +2 -2
- data/templates/puppet/modules/templates/README.md.erb +6 -6
- data/templates/puppet/modules/templates/templatename-variables.erb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e28d97f7a88cce31cc5f23032ccdd23b887d8ce
|
4
|
+
data.tar.gz: aec4b454bf7177169e6195026d19c3c21390fe62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15a8dd62ad3968beed584d5122cbf82899fc5192f4b60cb8d314839a2e707867c94c09760cdb74fdbf0d0e6929bdc2516b34c133e1a7af582919a0e55bb0e1ed
|
7
|
+
data.tar.gz: 67bc8769082c8a4e08ae1bfafeb7a5066c3a9597752ccf0902d155e18b4238e7742170d022df0017143bca0c8e7c54b2352e8cf3cf2911b412569dce4d26f70f
|
data/Gemfile.lock
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
################################################################################
|
3
|
-
# Time-stamp: <
|
3
|
+
# Time-stamp: <Wed 2015-05-20 16:18 svarrette>
|
4
4
|
################################################################################
|
5
5
|
# Interface for the main Puppet Module operations
|
6
6
|
#
|
@@ -106,7 +106,7 @@ module FalkorLib #:nodoc:
|
|
106
106
|
when :description
|
107
107
|
config[:summary].nil? ? v : "#{config[:summary]}"
|
108
108
|
when :source
|
109
|
-
v.empty? ? "https://github.com/#{
|
109
|
+
v.empty? ? "https://github.com/#{config[:name].gsub(/\//,'/puppet-')}" : v
|
110
110
|
else
|
111
111
|
v
|
112
112
|
end
|
@@ -170,7 +170,7 @@ module FalkorLib #:nodoc:
|
|
170
170
|
FalkorLib::GitFlow.start('feature', "bootstrapping", moduledir)
|
171
171
|
end
|
172
172
|
[ 'metadata.json',
|
173
|
-
'docs/', 'LICENSE', '.gitignore', '.ruby-version', '.ruby-gemset',
|
173
|
+
'docs/', 'mkdocs.yml', 'LICENSE', '.gitignore', '.ruby-version', '.ruby-gemset',
|
174
174
|
'Gemfile', '.vagrant_init.rb', 'Rakefile', 'Vagrantfile' ].each do |f|
|
175
175
|
FalkorLib::Git.add(File.join(moduledir, f))
|
176
176
|
end
|
data/lib/falkorlib/version.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
##########################################################################
|
3
3
|
# vagrant_init.rb
|
4
4
|
# @author Sebastien Varrette <Sebastien.Varrette@uni.lu>
|
5
|
-
# Time-stamp: <
|
5
|
+
# Time-stamp: <Mon 2015-05-25 20:12 svarrette>
|
6
6
|
#
|
7
7
|
# @description
|
8
8
|
#
|
@@ -23,13 +23,15 @@ error "Unable to find the metadata.json" unless File.exists?(jsonfile)
|
|
23
23
|
|
24
24
|
metadata = JSON.parse( IO.read( jsonfile ) )
|
25
25
|
name = metadata["name"].gsub(/^[^\/-]+[\/-]/,'')
|
26
|
+
modulepath=`puppet config print modulepath`.chomp
|
27
|
+
moduledir=modulepath.split(':').first
|
28
|
+
|
26
29
|
metadata["dependencies"].each do |dep|
|
27
30
|
lib = dep["name"]
|
28
|
-
|
31
|
+
action = File.directory?("#{moduledir}") ? 'upgrade' : 'install'
|
32
|
+
run %{ puppet module #{action} #{lib} }
|
29
33
|
end
|
30
34
|
|
31
|
-
modulepath=`puppet config print modulepath`.chomp
|
32
|
-
moduledir=modulepath.split(':').first
|
33
35
|
|
34
36
|
puts "Module path: #{modulepath}"
|
35
37
|
puts "Moduledir: #{moduledir}"
|
@@ -21,7 +21,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
21
21
|
}
|
22
22
|
}.each do |name,cfg|
|
23
23
|
boxname = name.to_s.downcase.gsub(/_/, '-')
|
24
|
-
config.vm.define boxname, :primary => cfg[:primary] do |local|
|
24
|
+
config.vm.define boxname, :autostart => (! cfg[:primary].nil?), :primary => cfg[:primary] do |local|
|
25
25
|
#local.vm.primary = true if cfg[:primary]
|
26
26
|
local.vm.box = cfg[:box]
|
27
27
|
local.vm.host_name = ENV['VAGRANT_HOSTNAME'] || name.to_s.downcase.gsub(/_/, '-').concat(".vagrant.com")
|
@@ -8,14 +8,14 @@ file objects. Learn more [here](http://projects.puppetlabs.com/projects/puppet/w
|
|
8
8
|
|
9
9
|
You can use managed files like this:
|
10
10
|
|
11
|
-
class <%= config[:
|
12
|
-
package { <%= config[:
|
13
|
-
file { "/etc/<%= config[:
|
14
|
-
source => "puppet://$servername/modules/<%= config[:
|
11
|
+
class <%= config[:shortname] %> {
|
12
|
+
package { <%= config[:shortname] %>: ensure => latest }
|
13
|
+
file { "/etc/<%= config[:shortname] %>.conf":
|
14
|
+
source => "puppet://$servername/modules/<%= config[:shortname] %>/myfile"
|
15
15
|
}
|
16
16
|
}
|
17
17
|
|
18
18
|
The files are searched for in:
|
19
19
|
|
20
|
-
$modulepath/<%= config[:
|
20
|
+
$modulepath/<%= config[:shortname] %>/files/myfile
|
21
21
|
|
@@ -10,11 +10,11 @@
|
|
10
10
|
#
|
11
11
|
# == Parameters:
|
12
12
|
#
|
13
|
-
# $ensure:: *Default*: 'present'. Ensure the presence (or absence) of <%= config[:
|
13
|
+
# $ensure:: *Default*: 'present'. Ensure the presence (or absence) of <%= config[:shortname] %>
|
14
14
|
#
|
15
15
|
# == Actions:
|
16
16
|
#
|
17
|
-
# Install and configure <%= config[:
|
17
|
+
# Install and configure <%= config[:shortname] %>
|
18
18
|
#
|
19
19
|
# == Requires:
|
20
20
|
#
|
@@ -10,15 +10,15 @@ Learn more [here](http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Tem
|
|
10
10
|
|
11
11
|
You can use templates like this:
|
12
12
|
|
13
|
-
class <%= config[:
|
14
|
-
package { <%= config[:
|
15
|
-
file { "/etc/<%= config[:
|
16
|
-
content => template("<%= config[:
|
13
|
+
class <%= config[:shortname] %> {
|
14
|
+
package { <%= config[:shortname] %>: ensure => latest }
|
15
|
+
file { "/etc/<%= config[:shortname] %>.conf":
|
16
|
+
content => template("<%= config[:shortname] %>/myfile.erb")
|
17
17
|
}
|
18
18
|
}
|
19
19
|
|
20
20
|
The templates are searched for in:
|
21
21
|
|
22
|
-
$templatedir/<%= config[:
|
23
|
-
$modulepath/<%= config[:
|
22
|
+
$templatedir/<%= config[:shortname] %>/myfile.erb
|
23
|
+
$modulepath/<%= config[:shortname] %>/templates/myfile.erb
|
24
24
|
|
@@ -13,4 +13,4 @@
|
|
13
13
|
# These are the variables used by the module <%= config[:name] %>
|
14
14
|
#
|
15
15
|
# General internal variables:
|
16
|
-
$packagename = < %= scope.lookupvar('<%= config[:
|
16
|
+
$packagename = < %= scope.lookupvar('<%= config[:shortname] %>::params::packagename') % >
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: falkorlib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastien Varrette
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|