# README
goutils/v2/ansible
The ansible
package is a collection of utility functions
designed to simplify common ansible tasks.
Table of contents
Functions
Ping(string)
Ping(string) error
Ping runs the ansible all -m ping
command against
all nodes found in the provided hosts file by using the
mage/sh package to execute the command. If the command
execution fails, an error is returned.
Parameters:
hostsFile: A string representing the path to the hosts
file to be used by the ansible
command.
Returns:
error: An error if the ansible
command execution fails.
Installation
To use the goutils/v2/ansible package, you first need to install it. Follow the steps below to install via go get.
go get github.com/l50/goutils/v2/ansible
Usage
After installation, you can import the package in your Go project using the following import statement:
import "github.com/l50/goutils/v2/ansible"
Tests
To ensure the package is working correctly, run the following
command to execute the tests for goutils/v2/ansible
:
go test -v
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
This project is licensed under the MIT License - see the LICENSE file for details.