add yaml include feature
This commit is contained in:
39
README.md
39
README.md
@ -6,6 +6,7 @@ SSH-based network device configuration backup tool with support for multiple dev
|
||||
|
||||
- **Multi-device backup**: Configure multiple routers in YAML
|
||||
- **Device type templates**: Reusable command sets per device type
|
||||
- **Configuration includes**: Split large configs with `!include` directives
|
||||
- **Flexible authentication**: SSH agent, key files, or password
|
||||
- **Selective execution**: Backup specific devices with `--host` flags
|
||||
- **Professional CLI**: Standard flags, version info, and help
|
||||
@ -24,24 +25,30 @@ make build
|
||||
|
||||
### Basic Usage
|
||||
|
||||
1. **Create configuration file** (`config.yaml`):
|
||||
1. **Create configuration files**:
|
||||
|
||||
```yaml
|
||||
types:
|
||||
srlinux:
|
||||
commands:
|
||||
- show version
|
||||
- show platform linecard
|
||||
- info flat from running
|
||||
**Main config** (`config.yaml`):
|
||||
```yaml
|
||||
!include device-types.yaml
|
||||
|
||||
devices:
|
||||
asw100:
|
||||
user: admin
|
||||
type: srlinux
|
||||
asw120:
|
||||
user: admin
|
||||
type: srlinux
|
||||
```
|
||||
devices:
|
||||
asw100:
|
||||
user: admin
|
||||
type: srlinux
|
||||
asw120:
|
||||
user: admin
|
||||
type: srlinux
|
||||
```
|
||||
|
||||
**Device types** (`device-types.yaml`):
|
||||
```yaml
|
||||
types:
|
||||
srlinux:
|
||||
commands:
|
||||
- show version
|
||||
- show platform linecard
|
||||
- info flat from running
|
||||
```
|
||||
|
||||
2. **Run backup**:
|
||||
|
||||
|
Reference in New Issue
Block a user