diff --git a/docs/docsite/rst/network/getting_started/network_differences.rst b/docs/docsite/rst/network/getting_started/network_differences.rst index 8271824ec7..a3e462eabc 100644 --- a/docs/docsite/rst/network/getting_started/network_differences.rst +++ b/docs/docsite/rst/network/getting_started/network_differences.rst @@ -94,4 +94,4 @@ And you use the ``eapi`` variable in your task(s): Note that while Ansible 2.6 supports the use of ``connection: local`` with ``provider`` dictionaries, this usage will be deprecated in the future and eventually removed. -For more information, see :ref:`Become and Networks` +For more information, see :ref:`Become and Networks` diff --git a/docs/docsite/rst/network/user_guide/network_best_practices_2.5.rst b/docs/docsite/rst/network/user_guide/network_best_practices_2.5.rst index 9d1f784afe..457437af18 100644 --- a/docs/docsite/rst/network/user_guide/network_best_practices_2.5.rst +++ b/docs/docsite/rst/network/user_guide/network_best_practices_2.5.rst @@ -157,7 +157,7 @@ Certain network platforms, such as eos and ios, have the concept of different pr ansible_become=yes ansible_become_method=enable -For more information, see the :ref:`using become with network modules` guide. +For more information, see the :ref:`using become with network modules` guide. Jump hosts diff --git a/docs/docsite/rst/porting_guides/porting_guide_2.5.rst b/docs/docsite/rst/porting_guides/porting_guide_2.5.rst index a26aba5f1a..3fdeaf633c 100644 --- a/docs/docsite/rst/porting_guides/porting_guide_2.5.rst +++ b/docs/docsite/rst/porting_guides/porting_guide_2.5.rst @@ -319,7 +319,7 @@ The deprecation warnings reflect this schedule. The task above, run in Ansible 2 [DEPRECATION WARNING]: Param 'host' is deprecated. See the module docs for more information. This feature will be removed in version 2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. -We recommend using the new connection types ``network_cli`` and ``netconf`` (see below), using standard Ansible connection properties, and setting those properties in inventory by group. As you update your playbooks and inventory files, you can easily make the change to ``become`` for privilege escalation (on platforms that support it). For more information, see the :ref:`using become with network modules` guide and the :ref:`platform documentation`. +We recommend using the new connection types ``network_cli`` and ``netconf`` (see below), using standard Ansible connection properties, and setting those properties in inventory by group. As you update your playbooks and inventory files, you can easily make the change to ``become`` for privilege escalation (on platforms that support it). For more information, see the :ref:`using become with network modules` guide and the :ref:`platform documentation`. Adding persistent connection types ``network_cli`` and ``netconf`` ------------------------------------------------------------------ diff --git a/docs/docsite/rst/user_guide/become.rst b/docs/docsite/rst/user_guide/become.rst index ccfd6c00e8..b6890a86c1 100644 --- a/docs/docsite/rst/user_guide/become.rst +++ b/docs/docsite/rst/user_guide/become.rst @@ -235,7 +235,7 @@ To force ``become`` to open a new systemd session that goes through For more information, see `this systemd issue `_. -.. _become-network: +.. _become_network: Become and Networks =================== @@ -324,7 +324,7 @@ Ansible still supports ``enable`` mode with ``connection: local`` for legacy pla We recommend updating your playbooks to use ``become`` for network-device ``enable`` mode consistently. The use of ``authorize`` and of ``provider`` dictionaries will be deprecated in future. Check the :ref:`platform_options` and :ref:`network_modules` documentation for details. -.. _become-windows: +.. _become_windows: Become and Windows ================== diff --git a/docs/templates/plugin.rst.j2 b/docs/templates/plugin.rst.j2 index 7e971a4c6a..93e635bfd9 100644 --- a/docs/templates/plugin.rst.j2 +++ b/docs/templates/plugin.rst.j2 @@ -224,7 +224,7 @@ See Also {% for item in seealso %} {% if item.module is defined and item.description is defined %} - :ref:`Module @{ item.module }@ <@{ item.module }@_module>` + :ref:`@{ item.module }@_module` @{ item.description | rst_ify }@ {% elif item.module is defined %} :ref:`@{ item.module }@_module` diff --git a/lib/ansible/modules/windows/win_chocolatey.py b/lib/ansible/modules/windows/win_chocolatey.py index 87e4be3031..ed60cb5fe5 100644 --- a/lib/ansible/modules/windows/win_chocolatey.py +++ b/lib/ansible/modules/windows/win_chocolatey.py @@ -15,12 +15,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = r''' --- module: win_chocolatey -version_added: "1.9" +version_added: '1.9' short_description: Manage packages using chocolatey description: -- Manage packages using Chocolatey (U(http://chocolatey.org/)). +- Manage packages using Chocolatey. - If Chocolatey is missing from the system, the module will install it. -- List of packages can be found at U(http://chocolatey.org/packages). requirements: - chocolatey >= 0.10.5 (will be upgraded if older) options: @@ -55,6 +54,7 @@ options: architecture. - When setting C(x86), will ensure Chocolatey installs the x86 package even when on an x64 bit OS. + type: str choices: - default - x86 @@ -204,32 +204,43 @@ options: - Specific version of the package to be installed. - When I(state) is set to C(absent), will uninstall the specific version otherwise all versions of that package will be removed. + - Provide as a string (e.g. C('6.1')), otherwise it is considered to be + a floating-point number and depending on the locale could become C(6,1), + which will cause a failure. type: str notes: -- Provide the C(version) parameter value as a string (e.g. C('6.1')), otherwise it - is considered to be a floating-point number and depending on the locale could - become C(6,1), which will cause a failure. -- When using verbosity 2 or less (C(-vv)) the C(stdout) output will be restricted. -- When using verbosity 4 (C(-vvvv)) the C(stdout) output will be more verbose. -- When using verbosity 5 (C(-vvvvv)) the C(stdout) output will include debug output. - This module will install or upgrade Chocolatey when needed. +- When using verbosity 2 or less (C(-vv)) the C(stdout) output will be restricted. + When using verbosity 4 (C(-vvvv)) the C(stdout) output will be more verbose. + When using verbosity 5 (C(-vvvvv)) the C(stdout) output will include debug output. - Some packages, like hotfixes or updates need an interactive user logon in - order to install. You can use (C(become)) to achieve this, see - :doc:`/user_guide/become`. -- Even if you are connecting as local Administrator, using (C(become)) to + order to install. You can use C(become) to achieve this, see + :ref:`become_windows`. + Even if you are connecting as local Administrator, using C(become) to become Administrator will give you an interactive user logon, see examples below. -- If (C(become)) is unavailable, use (M(win_hotfix) to install hotfixes instead - of (M(win_chocolatey)) as (M(win_hotfix)) avoids using wusa.exe which cannot - be run without (C(become)). +- If C(become) is unavailable, use M(win_hotfix) to install hotfixes instead + of M(win_chocolatey) as M(win_hotfix) avoids using C(wusa.exe) which cannot + be run without C(become). seealso: - module: win_chocolatey_config - module: win_chocolatey_facts - module: win_chocolatey_feature - module: win_chocolatey_source - module: win_feature +- module: win_hotfix + description: Use when C(become) is unavailable, to avoid using C(wusa.exe). - module: win_package - module: win_updates +- name: Chocolatey website + description: More information about the Chocolatey tool. + link: http://chocolatey.org/ +- name: Chocolatey packages + description: An overview of the available Chocolatey packages. + link: http://chocolatey.org/packages +- ref: become_windows + description: Some packages, like hotfixes or updates need an interactive user logon + in order to install. You can use C(become) to achieve this. author: - Trond Hindenes (@trondhindenes) - Peter Mounce (@petemounce) @@ -276,7 +287,7 @@ EXAMPLES = r''' name: git source: internal_repo -- name: ensure Chocolatey itself is installed and use internal repo as source +- name: Ensure Chocolatey itself is installed and use internal repo as source win_chocolatey: name: chocolatey source: http://someserver/chocolatey @@ -303,7 +314,7 @@ EXAMPLES = r''' - putty - windirstat -- name: uninstall multiple packages +- name: Uninstall multiple packages win_chocolatey: name: - procexp