Upgrade to Pro — share decks privately, control downloads, hide ads and more …

instudystyle

47982be7ff38d38f65eb179dbdfb24f5?s=47 KATSUYA
August 02, 2019

 instudystyle

47982be7ff38d38f65eb179dbdfb24f5?s=128

KATSUYA

August 02, 2019
Tweet

Transcript

  1. ઈରʹλϝʹͳΒͳ͍ AnsibleͰͷࣗಈԽ উஉ(@katu7414) JOTUVEZTUZMF

  2. ࣗݾ঺հ Network Automation https://github.com/Katsuya414 SR,Batfish,Ansible,PyATS,Genie JANOG44 ελοϑ NETCONओ࠵ऀ !LBUV !2

     JOTUVEZTUZMF
  3. ௼Γ͕झຯ

  4. ࢖͍ͬͯΔࣗಈԽπʔϧ JOTUVEZTUZMF

  5. • configมߋ͢ΔͳΒҰ൪ศར • ֶशίετ͕௿͍ͷͰνʔϜϝϯόʔʹਁಁ ͠΍͍͢ • ίʔυ͕ಡΈ΍͍͢ͱݴ͏ͷ͸ࣗಈԽ͢Δʹ ͋ͨͬͯ࠷΋ॏཁͳཁૉͷҰͭ • ϚϧνϕϯμʔରԠ͋Γ͕͍ͨ

    JOTUVEZTUZMF
  6. Ansible Example code - hosts: iosxr gather_facts: no connection: local

    tasks: - name: configure interface settings iosxr_config: lines: - router static - router static vrf SHIMA - router static vrf SHIMA address-family ipv4 unicast ίʔυ͕ಡΈ΍͍͢ͷ͸ ࠾༻ཧ༝ʹͳΔ JOTUVEZTUZMF
  7. AnsibleͰconfig౤ೖ͢Δͱ͖ͷ ੾Γ໭ͬͯ͠Ͳ͏΍ͬͯΔͷʁ JOTUVEZTUZMF

  8. ৭ʑํ๏͸͋Γͦ͏͚ͩͲ ͔ͤͬ͘ͳͷͰAnsible2.7͔Β ରԠͨ͠ํ๏Ͱ΍Δ JOTUVEZTUZMF

  9. commit࣌ͷϥϕϧͰղܾ JOTUVEZTUZMF

  10. Ansible code - hosts: iosxr gather_facts: no connection: local tasks:

    - name: configure interface settings iosxr_config: lines: - ip address 172.31.1.1 255.255.255.0 - no shutdown parents: interface gi0/1/0/0 label: abcdefg ίʔυ͕ಡΈ΍͍͢ͷ͸ ࠾༻ཧ༝ʹͳΔ JOTUVEZTUZMF
  11. Show xrv#show configuration commit list Fri Jun 7 10:41:28.293 JST

    SNo. Label/ID User Line Client Time Stamp ~~~~ ~~~~~~~~ ~~~~ ~~~~ ~~~~~~ ~~~~~~~~~~ 1 abcdefg root vty0: CLI Fri Jun 7 10 JOTUVEZTUZMF
  12. Result xrv#rollback configuration abcdefg JOTUVEZTUZMF

  13. ·ͱΊ • ޻ࣄखॱॻ͕࡞Γ΍͘͢ͳͬͨ • ͓લͦͷίʔυ్͕தͰࢭ·ͬͨΒͲ͏͢Δ ͷʁ͓͡͞ΜʹউͯΔΑ͏ʹͳͬͨ • Ansibleͷ௥Ճػೳͱ͔͸ࡉ͔͘νΣοΫͯ͠ ͓͍ͨํ͕͍͍Ͷ

  14. ͋Γ͕ͱ͏͍͟͝·ͨ͠