chef-cli 3.0.32 → 3.0.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chef-cli/command/generator_commands/cookbook.rb +5 -0
- data/lib/chef-cli/skeletons/code_generator/files/default/gitignore +1 -1
- data/lib/chef-cli/skeletons/code_generator/files/default/repo/README.md +3 -3
- data/lib/chef-cli/skeletons/code_generator/recipes/cookbook.rb +15 -2
- data/lib/chef-cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e62dfc227a16206b504aa0a8838d2e1960e38573e0d1f2646fc4e14b1e174df
|
4
|
+
data.tar.gz: cfca788e2ae2a92d7014d62c4fc65c20d20cbe9b57a9c8bad24e342f70262167
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4adff5f07ea9bf2fee6933c5b2f91eeebd2ceab36ba27c72f3ddf38555ce43940e31f7975c5cf3df1a0869f6d548869af33dd1fc70e30e1223b3c70634a5aad
|
7
|
+
data.tar.gz: a3c7f7187f9ee410517c4a81bd4160ef0f55cb3101b7197ef3c0d902e01863356ce5f8e35c52c15213b53e3680c17996d4a1eb13bb1ce4d9a30335e32858e72a
|
@@ -137,6 +137,7 @@ module ChefCLI
|
|
137
137
|
Generator.add_attr_to_context(:use_policyfile, policy_mode?)
|
138
138
|
Generator.add_attr_to_context(:pipeline, pipeline)
|
139
139
|
Generator.add_attr_to_context(:kitchen, kitchen)
|
140
|
+
Generator.add_attr_to_context(:vscode_dir, create_vscode_dir?)
|
140
141
|
end
|
141
142
|
|
142
143
|
def kitchen
|
@@ -235,6 +236,10 @@ module ChefCLI
|
|
235
236
|
end
|
236
237
|
false
|
237
238
|
end
|
239
|
+
|
240
|
+
def create_vscode_dir?
|
241
|
+
::File.exist?("/Applications/Visual Studio Code.app") || ::File.exist?("#{ENV["APPDATA"]}\\Code")
|
242
|
+
end
|
238
243
|
end
|
239
244
|
end
|
240
245
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Every Chef Infra installation needs a Chef Repository. This is the place where cookbooks, policyfiles, config files and other artifacts for managing systems with Chef Infra will live. We strongly recommend storing this repository in a version control system such as Git and treating it like source code.
|
4
4
|
|
5
|
-
|
5
|
+
## Repository Directories
|
6
6
|
|
7
7
|
This repository contains several directories, and each directory contains a README file that describes what it is for in greater detail, and how to use it for managing your systems with Chef.
|
8
8
|
|
@@ -11,10 +11,10 @@ This repository contains several directories, and each directory contains a READ
|
|
11
11
|
- `roles/` - Store roles in .rb or .json in the repository.
|
12
12
|
- `environments/` - Store environments in .rb or .json in the repository.
|
13
13
|
|
14
|
-
|
14
|
+
## Configuration
|
15
15
|
|
16
16
|
The config file, `.chef/config.rb` is a repository-specific configuration file for the knife command line tool. If you're using the Hosted Chef platform, you can download one for your organization from the management console. You can also generate a new config.rb by running `knife configure`. For more information about configuring Knife, see the Knife documentation at https://docs.chef.io/workstation/knife/
|
17
17
|
|
18
|
-
|
18
|
+
## Next Steps
|
19
19
|
|
20
20
|
Read the README file in each of the subdirectories for more information about what goes in those directories.
|
@@ -91,7 +91,7 @@ template "#{cookbook_dir}/test/integration/default/default_test.rb" do
|
|
91
91
|
action :create_if_missing
|
92
92
|
end
|
93
93
|
|
94
|
-
#
|
94
|
+
# ChefSpec
|
95
95
|
directory "#{cookbook_dir}/spec/unit/recipes" do
|
96
96
|
recursive true
|
97
97
|
end
|
@@ -113,7 +113,6 @@ template "#{cookbook_dir}/spec/unit/recipes/default_spec.rb" do
|
|
113
113
|
end
|
114
114
|
|
115
115
|
# Recipes
|
116
|
-
|
117
116
|
directory "#{cookbook_dir}/recipes"
|
118
117
|
|
119
118
|
template "#{cookbook_dir}/recipes/default.rb" do
|
@@ -164,4 +163,18 @@ if context.have_git
|
|
164
163
|
end
|
165
164
|
end
|
166
165
|
|
166
|
+
if context.vscode_dir
|
167
|
+
directory "#{cookbook_dir}/.vscode"
|
168
|
+
|
169
|
+
file "#{cookbook_dir}/.vscode/extensions.json" do
|
170
|
+
content <<~CONTENT
|
171
|
+
{
|
172
|
+
"recommendations": [
|
173
|
+
"chef-software.chef"
|
174
|
+
]
|
175
|
+
}
|
176
|
+
CONTENT
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
167
180
|
include_recipe '::build_cookbook' if context.enable_workflow
|
data/lib/chef-cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef Software, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-cli
|