mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
corrected info about windows module naming and loc
This commit is contained in:
parent
a196c7d737
commit
739e4c0386
3 changed files with 3 additions and 6 deletions
|
@ -256,10 +256,7 @@ Developers: Supported modules and how it works
|
||||||
Developing Ansible modules are covered in a `later section of the documentation <http://docs.ansible.com/developing_modules.html>`_, with a focus on Linux/Unix.
|
Developing Ansible modules are covered in a `later section of the documentation <http://docs.ansible.com/developing_modules.html>`_, with a focus on Linux/Unix.
|
||||||
What if you want to write Windows modules for Ansible though?
|
What if you want to write Windows modules for Ansible though?
|
||||||
|
|
||||||
For Windows, Ansible modules are implemented in PowerShell. Skim those Linux/Unix module development chapters before proceeding.
|
For Windows, Ansible modules are implemented in PowerShell. Skim those Linux/Unix module development chapters before proceeding. Windows modules in the core and extras repo live in a "windows/" subdir. Custom modules can go directly into the Ansible "library/" directories or those added in ansible.cfg. Documentation lives in a a `.py` file with the same name. For example, if a module is named "win_ping", there will be embedded documentation in the "win_ping.py" file, and the actual PowerShell code will live in a "win_ping.ps1" file. Take a look at the sources and this will make more sense.
|
||||||
|
|
||||||
Windows modules live in a "windows/" subfolder in the Ansible "library/" subtree. For example, if a module is named
|
|
||||||
"library/windows/win_ping", there will be embedded documentation in the "win_ping" file, and the actual PowerShell code will live in a "win_ping.ps1" file. Take a look at the sources and this will make more sense.
|
|
||||||
|
|
||||||
Modules (ps1 files) should start as follows::
|
Modules (ps1 files) should start as follows::
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 5f6d0f73f4203f05c7a51d906e6c04108d397b39
|
Subproject commit b77bf7a9aa1889fbee75f3db17c89816ca7c7838
|
|
@ -1 +1 @@
|
||||||
Subproject commit 39d6066f512b3ceaa4f16592c452cb26c17675f6
|
Subproject commit 4d2a20b2f433db2492b6b3eb0554177fa42662e4
|
Loading…
Reference in a new issue