Installation
Install from Source
To install minop from source, ensure you have Go installed and run:
go install github.com/cqroot/minop@latest
Download Pre-compiled Binaries
Download the binary for your platform from the releases page and add its directory to your system's PATH.
Usage
Create the Hosts File
Create a file named hosts. Each line in this file should represent a remote host in the format <user>:<password>@<address>:<port>. Example:
root:[email protected]:8001
[main]
root:[email protected]:8002
root:[email protected]:8003
Hosts listed under a specific section header (like [main] in the example) will be assigned to that role.
Interactive CLI
Running the tool directly will load the hosts file from the current directory and start an interactive CLI. Here, you can execute commands you wish to run on the remote hosts.
minop
Execute Task Files
To execute predefined tasks non-interactively, first create a YAML file, for example minop.yaml:
- name: Copy file to /root on the remote host
copy: test.txt
to: /root/test.txt
- name: Copy dir to /root on the remote host
copy: testdir
to: /root/testdir
- name: List /root
shell: ls /root
Then, run the following command to load the hosts file and the minop.yaml file from the current directory, executing the orchestrated tasks on the remote hosts:
minop -t minop.yaml
Contributing
Contributions are welcome! Feel free to open an issue to report bugs, suggest new features, or submit a pull request.
License
This project is open source, licensed under the GPL-3.0 License.