2025-05-30 08:11:49 +02:00

41 lines
862 B
Markdown

# Sync-awx-inventory
## Description
This script this script synchronize the hosts source file with an AWX inventory
## Requirements
- [Rocky 9 GMo](https://gmodocs.dyndns.org/system/rocky/installation/)
- Package
- jq
## Installation
### Script
```bash
cp sync-awx-inventory /usr/local/bin/
```
### AWX credentials
Authentication by token. See [](https://ansible.readthedocs.io/projects/awx/en/latest/) to create token
```bash
cat << EOF > $HOME/.awxcred
token=werfgg....drf
```
### Cron
```bash
echo " */7 * * * * root ./usr/local/bin/sync-awx-inventory.sh > /dev/null 2>&1" > /etc/cron/sync-awx-inventory.cron
```
## Usage
```bash
sudo /usr/local/bin/sync-awx-inventory.sh --help
```
## Logs
```bash
sudo journalctl -f -t syn_awx_inv
```
## Changelog
#### [1.0] - 29.05.2025
##### Added
- Version from scratch by [GMo](mailto:gilles.mouchet@gmail.com)