chefspec 4.2.0 → 4.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +39 -16
- data/CHANGELOG.md +136 -72
- data/README.md +187 -13
- data/chefspec.gemspec +5 -5
- data/examples/batch/spec/run_spec.rb +5 -0
- data/examples/chef_gem/recipes/install.rb +8 -3
- data/examples/chef_gem/recipes/purge.rb +6 -3
- data/examples/chef_gem/recipes/reconfig.rb +6 -3
- data/examples/chef_gem/recipes/remove.rb +6 -3
- data/examples/chef_gem/recipes/upgrade.rb +6 -3
- data/examples/chocolatey_package/recipes/install.rb +6 -0
- data/examples/chocolatey_package/recipes/remove.rb +8 -0
- data/examples/chocolatey_package/recipes/upgrade.rb +8 -0
- data/examples/chocolatey_package/spec/install_spec.rb +21 -0
- data/examples/chocolatey_package/spec/remove_spec.rb +20 -0
- data/examples/chocolatey_package/spec/upgrade_spec.rb +20 -0
- data/examples/directory/recipes/create.rb +4 -0
- data/examples/directory/spec/create_spec.rb +4 -0
- data/examples/dpkg_package/spec/install_spec.rb +5 -0
- data/examples/dpkg_package/spec/purge_spec.rb +5 -0
- data/examples/dpkg_package/spec/remove_spec.rb +5 -0
- data/examples/dsc_resource/recipes/default.rb +20 -0
- data/examples/dsc_resource/spec/default_spec.rb +40 -0
- data/examples/env/spec/create_spec.rb +5 -0
- data/examples/env/spec/delete_spec.rb +5 -0
- data/examples/env/spec/modify_spec.rb +5 -0
- data/examples/ips_package/spec/install_spec.rb +5 -0
- data/examples/ips_package/spec/remove_spec.rb +5 -0
- data/examples/ips_package/spec/upgrade_spec.rb +5 -0
- data/examples/package/recipes/install.rb +4 -0
- data/examples/package/recipes/purge.rb +4 -0
- data/examples/package/recipes/reconfig.rb +4 -0
- data/examples/package/recipes/remove.rb +4 -0
- data/examples/package/recipes/upgrade.rb +4 -0
- data/examples/package/spec/install_spec.rb +4 -0
- data/examples/package/spec/purge_spec.rb +4 -0
- data/examples/package/spec/reconfig_spec.rb +4 -0
- data/examples/package/spec/remove_spec.rb +4 -0
- data/examples/package/spec/upgrade_spec.rb +4 -0
- data/examples/pacman_package/spec/install_spec.rb +5 -0
- data/examples/pacman_package/spec/purge_spec.rb +5 -0
- data/examples/pacman_package/spec/remove_spec.rb +5 -0
- data/examples/pacman_package/spec/upgrade_spec.rb +5 -0
- data/examples/powershell_script/spec/run_spec.rb +5 -0
- data/examples/reboot/recipes/cancel.rb +3 -0
- data/examples/reboot/recipes/now.rb +3 -0
- data/examples/reboot/recipes/request.rb +3 -0
- data/examples/reboot/spec/cancel_spec.rb +10 -0
- data/examples/reboot/spec/now_spec.rb +10 -0
- data/examples/reboot/spec/request_spec.rb +10 -0
- data/examples/render_file/spec/default_spec.rb +40 -0
- data/examples/rpm_package/spec/install_spec.rb +5 -0
- data/examples/rpm_package/spec/remove_spec.rb +5 -0
- data/examples/rpm_package/spec/upgrade_spec.rb +5 -0
- data/examples/server/spec/node_spec.rb +1 -1
- data/examples/server/spec/search_spec.rb +4 -0
- data/examples/step_into/providers/provides.rb +3 -0
- data/examples/step_into/recipes/default.rb +2 -0
- data/examples/step_into/resources/lwrp.rb +1 -1
- data/examples/step_into/resources/provides.rb +6 -0
- data/examples/step_into/spec/default_spec.rb +10 -2
- data/examples/windows_package/recipes/install.rb +13 -0
- data/examples/windows_package/recipes/remove.rb +13 -0
- data/examples/windows_package/spec/install_spec.rb +24 -0
- data/examples/windows_package/spec/remove_spec.rb +24 -0
- data/examples/windows_service/recipes/configure_startup.rb +13 -0
- data/examples/windows_service/recipes/disable.rb +13 -0
- data/examples/windows_service/recipes/enable.rb +13 -0
- data/examples/windows_service/recipes/reload.rb +13 -0
- data/examples/windows_service/recipes/restart.rb +13 -0
- data/examples/windows_service/recipes/start.rb +13 -0
- data/examples/windows_service/recipes/stop.rb +13 -0
- data/examples/windows_service/spec/configure_startup_spec.rb +24 -0
- data/examples/windows_service/spec/disable_spec.rb +24 -0
- data/examples/windows_service/spec/enable_spec.rb +24 -0
- data/examples/windows_service/spec/reload_spec.rb +24 -0
- data/examples/windows_service/spec/restart_spec.rb +24 -0
- data/examples/windows_service/spec/start_spec.rb +24 -0
- data/examples/windows_service/spec/stop_spec.rb +24 -0
- data/features/chocolatey_package.feature +29 -0
- data/features/dsc_resource.feature +18 -0
- data/features/reboot.feature +19 -0
- data/features/step_definitions/background_steps.rb +4 -1
- data/features/step_into.feature +7 -0
- data/features/support/env.rb +5 -4
- data/features/windows_package.feature +24 -0
- data/features/windows_service.feature +23 -0
- data/gemfiles/chefspec.gemfile +9 -0
- data/lib/chefspec/api/chocolatey_package.rb +107 -0
- data/lib/chefspec/api/directory.rb +10 -10
- data/lib/chefspec/api/dsc_resource.rb +49 -0
- data/lib/chefspec/api/group.rb +5 -5
- data/lib/chefspec/api/link.rb +10 -10
- data/lib/chefspec/api/mdadm.rb +5 -5
- data/lib/chefspec/api/reboot.rb +18 -0
- data/lib/chefspec/api/remote_directory.rb +10 -10
- data/lib/chefspec/api/route.rb +5 -5
- data/lib/chefspec/api/user.rb +5 -5
- data/lib/chefspec/api/windows_package.rb +86 -0
- data/lib/chefspec/api/windows_service.rb +286 -0
- data/lib/chefspec/api.rb +5 -0
- data/lib/chefspec/berkshelf.rb +7 -1
- data/lib/chefspec/coverage/filters.rb +2 -1
- data/lib/chefspec/coverage.rb +1 -1
- data/lib/chefspec/deprecations.rb +6 -2
- data/lib/chefspec/errors.rb +4 -0
- data/lib/chefspec/extensions/chef/lwrp_base.rb +23 -0
- data/lib/chefspec/file_cache_path_proxy.rb +15 -0
- data/lib/chefspec/matchers/render_file_matcher.rb +20 -2
- data/lib/chefspec/matchers/resource_matcher.rb +9 -2
- data/lib/chefspec/mixins/normalize.rb +7 -1
- data/lib/chefspec/policyfile.rb +62 -0
- data/lib/chefspec/renderer.rb +2 -4
- data/lib/chefspec/rspec.rb +3 -0
- data/lib/chefspec/server_methods.rb +1 -0
- data/lib/chefspec/server_runner.rb +9 -0
- data/lib/chefspec/solo_runner.rb +13 -3
- data/lib/chefspec/version.rb +1 -1
- data/lib/chefspec.rb +1 -1
- data/spec/unit/coverage/filters_spec.rb +60 -0
- data/spec/unit/deprecations_spec.rb +3 -1
- data/spec/unit/macros_spec.rb +1 -1
- data/spec/unit/matchers/render_file_matcher_spec.rb +11 -0
- data/spec/unit/renderer_spec.rb +20 -2
- data/spec/unit/server_runner_spec.rb +28 -0
- data/spec/unit/solo_runner_spec.rb +3 -1
- data/templates/errors/invalid_berkshelf_options.erb +4 -0
- data/templates/errors/may_need_to_specify_platform.erb +25 -0
- metadata +72 -18
- data/gemfiles/chef-11.14.0.gemfile +0 -5
- data/gemfiles/chef-11.16.0.gemfile +0 -5
- data/gemfiles/chef-12.0.0.gemfile +0 -5
- data/gemfiles/chef-master.gemfile +0 -5
|
@@ -20,4 +20,8 @@ describe 'package::install' do
|
|
|
20
20
|
it 'installs a package when specifying the identity attribute' do
|
|
21
21
|
expect(chef_run).to install_package('identity_attribute')
|
|
22
22
|
end
|
|
23
|
+
|
|
24
|
+
it 'installs all packages when given an array of names' do
|
|
25
|
+
expect(chef_run).to install_package(['with', 'array'])
|
|
26
|
+
end
|
|
23
27
|
end
|
|
@@ -16,4 +16,8 @@ describe 'package::purge' do
|
|
|
16
16
|
it 'purges a package when specifying the identity attribute' do
|
|
17
17
|
expect(chef_run).to purge_package('identity_attribute')
|
|
18
18
|
end
|
|
19
|
+
|
|
20
|
+
it 'purges all packages when given an array of names' do
|
|
21
|
+
expect(chef_run).to purge_package(['with', 'array'])
|
|
22
|
+
end
|
|
19
23
|
end
|
|
@@ -16,4 +16,8 @@ describe 'package::reconfig' do
|
|
|
16
16
|
it 'reconfigs a package when specifying the identity attribute' do
|
|
17
17
|
expect(chef_run).to reconfig_package('identity_attribute')
|
|
18
18
|
end
|
|
19
|
+
|
|
20
|
+
it 'reconfigs all packages when given an array of names' do
|
|
21
|
+
expect(chef_run).to reconfig_package(['with', 'array'])
|
|
22
|
+
end
|
|
19
23
|
end
|
|
@@ -16,4 +16,8 @@ describe 'package::remove' do
|
|
|
16
16
|
it 'removes a package when specifying the identity attribute' do
|
|
17
17
|
expect(chef_run).to remove_package('identity_attribute')
|
|
18
18
|
end
|
|
19
|
+
|
|
20
|
+
it 'removes all packages when given an array of names' do
|
|
21
|
+
expect(chef_run).to remove_package(['with', 'array'])
|
|
22
|
+
end
|
|
19
23
|
end
|
|
@@ -16,4 +16,8 @@ describe 'package::upgrade' do
|
|
|
16
16
|
it 'upgrades a package when specifying the identity attribute' do
|
|
17
17
|
expect(chef_run).to upgrade_package('identity_attribute')
|
|
18
18
|
end
|
|
19
|
+
|
|
20
|
+
it 'upgrades all packages when given an array of names' do
|
|
21
|
+
expect(chef_run).to upgrade_package(['with', 'array'])
|
|
22
|
+
end
|
|
19
23
|
end
|
|
@@ -19,6 +19,16 @@ describe 'render_file::default' do
|
|
|
19
19
|
expect(chef_run).to_not render_file('/tmp/file').with_content(/^Not(.+)$/)
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
+
it 'renders the file when given a block' do
|
|
23
|
+
expect(chef_run).to render_file('/tmp/file').with_content { |content|
|
|
24
|
+
expect(content).to include('This is content!')
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
expect(chef_run).to render_file('/tmp/file').with_content { |content|
|
|
28
|
+
expect(content).to_not include('This is not content!')
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
22
32
|
it 'renders the file with content matching arbitrary matcher' do
|
|
23
33
|
expect(chef_run).to render_file('/tmp/file').with_content(
|
|
24
34
|
start_with('This')
|
|
@@ -46,6 +56,16 @@ describe 'render_file::default' do
|
|
|
46
56
|
expect(chef_run).to_not render_file('/tmp/cookbook_file').with_content(/^Not(.+)$/)
|
|
47
57
|
end
|
|
48
58
|
|
|
59
|
+
it 'renders the file when given a block' do
|
|
60
|
+
expect(chef_run).to render_file('/tmp/cookbook_file').with_content { |content|
|
|
61
|
+
expect(content).to include('This is content!')
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
expect(chef_run).to render_file('/tmp/cookbook_file').with_content { |content|
|
|
65
|
+
expect(content).to_not include('This is not content!')
|
|
66
|
+
}
|
|
67
|
+
end
|
|
68
|
+
|
|
49
69
|
it 'renders the file with content matching arbitrary matcher' do
|
|
50
70
|
expect(chef_run).to render_file('/tmp/cookbook_file').with_content(
|
|
51
71
|
start_with('This')
|
|
@@ -86,6 +106,16 @@ describe 'render_file::default' do
|
|
|
86
106
|
expect(chef_run).to_not render_file('/tmp/template').with_content(/^Not(.+)$/)
|
|
87
107
|
end
|
|
88
108
|
|
|
109
|
+
it 'renders the file when given a block' do
|
|
110
|
+
expect(chef_run).to render_file('/tmp/template').with_content { |content|
|
|
111
|
+
expect(content).to include('This is content!')
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
expect(chef_run).to render_file('/tmp/template').with_content { |content|
|
|
115
|
+
expect(content).to_not include('This is not content!')
|
|
116
|
+
}
|
|
117
|
+
end
|
|
118
|
+
|
|
89
119
|
it 'renders the file with content matching arbitrary matcher' do
|
|
90
120
|
expect(chef_run).to render_file('/tmp/template').with_content(
|
|
91
121
|
start_with('This')
|
|
@@ -107,6 +137,16 @@ describe 'render_file::default' do
|
|
|
107
137
|
expect(chef_run).to_not render_file('/tmp/partial').with_content('This template has a partial: This is not a template partial!')
|
|
108
138
|
end
|
|
109
139
|
|
|
140
|
+
it 'renders the file when given a block' do
|
|
141
|
+
expect(chef_run).to render_file('/tmp/partial').with_content { |content|
|
|
142
|
+
expect(content).to include('has a partial')
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
expect(chef_run).to render_file('/tmp/partial').with_content { |content|
|
|
146
|
+
expect(content).to_not include('not a template partial')
|
|
147
|
+
}
|
|
148
|
+
end
|
|
149
|
+
|
|
110
150
|
it 'renders the file with matching content' do
|
|
111
151
|
expect(chef_run).to render_file('/tmp/partial').with_content(/^This(.+)$/)
|
|
112
152
|
expect(chef_run).to_not render_file('/tmp/partial').with_content(/^Not(.+)$/)
|
|
@@ -27,7 +27,7 @@ describe 'server::node' do
|
|
|
27
27
|
|
|
28
28
|
node = chef_run.get_node('chefspec')
|
|
29
29
|
expect(node['kernel']['name']).to eq('Linux')
|
|
30
|
-
expect(node['kernel']['release']).to eq('3.2.0-
|
|
30
|
+
expect(node['kernel']['release']).to eq('3.2.0-92-generic')
|
|
31
31
|
expect(node['kernel']['machine']).to eq('x86_64')
|
|
32
32
|
end
|
|
33
33
|
end
|
|
@@ -34,6 +34,9 @@ describe 'server::search' do
|
|
|
34
34
|
|
|
35
35
|
let(:chef_run) do
|
|
36
36
|
ChefSpec::ServerRunner.new do |node, server|
|
|
37
|
+
node.set['bar'] = true
|
|
38
|
+
server.update_node(node)
|
|
39
|
+
|
|
37
40
|
server.create_node(node_1)
|
|
38
41
|
server.create_node(node_2)
|
|
39
42
|
server.create_node(node_3)
|
|
@@ -44,6 +47,7 @@ describe 'server::search' do
|
|
|
44
47
|
it 'finds all nodes with the bar attribute' do
|
|
45
48
|
expect(chef_run).to write_log('nodes with an attribute')
|
|
46
49
|
.with_message(<<-EOH.gsub(/^ {8}/, '').strip)
|
|
50
|
+
chefspec, FQDN: chefspec.local, hostname: chefspec
|
|
47
51
|
node_1, FQDN: node_1.example.com, hostname: node_1
|
|
48
52
|
node_2, FQDN: node_2.example.com, hostname: node_2
|
|
49
53
|
node_3, FQDN: node_3.example.com, hostname: node_3
|
|
@@ -7,16 +7,24 @@ describe 'step_into::default' do
|
|
|
7
7
|
it 'does not execute the LWRPs action' do
|
|
8
8
|
expect(chef_run).to_not write_log('message')
|
|
9
9
|
end
|
|
10
|
+
|
|
11
|
+
it 'does not execute the custom LWRPs action' do
|
|
12
|
+
expect(chef_run).to_not write_log('custom message')
|
|
13
|
+
end
|
|
10
14
|
end
|
|
11
15
|
|
|
12
16
|
context 'with :step_into' do
|
|
13
17
|
let(:chef_run) do
|
|
14
|
-
ChefSpec::SoloRunner.new(step_into: ['step_into_lwrp'])
|
|
18
|
+
ChefSpec::SoloRunner.new(step_into: ['step_into_lwrp', 'provides_this'])
|
|
15
19
|
.converge(described_recipe)
|
|
16
20
|
end
|
|
17
21
|
|
|
18
|
-
it '
|
|
22
|
+
it 'executes the LWRPs action' do
|
|
19
23
|
expect(chef_run).to write_log('message')
|
|
20
24
|
end
|
|
25
|
+
|
|
26
|
+
it 'executes the custom LWRPs action' do
|
|
27
|
+
expect(chef_run).to write_log('custom message')
|
|
28
|
+
end
|
|
21
29
|
end
|
|
22
30
|
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
windows_package 'explicit_action' do
|
|
2
|
+
action :install
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
windows_package 'with_attributes' do
|
|
6
|
+
installer_type :msi
|
|
7
|
+
action :install
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
windows_package 'specifying the identity attribute' do
|
|
11
|
+
name 'identity_attribute'
|
|
12
|
+
action :install
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
windows_package 'explicit_action' do
|
|
2
|
+
action :remove
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
windows_package 'with_attributes' do
|
|
6
|
+
installer_type :msi
|
|
7
|
+
action :remove
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
windows_package 'specifying the identity attribute' do
|
|
11
|
+
name 'identity_attribute'
|
|
12
|
+
action :remove
|
|
13
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
require 'chefspec'
|
|
2
|
+
|
|
3
|
+
RSpec.configure do |config|
|
|
4
|
+
config.platform = 'windows'
|
|
5
|
+
config.version = '2012R2'
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
describe 'windows_package::install' do
|
|
9
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
|
10
|
+
|
|
11
|
+
it 'installs a windows_package with an explicit action' do
|
|
12
|
+
expect(chef_run).to install_windows_package('explicit_action')
|
|
13
|
+
expect(chef_run).to_not install_windows_package('not_explicit_action')
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it 'installs a windows_package with attributes' do
|
|
17
|
+
expect(chef_run).to install_windows_package('with_attributes').with(installer_type: :msi)
|
|
18
|
+
expect(chef_run).to_not install_windows_package('with_attributes').with(installer_type: 'bacon')
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
it 'installs a windows_package when specifying the identity attribute' do
|
|
22
|
+
expect(chef_run).to install_windows_package('identity_attribute')
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
require 'chefspec'
|
|
2
|
+
|
|
3
|
+
RSpec.configure do |config|
|
|
4
|
+
config.platform = 'windows'
|
|
5
|
+
config.version = '2012R2'
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
describe 'windows_package::remove' do
|
|
9
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
|
10
|
+
|
|
11
|
+
it 'removes a windows_package with an explicit action' do
|
|
12
|
+
expect(chef_run).to remove_windows_package('explicit_action')
|
|
13
|
+
expect(chef_run).to_not remove_windows_package('not_explicit_action')
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it 'removes a windows_package with attributes' do
|
|
17
|
+
expect(chef_run).to remove_windows_package('with_attributes').with(installer_type: :msi)
|
|
18
|
+
expect(chef_run).to_not remove_windows_package('with_attributes').with(installer_type: 'bacon')
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
it 'removes a windows_package when specifying the identity attribute' do
|
|
22
|
+
expect(chef_run).to remove_windows_package('identity_attribute')
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
windows_service 'explicit_action' do
|
|
2
|
+
action :configure_startup
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
windows_service 'with_attributes' do
|
|
6
|
+
pattern 'pattern'
|
|
7
|
+
action :configure_startup
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
windows_service 'specifying the identity attribute' do
|
|
11
|
+
service_name 'identity_attribute'
|
|
12
|
+
action :configure_startup
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
windows_service 'explicit_action' do
|
|
2
|
+
action :disable
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
windows_service 'with_attributes' do
|
|
6
|
+
pattern 'pattern'
|
|
7
|
+
action :disable
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
windows_service 'specifying the identity attribute' do
|
|
11
|
+
service_name 'identity_attribute'
|
|
12
|
+
action :disable
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
windows_service 'explicit_action' do
|
|
2
|
+
action :enable
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
windows_service 'with_attributes' do
|
|
6
|
+
pattern 'pattern'
|
|
7
|
+
action :enable
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
windows_service 'specifying the identity attribute' do
|
|
11
|
+
service_name 'identity_attribute'
|
|
12
|
+
action :enable
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
windows_service 'explicit_action' do
|
|
2
|
+
action :reload
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
windows_service 'with_attributes' do
|
|
6
|
+
pattern 'pattern'
|
|
7
|
+
action :reload
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
windows_service 'specifying the identity attribute' do
|
|
11
|
+
service_name 'identity_attribute'
|
|
12
|
+
action :reload
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
windows_service 'explicit_action' do
|
|
2
|
+
action :restart
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
windows_service 'with_attributes' do
|
|
6
|
+
pattern 'pattern'
|
|
7
|
+
action :restart
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
windows_service 'specifying the identity attribute' do
|
|
11
|
+
service_name 'identity_attribute'
|
|
12
|
+
action :restart
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
windows_service 'explicit_action' do
|
|
2
|
+
action :start
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
windows_service 'with_attributes' do
|
|
6
|
+
pattern 'pattern'
|
|
7
|
+
action :start
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
windows_service 'specifying the identity attribute' do
|
|
11
|
+
service_name 'identity_attribute'
|
|
12
|
+
action :start
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
windows_service 'explicit_action' do
|
|
2
|
+
action :stop
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
windows_service 'with_attributes' do
|
|
6
|
+
pattern 'pattern'
|
|
7
|
+
action :stop
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
windows_service 'specifying the identity attribute' do
|
|
11
|
+
service_name 'identity_attribute'
|
|
12
|
+
action :stop
|
|
13
|
+
end
|