|
49 | 49 | _valid_pem_path = os.path.join(CHEF_CONFIG_PATH, 'validation.pem') |
50 | 50 | CHEF_VALIDATION_KEY = subprocess.check_output( |
51 | 51 | ['/bin/cat', _valid_pem_path]).strip('\n') |
52 | | - # write out knife template |
53 | | - if not os.path.exists('.chef'): |
54 | | - os.mkdir('.chef') |
55 | | - _template_src = os.path.abspath(os.path.join(__file__, '..', 'ubuntu12.04-gems.erb')) |
56 | | - with open(_template_src) as src: |
57 | | - _knife_template = os.path.abspath(os.path.join('.chef', 'knife-template.erb')) |
58 | | - with open(_knife_template, 'w') as f: |
59 | | - f.write(src.read()) |
60 | 52 | except Exception as err: |
61 | 53 | msg = "Failed to auto-configure Chef -- {}".format(err) |
62 | 54 | if os.environ.get('READTHEDOCS'): |
@@ -99,7 +91,6 @@ def bootstrap_node(node): |
99 | 91 | # build knife bootstrap command |
100 | 92 | args = ['knife', 'bootstrap', node['fqdn']] |
101 | 93 | args.extend(['--config', '/etc/chef/client.rb']) |
102 | | - args.extend(['--template-file', '.chef/knife-template.erb']) |
103 | 94 | args.extend(['--identity-file', pk_path]) |
104 | 95 | args.extend(['--node-name', node['id']]) |
105 | 96 | args.extend(['--sudo', '--ssh-user', node['ssh_username']]) |
|
0 commit comments