Skip to content

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.

  1. Create command files for each vendor

    config/cisco/ntp.txt ← Cisco commands
    config/cisco/ntp_pre.txt ← show commands before (optional)
    config/cisco/ntp_post.txt ← show commands after (optional)
    config/alcatel/ntp.txt ← Alcatel commands
  2. Test on one device

    Terminal window
    python -m src --task NTP --commands ntp --ip 10.0.0.1 --vendor cisco
  3. Preview without connecting

    Terminal window
    python -m src --task NTP --commands ntp --devices config/devices.csv --dry-run
  4. Roll out

    Terminal window
    python -m src --task NTP --commands ntp --devices config/devices.csv --workers 20
FileRequiredPurpose
config/{vendor}/{task}.txtYesCommands to push
config/{vendor}/{task}_pre.txtNoShow commands before push
config/{vendor}/{task}_post.txtNoVerification commands after push
config/{vendor}/{role_suffix}/{task}.txtNoRole override (takes priority)

The --task label creates a {TASK}_status and {TASK}_date column in INVENTORY/inventory.csv, so you can track rollout progress per task independently.