chef-provisioner 0.0.7 → 0.0.8

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
  SHA1:
3
- metadata.gz: ce8e78ec7331c19904ad43b6053cd4dfaadce1ff
4
- data.tar.gz: 378ae43d73e77bf1d95aae7203a39e8f427d5432
3
+ metadata.gz: d34726ed0b909efc94a80fcf64b341c654760659
4
+ data.tar.gz: 2a16de554e8f5342ba85ea520f13eb5677603de5
5
5
  SHA512:
6
- metadata.gz: 11bef92455b04b0b33cff5f15382ab1736d6359f6cc8e42b63e999280402cd23d233d76cba831b1e3821dd1ce6fd8057464b9ecd50f2150614c788553de9240e
7
- data.tar.gz: 00953a906b563cc9c30121da9c843926a949dca31d9bdda59f0c527b3014e39c05a78d87959d7149717004759165c753760dfac3e45b434a2c51876d59b9a3ba
6
+ metadata.gz: 9f7a878f9bc249d271da890f6d7770e3c2877c8c0186a68e2d850514e3705f1c7ad6f6bdb9e25e7827991a7252d78e0507414d598867c19727f31695d6c4f6ae
7
+ data.tar.gz: e1566cb4e81214035d8027bacc9c601d688a523fbfc86fc469fa04a762eab380abed539655d6d67d81de50002e1d059a4d41e71bb39cb3b08130e32847223d0a
@@ -9,14 +9,14 @@ module ChefProvisioner
9
9
  extend self
10
10
  BOOTSTRAP_TEMPLATE = File.read(File.expand_path('../../chef-provisioner/templates/bootstrap.erb', __FILE__)).freeze
11
11
 
12
- def generate(node_name: '', chef_version: '12.4.1', environment: nil, server: '', first_boot: {})
12
+ def generate(node_name: '', chef_version: '12.4.1', environment: nil, server: '', first_boot: {}, reinstall: false)
13
13
  node_name = node_name.strip
14
14
  server = ChefAPI.endpoint if server.empty?
15
15
  run_list = first_boot[:run_list] if first_boot[:run_list] # FIXME - symbolize keys instead of the dup here
16
16
  run_list = first_boot['run_list'] if first_boot['run_list']
17
17
  client_pem = ChefProvisioner::Chef.init_server(node_name, run_list: (run_list || []))
18
18
  first_boot.merge!( fqdn: node_name, chef_client: {config: {chef_server_url: server}} )
19
- render(node_name: node_name, client_pem: client_pem, chef_version: chef_version, environment: environment, server: server, first_boot: first_boot)
19
+ render(node_name: node_name, client_pem: client_pem, chef_version: chef_version, environment: environment, server: server, first_boot: first_boot, reinstall: reinstall)
20
20
  end
21
21
 
22
22
  private
@@ -4,7 +4,7 @@ set -x
4
4
  set -e
5
5
 
6
6
  # Install chef
7
- curl -L https://www.opscode.com/chef/install.sh | sudo bash /dev/stdin -v <%= chef_version %>
7
+ <%= "[ -z \"$(dpkg -s chef | grep 'ok installed')\" ] &&" unless force_install %> curl -L https://www.opscode.com/chef/install.sh | sudo bash /dev/stdin -v <%= chef_version %>
8
8
  rm -rf /etc/chef
9
9
  mkdir -p /etc/chef
10
10
 
@@ -1,4 +1,4 @@
1
1
  # Namespace for our gem
2
2
  module ChefProvisioner
3
- VERSION = '0.0.7'
3
+ VERSION = '0.0.8'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-provisioner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dale Hamel