On Mon, Sep 28, 2020 at 4:17 PM Richard Lucht <[email protected]> wrote: > > Hello experts, I am looking for a way to automate access ports for NAC on > legacy authentication. I only want to configure ports that already have > "switchport mode access" and the "authentication event server dead action > authorize vlan" we would like to match to the current vlan. > > I need to go from > int gi 0/1 > switchport access vlan 3216 > switchport mode access > switchport voice vlan 120 > spanning-tree portfast > > to > switchport access vlan 105 > switchport mode access > switchport voice vlan 120 > ip device tracking maximum 10 > authentication event server dead action authorize vlan 105 > authentication host-mode multi-auth > authentication order dot1x mab webauth > authentication priority dot1x mab > authentication port-control auto > authentication periodic > authentication timer reauthenticate server > mab > dot1x pae authenticator > dot1x timeout tx-period 10 > spanning-tree portfast > I have never used ansible to talk to a cisco box -- I am still struggling with my garden-variety juniper SRX box -- but if you could pull the config in ansible and register that in a variable, you should be able to do some probulating and create a list/dict that you can then feed to a loop.
-- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAHEKYV7c7NnRCaXP8srRQKHiQLawE8tj4pM2W-9mf6CsYmptXw%40mail.gmail.com.
