~egtann/up

up/parser.go -rw-r--r-- 1.6 KiB
1ab0f861 — Evan Tann 7 months ago
simplify tool

up is finding its use as a parallel, batched task-runner.

This large change decouples the inventory file from up. Instead of tags,
you'll now pass in comma-separated IPs, and you can use another tool
such as inv2ips to return those IPs from an inventory if you choose.

This also removes the idea of executing tasks only if some conditions
are met. Instead, use a shell script to check those conditions and run
up when those conditions pass.

The parser has been simplified a great deal with a new syntax, removing
the need for a lexer and more closely mirroring make.

The concept of passing Upfile content into up via stdin was a good one,
but in practice didn't work well alongside scripts which also required
stdin. Support for the stdin flag "-f -" has been removed.

Variable substitution is much improved, now replacing variables from
largest to smallest, so $s doesn't happen before $ssh.

up now behaves more similarly to make. It will run the first task by
default. The syntax has changed to `up -t {ips} {cmd}`, removing the
`-c` flag.
split out inventory, improve flags, allow reading from stdin
36c0e5b3 — Evan Tann 2 years ago
fix tests
32226bc4 — Evan Tann 2 years ago
improve logic clarity in parser
f3b92bf3 — Evan Tann 2 years ago
add custom lexer, parser, new upfile syntax
Next