diff --git a/docsite/rst/intro.rst b/docsite/rst/intro.rst index 20518529e5b..9b30a18bbb7 100644 --- a/docsite/rst/intro.rst +++ b/docsite/rst/intro.rst @@ -13,5 +13,5 @@ Before we dive into the really fun parts -- playbooks, configuration management, intro_patterns intro_adhoc intro_configuration - + intro_windows diff --git a/docsite/rst/intro_windows.rst b/docsite/rst/intro_windows.rst index de7f3d5d91e..0319390c741 100644 --- a/docsite/rst/intro_windows.rst +++ b/docsite/rst/intro_windows.rst @@ -67,8 +67,7 @@ Browse this index to see what is available. In many cases, it may not be neccessary to even write or use an Ansible module. -In particular, the "win_script" module can be used to run arbitrary powershell scripts, allowing Windows administrators familiar with powershell a very -native way to do things, as in the following playbook: +In particular, the "win_script" module can be used to run arbitrary powershell scripts, allowing Windows administrators familiar with powershell a very native way to do things, as in the following playbook:: - hosts: windows tasks: @@ -108,9 +107,9 @@ Additional modules may be submitted as pull requests to github. System Prep ``````````` -In order for Ansible to manage your windows machines, you will have to enable Powershell remoting first, which also enables WinRM:: +In order for Ansible to manage your windows machines, you will have to enable Powershell remoting first, which also enables WinRM. -From the Windows host, launch the Powershell Client. For information on Powershell, visit 'Microsoft's Using Powershell article ' +From the Windows host, launch the Powershell Client. For information on Powershell, visit `Microsoft's Using Powershell article `_. In the powershell session, run the following to enable PS Remoting and set the execution policy @@ -134,9 +133,9 @@ By default, Powershell remoting enables an HTTP listener. The following commands An SSL certificate for server authentication is required to create the HTTPS listener. The existence of an existing certificate in the computer account can be verified by using the MMC snap-in, as documented ' -A best practice for SSL certificates is generating them from an internal or external certificate authority. An existing certificate could be located in the computer account certificate store 'using the following article '. +A best practice for SSL certificates is generating them from an internal or external certificate authority. An existing certificate could be located in the computer account certificate store `using the following article `_. -Alternatively, a self-signed SSL certificate can be generated in powershell using 'the following technet article '. At a minimum, the subject name should match the hostname, and Server Authentication is required. Once the self signed certificate is obtained, the certificate thumbprint can be identified using 'How to: Retrieve the Thumbprint of a Certificate ' +Alternatively, a self-signed SSL certificate can be generated in powershell using 'the following technet article '. At a minimum, the subject name should match the hostname, and Server Authentication is required. Once the self signed certificate is obtained, the certificate thumbprint can be identified using `How to: Retrieve the Thumbprint of a Certificate `_ .. code-block:: bash @@ -192,7 +191,7 @@ Running individual commands uses the 'raw' module, as opposed to the shell or co register: ipconfig - debug: var=ipconfig -And for a final example, here's how to use the win_stat module to test for file existance. Note that the data returned byt he win_stat module is slightly different than what is provided by the Linux equivalent. +And for a final example, here's how to use the win_stat module to test for file existance. Note that the data returned byt he win_stat module is slightly different than what is provided by the Linux equivalent:: - name: test stat module hosts: windows @@ -211,7 +210,7 @@ And for a final example, here's how to use the win_stat module to test for file - "stat_file.stat.size > 0" - "stat_file.stat.md5" -Again, recall that the Windows modules are all listed in the Windows category of modules, with the exception that the "raw", "script", and "fetch" modules are also available. These modules do not start with a "win_" prefix. +Again, recall that the Windows modules are all listed in the Windows category of modules, with the exception that the "raw", "script", and "fetch" modules are also available. These modules do not start with a "win" prefix. .. _windows_contributions: @@ -232,3 +231,4 @@ form of new modules, tweaks to existing modules, documentation, or something els `irc.freenode.net `_ #ansible IRC chat channel + diff --git a/docsite/rst/playbooks_variables.rst b/docsite/rst/playbooks_variables.rst index 8900948ae80..763e22d7019 100644 --- a/docsite/rst/playbooks_variables.rst +++ b/docsite/rst/playbooks_variables.rst @@ -218,12 +218,11 @@ Version Comparison Filters To compare a version number, such as checking if the ``ansible_distribution_version`` version is greater than or equal to '12.04', you can use the ``version_compare`` filter:: -The ``version_compare`` filter can also be used to evaluate the ``ansible_distribution_version``:: +The `version_compare` filter can also be used to evaluate the `ansible_distribution_version`:: {{ ansible_distribution_version | version_compare('12.04', '>=') }} -If ``ansible_distribution_version`` is greater than or equal to 12, this filter will return True, otherwise -it will return False. +If ``ansible_distribution_version`` is greater than or equal to 12, this filter will return True, otherwise it will return False. The ``version_compare`` filter accepts the following operators:: @@ -234,10 +233,10 @@ be used. The default is ``False``, and if set as ``True`` will use more strict {{ sample_version_var | version_compare('1.0', operator='lt', strict=True) }} -.. _random_filter +.. _random_filter: Random Number Filter --------------------------- +-------------------- .. versionadded:: 1.6 diff --git a/hacking/module_formatter.py b/hacking/module_formatter.py index 0a36c3951ca..f74d09ad72a 100755 --- a/hacking/module_formatter.py +++ b/hacking/module_formatter.py @@ -123,6 +123,12 @@ def list_modules(module_dir): if os.path.isdir(d): files2 = glob.glob("%s/*" % d) for f in files2: + + if f.endswith(".ps1"): + # windows powershell modules have documentation stubs in python docstring + # format (they are not executed) so skip the ps1 format files + continue + tokens = f.split("/") module = tokens[-1] category = tokens[-2]