Adding a custom task
Any set of commands can become a Netpilot task. The --task label is recorded in the inventory; --commands points to the command files.
Example: NTP
Section titled “Example: NTP”-
Create command files for each vendor
config/cisco/ntp.txt ← Cisco commandsconfig/cisco/ntp_pre.txt ← show commands before (optional)config/cisco/ntp_post.txt ← show commands after (optional)config/alcatel/ntp.txt ← Alcatel commands -
Test on one device
Terminal window python -m src --task NTP --commands ntp --ip 10.0.0.1 --vendor cisco -
Preview without connecting
Terminal window python -m src --task NTP --commands ntp --devices config/devices.csv --dry-run -
Roll out
Terminal window python -m src --task NTP --commands ntp --devices config/devices.csv --workers 20
File naming convention
Section titled “File naming convention”| File | Required | Purpose |
|---|---|---|
config/{vendor}/{task}.txt | Yes | Commands to push |
config/{vendor}/{task}_pre.txt | No | Show commands before push |
config/{vendor}/{task}_post.txt | No | Verification commands after push |
config/{vendor}/{role_suffix}/{task}.txt | No | Role override (takes priority) |
Inventory tracking
Section titled “Inventory tracking”The --task label creates a {TASK}_status and {TASK}_date column in INVENTORY/inventory.csv, so you can track rollout progress per task independently.