The ping module

Not all Ansible modules work with Windows hosts and ping is one of them. There is a module provided for Windows called win_ping and we will be using that here.

The command we need to run follows; as you can see, other than the module name it is exactly the way we executed it against a Linux host:

$ ansible windows -i production -m win_ping

If you are a macOS user and you receive an error like this one, then don't worry; there is a workaround for it:

The error is a known issue that is being worked on by the Ansible team. In the meantime, run the following command, or add it to your ~/.bash_profile file:

$ export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

Once you have run the command, you should see the following results:

The next module we are going to run has been designed to work with Windows or Linux hosts.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.147.87