Allow glob of --host and --yaml; cut release 1.2.1
This commit is contained in:
@ -79,16 +79,20 @@ Files are merged automatically using mergo. Later files override earlier ones:
|
||||
```bash
|
||||
# Load multiple files - later files override earlier ones
|
||||
ipng-router-backup --yaml 00-device-types.yaml --yaml config.yaml --yaml overrides.yaml
|
||||
|
||||
# Load files using glob patterns
|
||||
ipng-router-backup --yaml "*.yaml"
|
||||
ipng-router-backup --yaml "config/*.yaml"
|
||||
```
|
||||
|
||||
## Command Line Usage
|
||||
|
||||
### Required Flags
|
||||
- **`--yaml`**: Path to YAML configuration file(s) (can be repeated)
|
||||
- **`--yaml`**: Path to YAML configuration file(s) or glob patterns (can be repeated)
|
||||
|
||||
### Optional Flags
|
||||
- **`--output-dir`**: Output directory (default: `/tmp`)
|
||||
- **`--host`**: Specific hostname(s) to process (can be repeated)
|
||||
- **`--host`**: Specific hostname(s) or glob patterns to process (can be repeated)
|
||||
- **`--password`**: SSH password
|
||||
- **`--key-file`**: SSH private key file path
|
||||
- **`--port`**: SSH port (default: `22`)
|
||||
@ -96,14 +100,14 @@ ipng-router-backup --yaml 00-device-types.yaml --yaml config.yaml --yaml overrid
|
||||
### Examples
|
||||
|
||||
```bash
|
||||
# Basic usage
|
||||
ipng-router-backup --yaml config.yaml
|
||||
# Basic usage with glob patterns
|
||||
ipng-router-backup --yaml "*.yaml"
|
||||
|
||||
# Multiple files
|
||||
ipng-router-backup --yaml 00-device-types.yaml --yaml config.yaml
|
||||
|
||||
# Specific devices only
|
||||
ipng-router-backup --yaml config.yaml --host asw100 --host core-01
|
||||
# Devices matching patterns
|
||||
ipng-router-backup --yaml config.yaml --host "asw*" --host "*switch*"
|
||||
|
||||
# Custom output directory
|
||||
ipng-router-backup --yaml config.yaml --output-dir /backup/network
|
||||
|
Reference in New Issue
Block a user