A tool to interactive with many remote machines, inspired by ansible, python, production not ready
Go to file
Lunny Xiao f511bddf10
All checks were successful
checks / check and test (push) Successful in 33s
Use actions instead of drone
2023-04-21 11:43:41 +08:00
.gitea/workflows Use actions instead of drone 2023-04-21 11:43:41 +08:00
cmd remove cmd section 2020-11-25 11:52:15 +08:00
examples Support std library, remote library from github and gitea 2020-11-28 14:35:32 +08:00
modules fix wrong function name 2020-12-10 08:16:18 +08:00
std/shell Support std library, remote library from github and gitea 2020-11-28 14:35:32 +08:00
.gitignore Support execute special tasks 2020-11-24 15:48:39 +08:00
go.mod Use actions instead of drone 2023-04-21 11:43:41 +08:00
go.sum Use actions instead of drone 2023-04-21 11:43:41 +08:00
LICENSE Add License and badages 2020-11-25 13:26:41 +08:00
main.go Support std library, remote library from github and gitea 2020-11-28 14:35:32 +08:00
Makefile Support std library, remote library from github and gitea 2020-11-28 14:35:32 +08:00
README.md Improve README 2020-11-25 21:43:50 +08:00

pot - A tool to maintain remote machines

License: MIT Release Build Status Go Report Card GoDoc

Introduce

Pot is a tool to maintain many remote machines, it's inspired by ansible but easier to learn. It's only one binary on local machine. Nothing is required for the target machines if your commands are only some scripts.

It maybe changed frequently. DON'T use it in production.

Installation

go get gitea.com/lunny/pot

Write a package ping.yml

version: 1
name: ping the remote machine
tasks:
  - name: ping
    description: ping the machine from all the hosts
    args:
    - host # if host is empty, then it will keep the gloabl default value - current host
    - times=5
    steps:
    - ping -c {{.times}} {{.host}}

Write a runnable pot.yml

A runnable pot.yml which is also a package but have a section named main with hosts and tasks.

version: 1
name: ping the remote machine
imports:
  - ping from ping

main:
  hosts:
  - root@192.168.1.10:22022
  tasks:
  - ping

Run with main

pot run pot.yml

Run with no main

pot run pot.yml --hosts=root@192.168.1.10:22022 --tasks=ping

Global variables

  • {{.host}} The current machine
  • {{.user}} Login user on current machine