pot

command module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2020 License: MIT Imports: 5 Imported by: 0

README

pot - A tool to maintain remote machines

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
modules

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL