commit
a2762bae3d
3 changed files with 4 additions and 4 deletions
|
@ -152,7 +152,7 @@ Once the files are in place, you can run the provided playbook (if there is one)
|
||||||
|
|
||||||
ansible-playbook -vvv playbook_name.yml
|
ansible-playbook -vvv playbook_name.yml
|
||||||
|
|
||||||
If there's not a playbook, you may have to copy and paste playbook snippets or run a ad-hoc command that was pasted in.
|
If there's no playbook, you may have to copy and paste playbook snippets or run an ad-hoc command that was pasted in.
|
||||||
|
|
||||||
Our issue template also included sections for "Expected Output" and "Actual Output", which should be used to gauge the output
|
Our issue template also included sections for "Expected Output" and "Actual Output", which should be used to gauge the output
|
||||||
from the provided examples.
|
from the provided examples.
|
||||||
|
|
|
@ -256,7 +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. 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.
|
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 `.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.
|
||||||
|
|
||||||
Modules (ps1 files) should start as follows::
|
Modules (ps1 files) should start as follows::
|
||||||
|
|
||||||
|
|
|
@ -550,8 +550,8 @@ Loops and Includes
|
||||||
``````````````````
|
``````````````````
|
||||||
|
|
||||||
In 2.0 you are able to use `with_` loops and task includes (but not playbook includes), this adds the ability to loop over the set of tasks in one shot.
|
In 2.0 you are able to use `with_` loops and task includes (but not playbook includes), this adds the ability to loop over the set of tasks in one shot.
|
||||||
There are a couple of things that you need to keep in mind, a included task that has its own `with_` loop will overwrite the value of the special `item` variable.
|
There are a couple of things that you need to keep in mind, an included task that has its own `with_` loop will overwrite the value of the special `item` variable.
|
||||||
So if you want access to both the include's `item` and the current task's `item` you should use `set_fact` to create a alias to the outer one.::
|
So if you want access to both the include's `item` and the current task's `item` you should use `set_fact` to create an alias to the outer one.::
|
||||||
|
|
||||||
|
|
||||||
- include: test.yml
|
- include: test.yml
|
||||||
|
|
Loading…
Reference in a new issue