Technology Security Analyst
Ansible windows modules are those Ansible modules that are utilized to do changes on Microsoft Windows machines. The sentence structure and conduct of these modules are equivalent to other Linux-based modules with various OS explicit errands and way separators. Ansible windows modules are utilized to arrange assignments on Microsoft Windows machines. These modules are created on PowerShell for the most part rather than Python. Additionally, the association strategy like WinRM or comparative Microsoft Windows upheld ones are utilized for this situation rather than SSH.
Ansible Windows Modules have a bunch of boundaries and adequate qualities. Additionally, a portion of the boundaries has default esteems. So it turns out to be more critical to learn and comprehend the different potential outcomes. These modules have comparative punctuation as some other modules. Just we want to deal with boundaries to pass in the playbook to accomplish our assignment prerequisites.
The following is a rundown of a portion of the significant Ansible Windows Modules with a short depiction. Kindly note this rundown is just for Microsoft Windows climate and not comprehensive as there are a lot more modules which Ansible people group is continuing to create:
Each module has a separate set of parameters and options. you can refer to the below link for the latest Ansible Windows modules, on this page you can click on a module link to get a detailed picture of that module.
In Ansible, playbooks are composed on YAML design, and each module is composed inside a playbook that should follow space and separate. Ansible Windows modules work in much the same way. In any case, there are a couple of focuses that one should keep in mind before beginning to utilize or attempting to begin the utilization of Ansible Windows modules.
In this part, we will do a few commonsense models. We will make playbooks on the Ansible regulator hub named Ansible1. Additionally, we have tartargetedndows machines as windows and WinServer1.lablad1.local. Utilizing the playbooks, we attempt to make changes or bring information from a remote objective Windows machine.
In this example, we will simply use Ansible win_ping module to check the connection and authentication success from the Ansible controller node to the target windows machine. We use the below command for the same.
ansible window -m win_ping
In the output, you can see that connection was successfully checked.
In this example, we have a remote host named WinServer1.lablad1.local. On which we will run the command using the Ansible windows module named win_command. Then register the output in a variable named netstat. To print the output contained in variable netstat, we will use the Ansible module debug. For this task, we have a playbook like below:
-name: test cmd from win_command module hosts: lablad1.local
-name: run an executable command on remote Windows system win_command: netstat -e
Now run this playbook like below:
The Output will look like below, where you can see above, in stdout_lines, all output by running netstat
commandon thee target machine:
As we found in this article, Ansible Windows modules are exceptionally helpful and a piece precarious to use in the IT foundation climate. In any case, when we have decent information on these sorts of modules, we can undoubtedly do Microsoft Windows organization and functional changes. So first learn them and afterward use them.
Subscribe to get latest updates