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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d34726ed0b909efc94a80fcf64b341c654760659
|
4
|
+
data.tar.gz: 2a16de554e8f5342ba85ea520f13eb5677603de5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|