oxidized
oxidized copied to clipboard
Output Git - how its working?
Hi community.
Please help me understand how the Output Git method works. I've read the manual, but couldn't find information about git push, commits, and other related operations.
It doesn't work automatically.
- In the config:
output:
default: git
debug: true
git:
user: oxidized
email: [email protected]
repo: "/root/.config/oxidized/git-repos/default.git"
- We have 2 groups:
groups:
dc:
username: oxidized
password:
vars:
enable: true
studios:
username: oxidized
password:
vars:
enable: true
- Oxi automatically created local directories with files:
/var/docker/oxidized/git-repos # ls
dc.git studios.git
/var/docker/oxidized/git-repos/dc.git # ls
config description HEAD hooks index info objects refs test.txt
- After reading configs from devices, Oxi updates files in the objects directory with names in hexadecimal:
/var/docker/oxidized/git-repos/dc.git/objects # ls
00 08 1f 2b 31 3e 43 46 53 5c 6f 7a 82 98 a4 aa b1 b8 bf c5 d6 d9 e5 ef info
02 09 24 30 3a 3f 44 4d 5b 63 74 7d 96 99 a6 ac b4 b9 c4 ce d8 df e9 fd pack
- I did a manual Git init and added a remote:
git remote add origin [email protected]:tech/oxidized-dc.git
- Checked Git status with default branch "main":
# git status
On branch main
- did manual push
# git push origin main
- see all files in remote repository
Why doesn't Oxi automatically push files with the normal names of devices? What branch Oxi use for automatically push configs ? How does the rugged/libgit2 interface from the output section work?