shiplane_bootstrappers_chef 0.1.17 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e73efb5c33076c08190ddba8bd2805b26229a2d696ddfb6822576da3c2aa241
4
- data.tar.gz: 443578f05780d176225cf6894f8274ed59c25fbfc5c6973e086120934f28a9f7
3
+ metadata.gz: 5fe1f75c03f93a6eea9dcdae551895142e99870678816466dabee58a7aa98ab9
4
+ data.tar.gz: 7bc832d002ca2abf1e5fe7513b997f9474275b46d88cd6763ad9e229f68ad39e
5
5
  SHA512:
6
- metadata.gz: 92b3b1e7bceb2b16178be927c6813f2c14f9d1ef09422aba9c49bb00d6f2eb3c2afb17ec4443ecadff4f942b4401ae52b933c65939a1ce2d5d292db8efa0a8da
7
- data.tar.gz: f1f7db726b0ac72fd742c2aa1181ad1ff2ca6174c733abcc173e0b6a3be39673a93b2d493d87c7fe793a18167543b02f43cc3ebefb48b8709b074013c707bbcd
6
+ metadata.gz: 887621840f9da686137cbd52530e0ef5aed503c153eade276b8149d1b066fca50856c72b15d74111592430e783f7e72d2536bd269807a918514bfacdc7d8a04c
7
+ data.tar.gz: f61a232a6e7d8378fcfdbd40d62952dd0ba8d1e6b0514249fa892f73e00392d1da8400c27f2032e45d4c32aceb5b4a96e2d3a4aadb99f9649b86d8f969798ce8
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
@@ -44,6 +60,7 @@ module Shiplane
44
60
  def configure
45
61
  with_context do
46
62
  errors = {}
63
+ SSHKit.config.default_env["CHEF_LICENSE"] = "accept"
47
64
  SSHKit::Coordinator.new(host).each in: :parallel do |h|
48
65
  context_variables = fetch(:shiplane_sshkit_values)
49
66
 
@@ -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.17"
6
+ VERSION = "0.2.5"
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.17
4
+ version: 0.2.5
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-26 00:00:00.000000000 Z
11
+ date: 2021-05-07 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.