ytti / oxidized

Oxidized is a network device configuration backup tool. It's a RANCID replacement!
Apache License 2.0
2.83k stars 933 forks source link

Edge case different password #2250

Closed adambarnett52 closed 2 years ago

adambarnett52 commented 3 years ago

Hi

I have got everything up and running, but now we have an edge case were one of our switches has a different password i was using models so my config looks like this:

model_map:
  arista: eos
  hp: procurve
  aosw: aosw
  sonicwall: sonicwall
  dell: powerconnect
  unifi: airos
  extreme: xos

models:
  eos:
    username: username
    password: <PASSWORD>
    vars:
      enable: true
      ssh_encryption: aes256-ctr
  procurve:
    username: <username>
    password:  <PASSWORD>
    vars:
      ssh_encryption: des,3des-cbc,aes256-ctr

i tired using groups and assigned the group to the name of the switch

  default: csv
  csv:
    file: ~/router.db
    delimiter: !ruby/regexp /:/
    map:
      name: 0
      model: 1
      group: 0

groups:
  switchname:
    password: blah 
    username: blah 

Which worked fine ( i think ) i am using git as my oputput and instead of storign the config for each switch by model it now started sotring it by name. this means we lost all the history for each device in git, is there a way around this or a better way of dealing with edge cases

Thanks

LucasHrmn commented 3 years ago

In the second code part your name and group are both set at 0

mortzu commented 2 years ago

no-feedback -> closed