selfbootstrap 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data/LICENSE +3 -0
- data/README.md +12 -0
- data/bin/selfbootstrap +10 -0
- data/certs/public/jimbodragon.pem +26 -0
- data/lib/selfbootstrap/nochef/berks.rb +108 -0
- data/lib/selfbootstrap/nochef/chef.rb +63 -0
- data/lib/selfbootstrap/nochef/chefrepo.rb +237 -0
- data/lib/selfbootstrap/nochef/commandline.rb +114 -0
- data/lib/selfbootstrap/nochef/defaultvalues.rb +258 -0
- data/lib/selfbootstrap/nochef/defaultworkstationresource.rb +95 -0
- data/lib/selfbootstrap/nochef/git.rb +128 -0
- data/lib/selfbootstrap/nochef/kitchen.rb +84 -0
- data/lib/selfbootstrap/nochef/knife.rb +95 -0
- data/lib/selfbootstrap/nochef/platforms.rb +54 -0
- data/lib/selfbootstrap/nochef/provisioners.rb +68 -0
- data/lib/selfbootstrap/nochef/selfbootstrap.rb +467 -0
- data/lib/selfbootstrap/nochef/ssh.rb +72 -0
- data/lib/selfbootstrap/nochef/suites.rb +46 -0
- data/lib/selfbootstrap/nochef/update.rb +62 -0
- data/lib/selfbootstrap/nochef/users.rb +106 -0
- data/lib/selfbootstrap/nochef/verifiers.rb +59 -0
- data/lib/selfbootstrap/nochef/workstation.rb +250 -0
- data/lib/selfbootstrap/nochef/workstationresource.rb +140 -0
- data/lib/selfbootstrap/nochef.rb +52 -0
- data/lib/selfbootstrap/withchef/chef.rb +120 -0
- data/lib/selfbootstrap/withchef/chefrepo.rb +84 -0
- data/lib/selfbootstrap/withchef/commandline.rb +40 -0
- data/lib/selfbootstrap/withchef/defaultvalues.rb +39 -0
- data/lib/selfbootstrap/withchef/git.rb +86 -0
- data/lib/selfbootstrap/withchef/selfbootstrap.rb +41 -0
- data/lib/selfbootstrap/withchef/users.rb +161 -0
- data/lib/selfbootstrap/withchef/workstation.rb +77 -0
- data/lib/selfbootstrap/withchef/workstationresource.rb +60 -0
- data/lib/selfbootstrap/withchef.rb +55 -0
- data/lib/selfbootstrap/withlogger/defaultvalues.rb +33 -0
- data/lib/selfbootstrap/withlogger/selfbootstrap.rb +41 -0
- data/lib/selfbootstrap/withlogger/workstationresource.rb +59 -0
- data/lib/selfbootstrap/withlogger.rb +52 -0
- data/lib/selfbootstrap.rb +132 -0
- data.tar.gz.sig +0 -0
- metadata +117 -0
- metadata.gz.sig +0 -0
@@ -0,0 +1,77 @@
|
|
1
|
+
#
|
2
|
+
# Chef Infra Documentation
|
3
|
+
# https://docs.chef.io/libraries/
|
4
|
+
#
|
5
|
+
|
6
|
+
#
|
7
|
+
# This module name was auto-generated from the cookbook name. This name is a
|
8
|
+
# single word that starts with a capital letter and then continues to use
|
9
|
+
# camel-casing throughout the remainder of the name.
|
10
|
+
#
|
11
|
+
|
12
|
+
require_relative 'users'
|
13
|
+
|
14
|
+
module ChefWorkstationInitialize
|
15
|
+
module SelfBootstrap
|
16
|
+
module WithChef
|
17
|
+
module WorkstationHelpers
|
18
|
+
include ChefWorkstationInitialize::SelfBootstrap::WithChef::UsersHelpers
|
19
|
+
|
20
|
+
def auto_repo(auto_repo_action = nil, auto_repo_compile_time = false)
|
21
|
+
auto_chef_repo workstation_resource[:project_name] do
|
22
|
+
extend DefaultValuesHelpers
|
23
|
+
install_dir workstation_resource[:install_dir] unless workstation_resource[:install_dir].nil?
|
24
|
+
project_name workstation_resource[:project_name] unless workstation_resource[:project_name].nil?
|
25
|
+
project_description workstation_resource[:project_description] unless workstation_resource[:project_description].nil?
|
26
|
+
environments workstation_resource[:environments] unless workstation_resource[:environments].nil?
|
27
|
+
initial_command workstation_resource[:initial_command] unless workstation_resource[:initial_command].nil?
|
28
|
+
cron_chef_solo_command workstation_resource[:cron_chef_solo_command] unless workstation_resource[:cron_chef_solo_command].nil?
|
29
|
+
chef_boostrapped workstation_resource[:chef_boostrapped] unless workstation_resource[:chef_boostrapped].nil?
|
30
|
+
environment workstation_resource[:environment] unless workstation_resource[:environment].nil?
|
31
|
+
user workstation_resource[:user] unless workstation_resource[:user].nil?
|
32
|
+
group workstation_resource[:group] unless workstation_resource[:group].nil?
|
33
|
+
home workstation_resource[:home] unless workstation_resource[:home].nil?
|
34
|
+
run_for_type workstation_resource[:run_for_type] unless workstation_resource[:run_for_type].nil?
|
35
|
+
gitinfo workstation_resource[:gitinfo] unless workstation_resource[:gitinfo].nil?
|
36
|
+
cron workstation_resource[:cron] unless workstation_resource[:cron].nil?
|
37
|
+
provisioners workstation_resource[:provisioners] unless workstation_resource[:provisioners].nil?
|
38
|
+
verifiers workstation_resource[:verifiers] unless workstation_resource[:verifiers].nil?
|
39
|
+
platforms workstation_resource[:platforms] unless workstation_resource[:platforms].nil?
|
40
|
+
suites workstation_resource[:suites] unless workstation_resource[:suites].nil?
|
41
|
+
default_attributes workstation_resource[:default_attributes] unless workstation_resource[:default_attributes].nil?
|
42
|
+
override_attributes workstation_resource[:override_attributes] unless workstation_resource[:override_attributes].nil?
|
43
|
+
action auto_repo_action unless auto_repo_action.nil?
|
44
|
+
compile_time auto_repo_compile_time
|
45
|
+
optional_actions yield if block_given?
|
46
|
+
# infra:,
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def node_infra_chef
|
51
|
+
if parent_nil?(node, 'infra_chef', 'project_name')
|
52
|
+
node.override['infra_chef']['project_name'] = cookbook_name
|
53
|
+
node.override['infra_chef']['install_dir'] = workstation_chef_repo_path
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
#
|
62
|
+
# The module you have defined may be extended within the recipe to grant the
|
63
|
+
# recipe the helper methods you define.
|
64
|
+
#
|
65
|
+
# Within your recipe you would write:
|
66
|
+
#
|
67
|
+
# extend ChefWorkstationInitialize::WorkstationHelpers
|
68
|
+
#
|
69
|
+
# my_helper_method
|
70
|
+
#
|
71
|
+
# You may also add this to a single resource within a recipe:
|
72
|
+
#
|
73
|
+
# template '/etc/app.conf' do
|
74
|
+
# extend ChefWorkstationInitialize::WorkstationHelpers
|
75
|
+
# variables specific_key: my_helper_method
|
76
|
+
# end
|
77
|
+
#
|
@@ -0,0 +1,60 @@
|
|
1
|
+
#
|
2
|
+
# Chef Infra Documentation
|
3
|
+
# https://docs.chef.io/libraries/
|
4
|
+
#
|
5
|
+
|
6
|
+
#
|
7
|
+
# This module name was auto-generated from the cookbook name. This name is a
|
8
|
+
# single word that starts with a capital letter and then continues to use
|
9
|
+
# camel-casing throughout the remainder of the name.
|
10
|
+
#
|
11
|
+
|
12
|
+
require_relative 'workstation'
|
13
|
+
|
14
|
+
module ChefWorkstationInitialize
|
15
|
+
module SelfBootstrap
|
16
|
+
module WithChef
|
17
|
+
module WorkstationResourceHelpers
|
18
|
+
include ChefWorkstationInitialize::SelfBootstrap::WithChef::WorkstationHelpers
|
19
|
+
|
20
|
+
class ChefConfigResource < ChefWorkstationInitialize::SelfBootstrap::NoChef::WorkstationResourceHelpers::DefaultWorkstationResource
|
21
|
+
include ChefWorkstationInitialize::SelfBootstrap::WithChef
|
22
|
+
|
23
|
+
def [](key)
|
24
|
+
debug_worklog('Searching config key" ' + key.to_s + '"') unless key.to_s == 'debug'
|
25
|
+
if default_workstation_resource.key?(key)
|
26
|
+
default_workstation_resource[key]
|
27
|
+
elsif default_workstation_resource.key?(key.to_s)
|
28
|
+
default_workstation_resource[key.to_s]
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def get_workstation
|
34
|
+
debug_worklog "Get workstation from #{self.class}"
|
35
|
+
@workstation = ChefConfigResource.new if @workstation.nil?
|
36
|
+
swap_workstation(ChefWorkstationInitialize::SelfBootstrap::WithLogger) if respond_to? 'logger'
|
37
|
+
@workstation
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
#
|
45
|
+
# The module you have defined may be extended within the recipe to grant the
|
46
|
+
# recipe the helper methods you define.
|
47
|
+
#
|
48
|
+
# Within your recipe you would write:
|
49
|
+
#
|
50
|
+
# extend ChefWorkstationInitialize::WorkstationHelpers
|
51
|
+
#
|
52
|
+
# my_helper_method
|
53
|
+
#
|
54
|
+
# You may also add this to a single resource within a recipe:
|
55
|
+
#
|
56
|
+
# template '/etc/app.conf' do
|
57
|
+
# extend ChefWorkstationInitialize::WorkstationHelpers
|
58
|
+
# variables specific_key: my_helper_method
|
59
|
+
# end
|
60
|
+
#
|
@@ -0,0 +1,55 @@
|
|
1
|
+
#
|
2
|
+
# Chef Infra Documentation
|
3
|
+
# https://docs.chef.io/libraries/
|
4
|
+
#
|
5
|
+
|
6
|
+
#
|
7
|
+
# This module name was auto-generated from the cookbook name. This name is a
|
8
|
+
# single word that starts with a capital letter and then continues to use
|
9
|
+
# camel-casing throughout the remainder of the name.
|
10
|
+
#
|
11
|
+
|
12
|
+
require 'withlogger'
|
13
|
+
require_relative 'withchef/selfbootstrap'
|
14
|
+
require 'nochef'
|
15
|
+
|
16
|
+
module ChefWorkstationInitialize
|
17
|
+
module SelfBootstrap
|
18
|
+
if respond_to? 'logger'
|
19
|
+
include ChefWorkstationInitialize::SelfBootstrap::WithLogger
|
20
|
+
elsif respond_to? 'Chef'
|
21
|
+
include ChefWorkstationInitialize::SelfBootstrap::WithChef
|
22
|
+
else
|
23
|
+
include ChefWorkstationInitialize::SelfBootstrap::NoChef
|
24
|
+
end
|
25
|
+
|
26
|
+
module WithChef
|
27
|
+
include ChefWorkstationInitialize::SelfBootstrap::WithChef::SelfBootstrapHelpers
|
28
|
+
#
|
29
|
+
# Define the methods that you would like to assist the work you do in recipes,
|
30
|
+
# resources, or templates.
|
31
|
+
#
|
32
|
+
# def my_helper_method
|
33
|
+
# # help method implementation
|
34
|
+
# end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# The module you have defined may be extended within the recipe to grant the
|
41
|
+
# recipe the helper methods you define.
|
42
|
+
#
|
43
|
+
# Within your recipe you would write:
|
44
|
+
#
|
45
|
+
# extend ChefWorkstationInitialize::SelfBootstrap::WithChefHelpers
|
46
|
+
#
|
47
|
+
# my_helper_method
|
48
|
+
#
|
49
|
+
# You may also add this to a single resource within a recipe:
|
50
|
+
#
|
51
|
+
# template '/etc/app.conf' do
|
52
|
+
# extend ChefWorkstationInitialize::SelfBootstrap::WithChefHelpers
|
53
|
+
# variables specific_key: my_helper_method
|
54
|
+
# end
|
55
|
+
#
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# name 'Helper file for chef_workstation_initialize'
|
2
|
+
# maintainer 'Jimbo Dragon'
|
3
|
+
# maintainer_email 'jimbo_dragon@hotmail.com'
|
4
|
+
# license 'MIT'
|
5
|
+
# description 'Helper file for chef_workstation_initialize'
|
6
|
+
# version '0.1.0'
|
7
|
+
# chef_version '>= 16.6.14'
|
8
|
+
# issues_url 'https://github.com/jimbodragon/chef_workstation_initialize/issues'
|
9
|
+
# source_url 'https://github.com/jimbodragon/chef_workstation_initialize'
|
10
|
+
#
|
11
|
+
# Chef Infra Documentation
|
12
|
+
# https://docs.chef.io/libraries/
|
13
|
+
#
|
14
|
+
|
15
|
+
#
|
16
|
+
# This module name was auto-generated from the cookbook name. This name is a
|
17
|
+
# single word that starts with a capital letter and then continues to use
|
18
|
+
# camel-casing throughout the remainder of the name.
|
19
|
+
#
|
20
|
+
|
21
|
+
require_relative 'nochef'
|
22
|
+
|
23
|
+
module ChefWorkstationInitialize
|
24
|
+
module SelfBootstrap
|
25
|
+
module WithLogger
|
26
|
+
module DefaultValuesHelpers
|
27
|
+
def worklog(logstr)
|
28
|
+
logger.warn("\n\n(#{worklog_counter})WORKLOG:: #{logstr}\n\n")
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
#
|
2
|
+
# Chef Infra Documentation
|
3
|
+
# https://docs.chef.io/libraries/
|
4
|
+
#
|
5
|
+
|
6
|
+
#
|
7
|
+
# This module name was auto-generated from the cookbook name. This name is a
|
8
|
+
# single word that starts with a capital letter and then continues to use
|
9
|
+
# camel-casing throughout the remainder of the name.
|
10
|
+
#
|
11
|
+
|
12
|
+
require_relative 'workstationresource'
|
13
|
+
|
14
|
+
module ChefWorkstationInitialize
|
15
|
+
module SelfBootstrap
|
16
|
+
module WithLogger
|
17
|
+
module SelfBootstrapHelpers
|
18
|
+
include ChefWorkstationInitialize::SelfBootstrap::WithLogger::WorkstationResourceHelpers
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
#
|
25
|
+
# The module you have defined may be extended within the recipe to grant the
|
26
|
+
# recipe the helper methods you define.
|
27
|
+
#
|
28
|
+
# Within your recipe you would write:
|
29
|
+
#
|
30
|
+
# extend ChefWorkstationInitialize::WorkstationHelpers
|
31
|
+
#
|
32
|
+
# my_helper_method
|
33
|
+
#
|
34
|
+
# You may also add this to a single resource within a recipe:
|
35
|
+
#
|
36
|
+
# template '/etc/app.conf' do
|
37
|
+
# extend ChefWorkstationInitialize::WorkstationHelpers
|
38
|
+
# variables specific_key: my_helper_method
|
39
|
+
# end
|
40
|
+
#
|
41
|
+
|
@@ -0,0 +1,59 @@
|
|
1
|
+
#
|
2
|
+
# Chef Infra Documentation
|
3
|
+
# https://docs.chef.io/libraries/
|
4
|
+
#
|
5
|
+
|
6
|
+
#
|
7
|
+
# This module name was auto-generated from the cookbook name. This name is a
|
8
|
+
# single word that starts with a capital letter and then continues to use
|
9
|
+
# camel-casing throughout the remainder of the name.
|
10
|
+
#
|
11
|
+
|
12
|
+
require_relative 'defaultvalues'
|
13
|
+
|
14
|
+
module ChefWorkstationInitialize
|
15
|
+
module SelfBootstrap
|
16
|
+
module WithLogger
|
17
|
+
module WorkstationResourceHelpers
|
18
|
+
include ChefWorkstationInitialize::SelfBootstrap::WithLogger::DefaultValuesHelpers
|
19
|
+
|
20
|
+
class ChefLoggerResource < ChefWorkstationInitialize::SelfBootstrap::WithChef::WorkstationResourceHelpers::ChefConfigResource
|
21
|
+
include ChefWorkstationInitialize::SelfBootstrap::WithLogger
|
22
|
+
|
23
|
+
def [](key)
|
24
|
+
debug_worklog('Searching config key" ' + key.to_s + '"') unless key.to_s == 'debug'
|
25
|
+
if default_workstation_resource.key?(key)
|
26
|
+
default_workstation_resource[key]
|
27
|
+
elsif default_workstation_resource.key?(key.to_s)
|
28
|
+
default_workstation_resource[key.to_s]
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def get_workstation
|
34
|
+
debug_worklog "Get workstation from #{self.class}"
|
35
|
+
@workstation = ChefLoggerResource.new if @workstation.nil?
|
36
|
+
@workstation
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
# The module you have defined may be extended within the recipe to grant the
|
45
|
+
# recipe the helper methods you define.
|
46
|
+
#
|
47
|
+
# Within your recipe you would write:
|
48
|
+
#
|
49
|
+
# extend ChefWorkstationInitialize::WorkstationHelpers
|
50
|
+
#
|
51
|
+
# my_helper_method
|
52
|
+
#
|
53
|
+
# You may also add this to a single resource within a recipe:
|
54
|
+
#
|
55
|
+
# template '/etc/app.conf' do
|
56
|
+
# extend ChefWorkstationInitialize::WorkstationHelpers
|
57
|
+
# variables specific_key: my_helper_method
|
58
|
+
# end
|
59
|
+
#
|
@@ -0,0 +1,52 @@
|
|
1
|
+
#
|
2
|
+
# Chef Infra Documentation
|
3
|
+
# https://docs.chef.io/libraries/
|
4
|
+
#
|
5
|
+
|
6
|
+
#
|
7
|
+
# This module name was auto-generated from the cookbook name. This name is a
|
8
|
+
# single word that starts with a capital letter and then continues to use
|
9
|
+
# camel-casing throughout the remainder of the name.
|
10
|
+
#
|
11
|
+
|
12
|
+
require 'withchef'
|
13
|
+
require_relative 'withlogger/selfbootstrap'
|
14
|
+
|
15
|
+
module ChefWorkstationInitialize
|
16
|
+
module SelfBootstrap
|
17
|
+
if respond_to? 'logger'
|
18
|
+
include ChefWorkstationInitialize::SelfBootstrap::WithLogger
|
19
|
+
else
|
20
|
+
include ChefWorkstationInitialize::SelfBootstrap::WithChef
|
21
|
+
end
|
22
|
+
|
23
|
+
module WithLogger
|
24
|
+
include ChefWorkstationInitialize::SelfBootstrap::WithLogger::SelfBootstrapHelpers
|
25
|
+
#
|
26
|
+
# Define the methods that you would like to assist the work you do in recipes,
|
27
|
+
# resources, or templates.
|
28
|
+
#
|
29
|
+
# def my_helper_method
|
30
|
+
# # help method implementation
|
31
|
+
# end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
#
|
37
|
+
# The module you have defined may be extended within the recipe to grant the
|
38
|
+
# recipe the helper methods you define.
|
39
|
+
#
|
40
|
+
# Within your recipe you would write:
|
41
|
+
#
|
42
|
+
# extend ChefWorkstationInitialize::SelfBootstrap::WithChefHelpers
|
43
|
+
#
|
44
|
+
# my_helper_method
|
45
|
+
#
|
46
|
+
# You may also add this to a single resource within a recipe:
|
47
|
+
#
|
48
|
+
# template '/etc/app.conf' do
|
49
|
+
# extend ChefWorkstationInitialize::SelfBootstrap::WithChefHelpers
|
50
|
+
# variables specific_key: my_helper_method
|
51
|
+
# end
|
52
|
+
#
|
@@ -0,0 +1,132 @@
|
|
1
|
+
#
|
2
|
+
# Chef Infra Documentation
|
3
|
+
# https://docs.chef.io/libraries/
|
4
|
+
#
|
5
|
+
|
6
|
+
#
|
7
|
+
# This module name was auto-generated from the cookbook name. This name is a
|
8
|
+
# single word that starts with a capital letter and then continues to use
|
9
|
+
# camel-casing throughout the remainder of the name.
|
10
|
+
#
|
11
|
+
|
12
|
+
require_relative 'selfbootstrap/withlogger'
|
13
|
+
|
14
|
+
module ChefWorkstationInitialize
|
15
|
+
module SelfBootstrap
|
16
|
+
def self.bootstrap
|
17
|
+
extend ChefWorkstationInitialize::SelfBootstrap::NoChef
|
18
|
+
get_workstation.selfbootstrap
|
19
|
+
end
|
20
|
+
|
21
|
+
class ::Array
|
22
|
+
def deep_merge(second)
|
23
|
+
if second.is_a?(Array)
|
24
|
+
self | v2
|
25
|
+
else
|
26
|
+
self
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
class ::Hash
|
32
|
+
def deep_merge(second)
|
33
|
+
merger = proc do |key, v1, v2|
|
34
|
+
if v1.is_a?(Hash) && v2.is_a?(Hash)
|
35
|
+
v1.deep_merge(v2)
|
36
|
+
elsif v1.is_a?(Array) && v2.is_a?(Array)
|
37
|
+
v1 | v2
|
38
|
+
elsif [:undefined, nil, :nil].include?(v2)
|
39
|
+
v1
|
40
|
+
else
|
41
|
+
v2
|
42
|
+
end
|
43
|
+
end
|
44
|
+
merge(second, &merger)
|
45
|
+
end
|
46
|
+
|
47
|
+
def stringify_keys!
|
48
|
+
stringify_keys(self)
|
49
|
+
end
|
50
|
+
|
51
|
+
def stringify_keys(otherhash)
|
52
|
+
if otherhash.is_a? Hash
|
53
|
+
otherhash.map do |k, v|
|
54
|
+
new_v = v.is_a?(Hash) ? stringify_keys(v) : v
|
55
|
+
[k.to_s, new_v]
|
56
|
+
end.to_h
|
57
|
+
else
|
58
|
+
otherhash
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def symbolify_keys!
|
63
|
+
symbolify_keys(self)
|
64
|
+
end
|
65
|
+
|
66
|
+
def symbolify_keys(otherhash)
|
67
|
+
if otherhash.is_a? Hash
|
68
|
+
otherhash.map do |k, v|
|
69
|
+
new_v = v.is_a?(Hash) ? symbolify_keys(v) : v
|
70
|
+
[k.to_sym, new_v]
|
71
|
+
end.to_h
|
72
|
+
else
|
73
|
+
otherhash
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
def depth_nil?(*names)
|
78
|
+
return false if names.empty?
|
79
|
+
return true if self[names.pop].nil?
|
80
|
+
|
81
|
+
depth_nil?(names)
|
82
|
+
end
|
83
|
+
|
84
|
+
def ivars_excluded_from_hashify
|
85
|
+
@ivars_excluded_from_hash ||= []
|
86
|
+
end
|
87
|
+
|
88
|
+
def hashify
|
89
|
+
hash = {}
|
90
|
+
excluded_ivars = ivars_excluded_from_hashify
|
91
|
+
|
92
|
+
# Iterate over all the instance variables and store their
|
93
|
+
# names and values in a hash
|
94
|
+
each do |key, value|
|
95
|
+
next if excluded_ivars.include? key.to_s
|
96
|
+
value = value.map(&:hashify) if value.is_a? Array
|
97
|
+
value = value.hashify if value.is_a? Hash
|
98
|
+
|
99
|
+
hash[key.to_s] = value.to_s
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
def yaml_output
|
104
|
+
yaml_convert = ''
|
105
|
+
to_yaml.each_line do |line|
|
106
|
+
unless line.include? '---'
|
107
|
+
yaml_convert += line
|
108
|
+
end
|
109
|
+
end
|
110
|
+
yaml_convert
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
#
|
117
|
+
# The module you have defined may be extended within the recipe to grant the
|
118
|
+
# recipe the helper methods you define.
|
119
|
+
#
|
120
|
+
# Within your recipe you would write:
|
121
|
+
#
|
122
|
+
# extend ChefWorkstationInitialize::WorkstationHelpers
|
123
|
+
#
|
124
|
+
# my_helper_method
|
125
|
+
#
|
126
|
+
# You may also add this to a single resource within a recipe:
|
127
|
+
#
|
128
|
+
# template '/etc/app.conf' do
|
129
|
+
# extend ChefWorkstationInitialize::WorkstationHelpers
|
130
|
+
# variables specific_key: my_helper_method
|
131
|
+
# end
|
132
|
+
#
|
data.tar.gz.sig
ADDED
Binary file
|
metadata
ADDED
@@ -0,0 +1,117 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: selfbootstrap
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jimmy Provencher
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFqaW1t
|
14
|
+
eS5wcm92ZW5jaGVyL0RDPWhvdG1haWwvREM9Y2EwHhcNMjIxMDE4MjExMjAwWhcN
|
15
|
+
MjMxMDE4MjExMjAwWjAsMSowKAYDVQQDDCFqaW1teS5wcm92ZW5jaGVyL0RDPWhv
|
16
|
+
dG1haWwvREM9Y2EwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQCex0r1
|
17
|
+
ngWBVriaiIpaW08qeFeaCMqRlotYWvXA4M796ahhyE0HUAz8IfqXyZL9FU3lyOW2
|
18
|
+
AdtO8ISR0W1nwOn3hJj6KL+KDylHP0Ih3k7pI7NysaBxi3QlpWSVOw+DOJA2OsLm
|
19
|
+
W/a9ZTeRigHiLkq4ZGIYiJFw7LhZSC1onXkGXu7vjST0ZFGL75z7kg+7zVRdB8IB
|
20
|
+
LwfwU93VPlRdNSBu4D3te0A6jN+Gvh2zvAKqd5muxT2869R0AaSDDeXyn70CbQry
|
21
|
+
AgXwO62Zl0whs5SYKZT4SHTsKPPEvIaj9UXJ863/lvxUQaqvpl+w+I/JvWaBcUS5
|
22
|
+
Ym+11VgydPyPZUiJN9EsvJJw9SuxjOXFtoGBVJ5SC3bgHeN6n74c8TCoH0IzZYlE
|
23
|
+
NLdQLw673cC4PkU2TRLYd9hKkH/0br/uxFiIcKjb0NfGERjZhYNugYNPCUzeYiM7
|
24
|
+
s4azT0a9oAbTVDjObG6M1xwOstnrdJtRaYDCswjVVtusAI10kNj4pvLVndECAwEA
|
25
|
+
AaOBijCBhzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUXwYB8v7w
|
26
|
+
YzFbhswW02omiSMDHBAwJgYDVR0RBB8wHYEbamltbXkucHJvdmVuY2hlckBob3Rt
|
27
|
+
YWlsLmNhMCYGA1UdEgQfMB2BG2ppbW15LnByb3ZlbmNoZXJAaG90bWFpbC5jYTAN
|
28
|
+
BgkqhkiG9w0BAQsFAAOCAYEAecUO+U9BJ90Lz75iwpvmHjAy8CixyATIEb1iw/t2
|
29
|
+
tKa/XYQN8gRvYPIESWI0cgeakOZjQvlv4CUAvSwNonteXEIHUqj5p4zdGYgCQyrv
|
30
|
+
XmlGFnzoYtCwXDPWBiVZ11NyKFl8g27c3JV6mNGaWoY/zbZYtifxo6Iv8l7MDpPq
|
31
|
+
BXDjxEsM3sPAjRnH5UGt8gFF+0qHPVDPrJSnrHYj2StSkD/k+YGFTkbr6QEVlzMa
|
32
|
+
oQ9rnGKTcTyuNDtwL8dI2+Ay10miwo9UYFUMcFQ6UCo6QhRfCrxiTeHd8F6Mz+2o
|
33
|
+
FR9USF33SMWVcExLE3wwJaEEh93XbEW8flLD3MkSILSXVG2yuJ0aLMPbfJFIErhy
|
34
|
+
Lx8rvDe6SWVyoIUMM8rJbzSPV2I9w9evPUTmJu8QQLNMzMaWwWJqTG93AZBAdWlY
|
35
|
+
+V3ectLBpuoKM8f/ZFMnUPA0mAv5e7J6u9IBwyNj/cy+wLOAbpPdmhoKZXCpQcno
|
36
|
+
ysBBJbi//0tgFWwC4vOaDMch
|
37
|
+
-----END CERTIFICATE-----
|
38
|
+
date: 2022-10-18 00:00:00.000000000 Z
|
39
|
+
dependencies: []
|
40
|
+
description: Using Chef cookbook style and force any script using it to switch to
|
41
|
+
chef even if it is not install. It will install it tho ;)
|
42
|
+
email:
|
43
|
+
- maintainers@localhost.local
|
44
|
+
executables:
|
45
|
+
- selfbootstrap
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files:
|
48
|
+
- README.md
|
49
|
+
- LICENSE
|
50
|
+
files:
|
51
|
+
- LICENSE
|
52
|
+
- README.md
|
53
|
+
- bin/selfbootstrap
|
54
|
+
- certs/public/jimbodragon.pem
|
55
|
+
- lib/selfbootstrap.rb
|
56
|
+
- lib/selfbootstrap/nochef.rb
|
57
|
+
- lib/selfbootstrap/nochef/berks.rb
|
58
|
+
- lib/selfbootstrap/nochef/chef.rb
|
59
|
+
- lib/selfbootstrap/nochef/chefrepo.rb
|
60
|
+
- lib/selfbootstrap/nochef/commandline.rb
|
61
|
+
- lib/selfbootstrap/nochef/defaultvalues.rb
|
62
|
+
- lib/selfbootstrap/nochef/defaultworkstationresource.rb
|
63
|
+
- lib/selfbootstrap/nochef/git.rb
|
64
|
+
- lib/selfbootstrap/nochef/kitchen.rb
|
65
|
+
- lib/selfbootstrap/nochef/knife.rb
|
66
|
+
- lib/selfbootstrap/nochef/platforms.rb
|
67
|
+
- lib/selfbootstrap/nochef/provisioners.rb
|
68
|
+
- lib/selfbootstrap/nochef/selfbootstrap.rb
|
69
|
+
- lib/selfbootstrap/nochef/ssh.rb
|
70
|
+
- lib/selfbootstrap/nochef/suites.rb
|
71
|
+
- lib/selfbootstrap/nochef/update.rb
|
72
|
+
- lib/selfbootstrap/nochef/users.rb
|
73
|
+
- lib/selfbootstrap/nochef/verifiers.rb
|
74
|
+
- lib/selfbootstrap/nochef/workstation.rb
|
75
|
+
- lib/selfbootstrap/nochef/workstationresource.rb
|
76
|
+
- lib/selfbootstrap/withchef.rb
|
77
|
+
- lib/selfbootstrap/withchef/chef.rb
|
78
|
+
- lib/selfbootstrap/withchef/chefrepo.rb
|
79
|
+
- lib/selfbootstrap/withchef/commandline.rb
|
80
|
+
- lib/selfbootstrap/withchef/defaultvalues.rb
|
81
|
+
- lib/selfbootstrap/withchef/git.rb
|
82
|
+
- lib/selfbootstrap/withchef/selfbootstrap.rb
|
83
|
+
- lib/selfbootstrap/withchef/users.rb
|
84
|
+
- lib/selfbootstrap/withchef/workstation.rb
|
85
|
+
- lib/selfbootstrap/withchef/workstationresource.rb
|
86
|
+
- lib/selfbootstrap/withlogger.rb
|
87
|
+
- lib/selfbootstrap/withlogger/defaultvalues.rb
|
88
|
+
- lib/selfbootstrap/withlogger/selfbootstrap.rb
|
89
|
+
- lib/selfbootstrap/withlogger/workstationresource.rb
|
90
|
+
homepage: https://localhost.local/selfbootstrap
|
91
|
+
licenses:
|
92
|
+
- MIT
|
93
|
+
metadata:
|
94
|
+
bug_tracker_uri: https://localhost.local/selfbootstrap/issues
|
95
|
+
changelog_uri: https://localhost.local/selfbootstrap/releases
|
96
|
+
homepage_uri: https://localhost.local/selfbootstrap
|
97
|
+
post_install_message:
|
98
|
+
rdoc_options:
|
99
|
+
- "--charset=UTF-8"
|
100
|
+
require_paths:
|
101
|
+
- lib/
|
102
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '0'
|
107
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
requirements: []
|
113
|
+
rubygems_version: 3.2.32
|
114
|
+
signing_key:
|
115
|
+
specification_version: 4
|
116
|
+
summary: A auto chef bootstrapper and wrapper cookbook to deploy code
|
117
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|