Sign inSign up

aceberg/gans

By aceberg

•Updated over 3 years ago

Git+Ansible: watch git repo for changes and run only changed playbooks

Image
0

3.5K

aceberg/gans repository overview

Main-Docker Binary-release Go Report Card Maintainability

⁠ ⁠gans

Git+Ansible: watch git repo for changes and run only changed playbooks
(Also, gans means goose in German)

Screenshot

⁠Quick start

Make sure /path/to/git/repo leads to your Ansible git repo.

docker run --name gans \
-e "TZ=Asia/Novosibirsk" \
-v ~/.dockerdata/gans:/data/gans \
-v /path/to/git/repo:/gitrepo \
-p 8845:8845 \
aceberg/gans

Or use docker-compose.yml⁠

⁠Usage

Web interface is pretty self-explanatory. If you know Ansible, you shouldn't have any problems.
Important things about gans:

  • It supports only local git repos for now. If you need to work with remote repo, you can pull it regularly with git-syr⁠ or your own cron script.
  • I decided not to parse Ansible Inventory to reduce errors, so you need to enter hosts and groups manually on Repo page. Gans will work only with those hosts.
  • SSH Keys are handled by Ansible Inventory or ansible.cfg. Keys page is only there to help you upload them and check their presence.

Example ansible.cfg⁠ and hosts.ini⁠ can also help. To work correctly ansible.cfg shoul be at the / of git repo.

⁠Config

Configuration can be done through config file or environment variables

VariableDescriptionDefault
DBPath to Database/data/gans/sqlite.db
HOSTListen address0.0.0.0
PORTPort for web GUI8845
THEMEAny theme name from https://bootswatch.com⁠ in lowcasecerulean
SHOWHow many lines to show on index page25
YAMLPATHPath to file where git repo is described/data/gans/repo.yaml
KEYPATHPath to ssh keys directory/data/gans/ssh
LOGPATHPath to log file/data/gans/gans.log
INTERVALInterval between repo scans (s, m, h)5s
TZSet your timezone for correct time""

⁠Options

KeyDescriptionDefault
-dPath to SQLite DB file/data/gans/sqlite.db
-cPath to config file/data/gans/config.yaml
-lPath to log file/data/gans/gans.log
-rPath to repo yaml file/data/gans/repo.yaml

⁠Thanks

Tag summary

Content type

Image

Digest

sha256:384d4103e…

Size

86 MB

Last updated

over 3 years ago

docker pull aceberg/gans