shiplane_bootstrappers_chef 0.1.18 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dcc628bc298639d873b9cea78cb1ee645e84c659a4bea1956f1d9c350b6b04b7
4
- data.tar.gz: cde982940aac78aa5b35df49180401fa311d7d36e6710a21abac11d2598fd347
3
+ metadata.gz: 1451a74466fca827914195ec0d3cc14ae82beeceb548bd4e1d99c2092c035446
4
+ data.tar.gz: d81665d8edd1ddd696c2991776a53a3b89abf0ba55b2571dbba5148d6f61c711
5
5
  SHA512:
6
- metadata.gz: 0c59d0a29925e08f9f0076fab3ad920c104275c7653c6415b63d255d78509d0e627c038b150e2bd095c1f1eb2774d3eef2240b77de1fc77acc804f684ace6a20
7
- data.tar.gz: 13db566054b8399229785fc46982586979321e2d28d8aa3245fed558bcf586f432513d7cfdca19d22e5f2e8f1ee818ca1b038b9b5b1ebd4a16bc0a285ead4cff
6
+ metadata.gz: d7da41d8aa8cc3c65fdb5b9f7b79420b4a6bcca1e17466719e090acc8810881e64c6ab0296f4b56d07b5b7d5bb84cfa4390f24cae0ac119109b09e178fb83047
7
+ data.tar.gz: 65dd0b85a3db69e5ee288b7695bd0275579c04df3384c7daacc505be0a700b7caa4f4253116005a453846cceb5ea0fc82d8d9b1cdf303485711ed91ef1f2bafa
data/cookbooks.tar.gz CHANGED
Binary file
@@ -28,6 +28,8 @@ module Shiplane
28
28
  end
29
29
 
30
30
  unless install_finished
31
+ execute :sudo, :sysctl, "-w", "net.ipv6.conf.all.disable_ipv6=1", interaction_handler: context_variables[:interaction_handler]
32
+ execute :sudo, :sysctl, "-w", "net.ipv6.conf.default.disable_ipv6=1", interaction_handler: context_variables[:interaction_handler]
31
33
  execute :sudo, :mkdir, '-m', '2777', '-p', Shiplane::ChefHost::REMOTE_CHEF_FOLDER_PATH, interaction_handler: context_variables[:interaction_handler]
32
34
  execute :sudo, :touch, File.join(Shiplane::ChefHost::REMOTE_CHEF_FOLDER_PATH, '.install-started'), interaction_handler: context_variables[:interaction_handler]
33
35
  execute :sudo, 'apt-get', 'update', interaction_handler: context_variables[:interaction_handler]
@@ -36,6 +38,20 @@ module Shiplane
36
38
  execute :sudo, :dpkg, '-i', Shiplane::ChefHost::CHEF_PACKAGE_NAME, interaction_handler: context_variables[:interaction_handler]
37
39
  execute :sudo, :ls, '-al', Shiplane::ChefHost::REMOTE_CHEF_FOLDER_PATH, interaction_handler: context_variables[:interaction_handler]
38
40
  execute :sudo, :touch, File.join(Shiplane::ChefHost::REMOTE_CHEF_FOLDER_PATH, '.install'), interaction_handler: context_variables[:interaction_handler]
41
+ execute :sudo, :sysctl, "-w", "net.ipv6.conf.all.disable_ipv6=0", interaction_handler: context_variables[:interaction_handler]
42
+ execute :sudo, :sysctl, "-w", "net.ipv6.conf.default.disable_ipv6=0", interaction_handler: context_variables[:interaction_handler]
43
+ end
44
+ end
45
+ end
46
+ end
47
+
48
+ def reinstall
49
+ with_context do
50
+ SSHKit::Coordinator.new(host).each in: :parallel do
51
+ context_variables = fetch(:shiplane_sshkit_values)
52
+
53
+ if(test("[ -f #{File.join(Shiplane::ChefHost::REMOTE_CHEF_FOLDER_PATH, '.install')} ]"))
54
+ execute :sudo, :rm, File.join(Shiplane::ChefHost::REMOTE_CHEF_FOLDER_PATH, '.install'), interaction_handler: context_variables[:interaction_handler]
39
55
  end
40
56
  end
41
57
  end
@@ -48,7 +64,7 @@ module Shiplane
48
64
  context_variables = fetch(:shiplane_sshkit_values)
49
65
 
50
66
  begin
51
- execute :sudo, 'chef-solo', '-c', "#{Shiplane::ChefHost::REMOTE_CHEF_FOLDER_PATH}/solo.rb", interaction_handler: context_variables[:interaction_handler]
67
+ execute :sudo, 'chef-solo', '-c', "#{Shiplane::ChefHost::REMOTE_CHEF_FOLDER_PATH}/solo.rb", "--chef-license", "accept", interaction_handler: context_variables[:interaction_handler]
52
68
  rescue => e
53
69
  errors["#{h}"] = Shiplane::ChefErrorParser.parse(e)
54
70
  end
@@ -3,14 +3,16 @@ namespace :shiplane do
3
3
  task :bootstrap, [:role] => ['bootstrap:default']
4
4
 
5
5
  namespace :bootstrap do
6
- task :default, [:role] do |task, args|
6
+ task :setup, [:role] do |task, args|
7
7
  filter = args.fetch('role', 'all')
8
8
  hosts = roles(filter).map do |host|
9
9
  Shiplane::ChefHost.new(host, env)
10
10
  end
11
11
 
12
12
  set :shiplane_hosts, hosts
13
+ end
13
14
 
15
+ task :default, [:role] => :setup do |task, args|
14
16
  %w{ prepare install configure cleanup }.each do |task|
15
17
  invoke "shiplane:bootstrap:#{task}"
16
18
  end
@@ -22,6 +24,12 @@ namespace :shiplane do
22
24
  task :install do
23
25
  end
24
26
 
27
+ task reinstall: :setup do
28
+ %w{ prepare reinstall install configure cleanup }.each do |task|
29
+ invoke "shiplane:bootstrap:#{task}"
30
+ end
31
+ end
32
+
25
33
  task :configure do
26
34
  end
27
35
 
@@ -3,7 +3,7 @@
3
3
  module Shiplane
4
4
  module Bootstrappers
5
5
  module Chef
6
- VERSION = "0.1.18"
6
+ VERSION = "0.2.2"
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shiplane_bootstrappers_chef
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.18
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Epperson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-27 00:00:00.000000000 Z
11
+ date: 2021-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -142,7 +142,7 @@ homepage: https://github.com/kirillian/shiplane
142
142
  licenses:
143
143
  - MIT
144
144
  metadata: {}
145
- post_install_message:
145
+ post_install_message:
146
146
  rdoc_options: []
147
147
  require_paths:
148
148
  - lib
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  version: '0'
159
159
  requirements: []
160
160
  rubygems_version: 3.0.3
161
- signing_key:
161
+ signing_key:
162
162
  specification_version: 4
163
163
  summary: A toolbox for converting developer docker-compose files into production-ready
164
164
  images.