We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7740d7f + b666811 commit 07b8577Copy full SHA for 07b8577
1 file changed
cm/chef.py
@@ -9,6 +9,7 @@
9
import subprocess
10
import tempfile
11
import time
12
+import socket
13
14
from celery.canvas import group
15
@@ -37,8 +38,8 @@
37
38
_d[m[0]] = m[1].strip("'").strip('"')
39
# set global variables from client.rb
40
CHEF_SERVER_URL = _d['chef_server_url']
- CHEF_NODE_NAME = _d['node_name']
41
- CHEF_CLIENT_NAME = _d['node_name']
+ CHEF_NODE_NAME = _d.get('node_name', socket.hostname())
42
+ CHEF_CLIENT_NAME = _d.get('node_name', socket.hostname())
43
CHEF_VALIDATION_NAME = _d['validation_client_name']
44
# read the client key
45
_client_pem_path = os.path.join(CHEF_CONFIG_PATH, 'client.pem')
0 commit comments