Skip to content

Commit 0a3d05f

Browse files
author
Delivery Server
committed
Merged change edd62527-3bb8-4049-8e71-8218b17ec44b
From review branch _reviews/master/jscott/fixtopics12345/3 into master Signed-off-by: jscott <[email protected]>
2 parents ab603cf + a948c73 commit 0a3d05f

File tree

38 files changed

+173
-81
lines changed

38 files changed

+173
-81
lines changed

chef_master/source/dsl_recipe.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,9 @@ Send Email
370370

371371
Windows Platform
372372
=====================================================
373-
The following methods and helpers may be used on the |windows| platform:
373+
.. include:: ../../includes_dsl_recipe/includes_dsl_recipe_method_windows_methods.rst
374374

375-
.. note:: The recommended order in which registry key-specific methods should be used within a recipe is: ``key_exists?``, ``value_exists?``, ``data_exists?``, ``get_values``, ``has_subkeys?``, and then ``get_subkeys``.
375+
.. note:: .. include:: ../../includes_notes/includes_notes_dsl_recipe_order_for_windows_methods.rst
376376

377377
registry_data_exists?
378378
-----------------------------------------------------

chef_master/source/environments.rst

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,7 @@ Manage Environments
5454

5555
Find Environment from Recipe
5656
-----------------------------------------------------
57-
Use the following syntax to find the current environment from a recipe:
58-
59-
.. code-block:: ruby
60-
61-
node.environment()
62-
63-
or:
64-
65-
.. code-block:: ruby
66-
67-
node.chef_environment
57+
.. include:: ../../includes_environment/includes_environment_find_from_recipe.rst
6858

6959
Save in a Data Bag
7060
-----------------------------------------------------
@@ -89,6 +79,3 @@ Move Nodes
8979
Search Environments
9080
-----------------------------------------------------
9181
.. include:: ../../includes_search/includes_search_environment.rst
92-
93-
94-

chef_master/source/resource_apt_package.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Providers
3232

3333
Examples
3434
=====================================================
35-
|generic resource statement|
35+
.. include:: ../../includes_resources_common/includes_resources_common_examples_intro.rst
3636

3737
**Install a package using package manager**
3838

chef_master/source/resource_package.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ package
44

55
.. include:: ../../includes_resources/includes_resource_package.rst
66

7-
This resource is the base resource for several other resources used for package management on specific platforms. While it is possible to use each of these specific resources, it is recommended to use the |resource package| resource as often as possible. For more information about specific resources for specific platforms, see the following topics:
7+
.. include:: ../../includes_resources/includes_resource_package_base_resource.rst
8+
9+
For more information about specific resources for specific platforms, see the following topics:
810

911
* :doc:`apt_package </resource_apt_package>`
1012
* :doc:`bff_package </resource_bff_package>`

chef_master/source/resource_registry_key.rst

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,33 @@ Registry Key Path Separators
1414

1515
Recipe DSL Methods
1616
-----------------------------------------------------
17-
The following methods can be used to interact with |windows| registry keys.
18-
19-
.. list-table::
20-
:widths: 150 450
21-
:header-rows: 1
22-
23-
* - Methods
24-
- Description
25-
* - `registry_data_exists? <http://docs.chef.io/release/12-0/dsl_recipe.html#registry-data-exists>`__
26-
- Find out if a registry key contains data.
27-
* - `registry_get_subkeys <http://docs.chef.io/release/12-0/dsl_recipe.html#registry-get-subkeys>`__
28-
- Get a list of sub-keys for a registry setting.
29-
* - `registry_get_values <http://docs.chef.io/release/12-0/dsl_recipe.html#registry-get-values>`__
30-
- Get values (name, type, and data) for a given registry key.
31-
* - `registry_has_subkeys? <http://docs.chef.io/release/12-0/dsl_recipe.html#registry-has-subkeys>`__
32-
- Find out if a registry key has one (or more) sub-keys.
33-
* - `registry_key_exists? <http://docs.chef.io/release/12-0/dsl_recipe.html#registry-key-exists>`__
34-
- Find out if a registry key exists.
35-
* - `registry_value_exists? <http://docs.chef.io/release/12-0/dsl_recipe.html#registry-value-exists>`__
36-
- Find out if a registry key has values set (name, type, and data).
37-
38-
.. note:: The recommended order in which registry key-specific methods should be used within a recipe is: ``key_exists?``, ``value_exists?``, ``data_exists?``, ``get_values``, ``has_subkeys?``, and then ``get_subkeys``.
17+
.. include:: ../../includes_dsl_recipe/includes_dsl_recipe_method_windows_methods.rst
18+
19+
.. include:: ../../includes_notes/includes_notes_dsl_recipe_order_for_windows_methods.rst
20+
21+
registry_data_exists?
22+
+++++++++++++++++++++++++++++++++++++++++++++++++++++
23+
.. include:: ../../includes_dsl_recipe/includes_dsl_recipe_method_registry_data_exists.rst
24+
25+
registry_get_subkeys
26+
+++++++++++++++++++++++++++++++++++++++++++++++++++++
27+
.. include:: ../../includes_dsl_recipe/includes_dsl_recipe_method_registry_get_subkeys.rst
28+
29+
registry_get_values
30+
+++++++++++++++++++++++++++++++++++++++++++++++++++++
31+
.. include:: ../../includes_dsl_recipe/includes_dsl_recipe_method_registry_get_values.rst
32+
33+
registry_has_subkeys?
34+
+++++++++++++++++++++++++++++++++++++++++++++++++++++
35+
.. include:: ../../includes_dsl_recipe/includes_dsl_recipe_method_registry_has_subkeys.rst
36+
37+
registry_key_exists?
38+
+++++++++++++++++++++++++++++++++++++++++++++++++++++
39+
.. include:: ../../includes_dsl_recipe/includes_dsl_recipe_method_registry_key_exists.rst
40+
41+
registry_value_exists?
42+
+++++++++++++++++++++++++++++++++++++++++++++++++++++
43+
.. include:: ../../includes_dsl_recipe/includes_dsl_recipe_method_registry_value_exists.rst
3944

4045
Actions
4146
=====================================================

chef_master/source/windows.rst

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The |chef client| has specific components that are designed to support unique as
1212
* Two |knife| plugins dedicated to the |windows| platform are available: |subcommand knife azure| is used to manage virtual instances in |azure|; |subcommand knife windows| is used to interact with and manage physical nodes that are running |windows|, such as desktops and servers
1313
* Four cookbooks provide application-specific support. For `PowerShell 4.0 <https://github.com/chef-cookbooks/powershell>`_. For `IIS 7.0/7.5/8.0 <https://github.com/chef-cookbooks/iis>`_. For `SQL Server <https://github.com/chef-cookbooks/database>`_. And for configuring various settings and behaviors on a machine that is running `Windows <https://github.com/chef-cookbooks/windows>`_
1414
* Support for both :i386 and :x86_64 architectures
15-
* Six helpers are present in the |dsl recipe| to help verify the registry during a |chef client| run---``registry_data_exists?``, ``registry_get_subkeys``, ``registry_get_values``, ``registry_has_subkeys?``, ``registry_key_exists?``, and ``registry_value_exists?``---these helpers ensure the |resource powershell_script| resource is idempotent
15+
* .. include:: ../../includes_dsl_recipe/includes_dsl_recipe_method_windows_helpers.rst
1616
* Two community provisioners for |kitchen|: `kitchen-dsc <https://github.com/smurawski/kitchen-dsc>`_ and `kitchen-pester <https://github.com/smurawski/kitchen-pester>`_
1717

1818
The most popular core resources in the |chef client|---:doc:`cookbook_file </resource_cookbook_file>`, :doc:`directory </resource_directory>`, :doc:`env </resource_env>`, :doc:`execute </resource_execute>`, :doc:`file </resource_file>`, :doc:`group </resource_group>`, :doc:`http_request </resource_http_request>`, :doc:`link </resource_link>`, :doc:`mount </resource_mount>`, :doc:`package </resource_package>`, :doc:`remote_directory </resource_remote_directory>`, :doc:`remote_file </resource_remote_file>`, :doc:`ruby_block </resource_ruby_block>`, :doc:`service </resource_service>`, :doc:`template </resource_template>`, and :doc:`user </resource_user>`---work the same way in |windows| as they do on any |unix|- or |linux|-based platform.
@@ -23,7 +23,6 @@ The file-based resources---|resource cookbook_file|, |resource file|, |resource
2323

2424
The following sections are pulled in from the larger |url docs| site and represents the documentation that is specific to the |windows| platform, compiled here into a single-page reference.
2525

26-
2726
Install the |chef client_title| on Windows
2827
=====================================================
2928
.. include:: ../../includes_windows/includes_windows_install_overview.rst
@@ -681,6 +680,36 @@ Path Separators
681680
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
682681
.. include:: ../../includes_windows/includes_windows_registry_key_backslashes.rst
683682

683+
Recipe DSL Methods
684+
+++++++++++++++++++++++++++++++++++++++++++++++++++++
685+
.. include:: ../../includes_dsl_recipe/includes_dsl_recipe_method_windows_methods.rst
686+
687+
.. include:: ../../includes_notes/includes_notes_dsl_recipe_order_for_windows_methods.rst
688+
689+
registry_data_exists?
690+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
691+
.. include:: ../../includes_dsl_recipe/includes_dsl_recipe_method_registry_data_exists.rst
692+
693+
registry_get_subkeys
694+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
695+
.. include:: ../../includes_dsl_recipe/includes_dsl_recipe_method_registry_get_subkeys.rst
696+
697+
registry_get_values
698+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
699+
.. include:: ../../includes_dsl_recipe/includes_dsl_recipe_method_registry_get_values.rst
700+
701+
registry_has_subkeys?
702+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
703+
.. include:: ../../includes_dsl_recipe/includes_dsl_recipe_method_registry_has_subkeys.rst
704+
705+
registry_key_exists?
706+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
707+
.. include:: ../../includes_dsl_recipe/includes_dsl_recipe_method_registry_key_exists.rst
708+
709+
registry_value_exists?
710+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
711+
.. include:: ../../includes_dsl_recipe/includes_dsl_recipe_method_registry_value_exists.rst
712+
684713
Actions
685714
+++++++++++++++++++++++++++++++++++++++++++++++++++++
686715
.. include:: ../../includes_resources/includes_resource_registry_key_actions.rst
@@ -804,7 +833,9 @@ Some of the most popular |company_name|-maintained cookbooks that contain lightw
804833

805834
|dsl recipe| Methods
806835
=====================================================
807-
.. include:: ../../includes_dsl_recipe/includes_dsl_recipe.rst
836+
.. include:: ../../includes_dsl_recipe/includes_dsl_recipe_method_windows_methods.rst
837+
838+
.. note:: .. include:: ../../includes_notes/includes_notes_dsl_recipe_order_for_windows_methods.rst
808839

809840
registry_data_exists?
810841
-----------------------------------------------------
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. The contents of this file may be included in multiple topics (using the includes directive).
2+
.. The contents of this file should be modified in a way that preserves its ability to appear in multiple topics.
3+
4+
5+
Six methods are present in the |dsl recipe| to help verify the registry during a |chef client| run on the |windows| platform---``registry_data_exists?``, ``registry_get_subkeys``, ``registry_get_values``, ``registry_has_subkeys?``, ``registry_key_exists?``, and ``registry_value_exists?``---these helpers ensure the |resource powershell_script| resource is idempotent.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.. The contents of this file may be included in multiple topics (using the includes directive).
2+
.. The contents of this file should be modified in a way that preserves its ability to appear in multiple topics.
3+
4+
5+
Use the following syntax to find the current environment from a recipe:
6+
7+
.. code-block:: ruby
8+
9+
node.environment()
10+
11+
or:
12+
13+
.. code-block:: ruby
14+
15+
node.chef_environment
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. The contents of this file may be included in multiple topics (using the includes directive).
2+
.. The contents of this file should be modified in a way that preserves its ability to appear in multiple topics.
3+
4+
5+
The recommended order in which registry key-specific methods should be used within a recipe is: ``key_exists?``, ``value_exists?``, ``data_exists?``, ``get_values``, ``has_subkeys?``, and then ``get_subkeys``.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. The contents of this file may be included in multiple topics (using the includes directive).
2+
.. The contents of this file should be modified in a way that preserves its ability to appear in multiple topics.
3+
4+
5+
This resource is the base resource for several other resources used for package management on specific platforms. While it is possible to use each of these specific resources, it is recommended to use the |resource package| resource as often as possible.

0 commit comments

Comments
 (0)