Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raddessi/salt-git-diff
See which entries in salt top.sls were affected by last commit
https://github.com/raddessi/salt-git-diff
Last synced: 15 days ago
JSON representation
See which entries in salt top.sls were affected by last commit
- Host: GitHub
- URL: https://github.com/raddessi/salt-git-diff
- Owner: raddessi
- License: unlicense
- Created: 2018-10-29T23:02:07.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-07T23:46:08.000Z (5 months ago)
- Last Synced: 2024-11-05T13:42:29.347Z (2 months ago)
- Language: Python
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Salt git diff
See which hosts in top file were affected by latest git commit# Usage
Navigate to your salt states or pillars location and run:docker run -i -v $(pwd):/mnt/git tomologic/salt-git-diff
Default output format is YAML. You can get JSON instead:
docker run -i -v $(pwd):/mnt/git tomologic/salt-git-diff -o json
# Output
YAML format:- '*'
- host2.example.com
- host3.example.com
- '*.subdomain.example.com'JSON format (-o json):
[
"*",
"host2.example.com",
"host3.example.com",
"*.subdomain.example.com"
]Plain text format (-o text)
*
host2.example.com
host3.example.com
*.subdomain.example.com# Asterisk substitution
docker run -i -v $(pwd):/mnt/git tomologic/salt-git-diff -o text --replace-asterisks=something
something
host2.example.com
host3.example.com
something.subdomain.example.com
# Limitations
* Skips any selector with ":" in it in top file, like "os:CentOS"