Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Red Hat Tech Night 2018: Ansible x Network Ansi...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
hiyokotaisa
November 08, 2018
Technology
1.4k
1
Share
Red Hat Tech Night 2018: Ansible x Network Ansibleで実践するネットワーク自動化
2018/11/8(木)に開催されたRed Hat Tech Night 2018のLT資料です。
hiyokotaisa
November 08, 2018
More Decks by hiyokotaisa
See All by hiyokotaisa
JTF2020 C1: テクニカルサポートエンジニアという働き方
hiyokotaisa
2
15k
RHTN - 5分でわかるAnsible TowerのSSO
hiyokotaisa
0
310
Interact 2019 -OP01: ひよこでもわかるAnsible AnsibleによるAzure構成管理
hiyokotaisa
3
3k
RHTN: Ansible 2.8 x Windows
hiyokotaisa
1
4.2k
Twitter転職でなってみたグローバルサポートエンジニア
hiyokotaisa
1
2.3k
インフラ勉強会にみるコミュニティへの「貢献」
hiyokotaisa
2
3.1k
AnsibleではじめるWindows自動化
hiyokotaisa
7
6.8k
Other Decks in Technology
See All in Technology
もりもり新機能を一挙紹介! AgentCoreに入門して、AWS上にAIエージェントを構築しよう
minorun365
PRO
5
310
AI時代から振り返るTerraform drift運用の歴史 / AI Age Reflections on the History of Terraform Drift Operations
aeonpeople
0
600
Gradle×GitHub_ActionsでCI時間を約50%短縮 ジョブ分割の設計と落とし穴 / Cutting CI Time by ~50% with Gradle and GitHub Actions: Job-Splitting Design and Pitfalls
takatty
0
540
Amazon CloudFrontにおけるAIボットアクセス制御のポイント
kizawa2020
5
310
先取りMaven4 ~16年ぶりのメジャーアップデート、その進化とは?~
ogiwarat
0
100
オンコールの負荷軽減のためのBits Assistant 活用方法 / How to Use Bits Assistant to Reduce the Workload on On-Call Staff
sms_tech
1
350
エンジニアは生成AIと どのように向き合うべきか? ことばの意味という観点から
verypluming
3
300
oracle-to-databricks-migration-with-llm-and-dbt
casek
1
380
JJUG CCC 2026 Spring AI時代の開発こそ標準化を武器に! ― 方式・プロセス・プラットフォームの標準化
s27watanabe
2
630
Platform Engineering as a Product: Criteria for Improvement and Multi-Tenant Design
kumorn5s
0
400
Unlocking the Apps
pimterry
0
120
Cloud Run のアップデート 触ってみる&紹介
gre212
0
250
Featured
See All Featured
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.8k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
710
Site-Speed That Sticks
csswizardry
13
1.2k
A designer walks into a library…
pauljervisheath
211
24k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
520
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
590
Marketing to machines
jonoalderson
1
5.3k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Transcript
Ansible x Network Ansibleで実践するネットワーク自動化 Kento Yagisawa Technical Support Engineer -
Ansible Red Hat
Red Hat Who is Talking? 2 八木澤 健人 Technical Support
Engineer - Ansible Ansible Engine / Ansible Tower を 快適に使うお手伝いをしています @hiyoko_taisa
Red Hat おしながき ✓ ごあいさつ ▪ Ansibleでネットワークモジュールを使う ◦ Ansibleの動作 ◦
Ansibleの設定 ▪ 実行する ◦ Factsで情報を取得 ◦ Interfaceを設定する 3
Red Hat Ansibleでネットワークモジュールを使う 4
Red Hat Ansibleの動作 5 ターゲットノード Playbook Inventory SSH Pythonスクリプトへ変換 192.168.100.x
192.168.101.x ...
Red Hat Ansibleの設定 6 • ansible_connection を指定 network_cli: SSHプロトコルによる接続 netconf:
netconfプロトコルによる接続 (Juniper Junos等) httpapi: Cisco NX-OSやArista EOS向けのAPI経由での接続 • ansible_network_os を指定(Cisco IOS なら ios など)
Red Hat 実行する 7
Red Hat factsで情報を取得 8 --- - hosts: all gather_facts: no
tasks: - name: gather vyos config vyos_facts: gather_subset: all - name: print vyos config debug: msg: "{{ ansible_facts }}" test.yml
Red Hat 実行結果 9 TASK [print vyos config] ******************************************************* ok:
[192.168.100.254] => { "msg": { "net_commits": [ ~~~ "net_config": [ "set interfaces ethernet eth0 address 'dhcp' set interfaces ethernet eth0 duplex 'auto' set interfaces ethernet eth0 hw-id '08:00:27:0f:ec:bf' set interfaces ethernet eth0 smp_affinity 'auto' set interfaces ethernet eth0 speed 'auto' set interfaces ethernet eth1 hw-id '08:00:27:61:f5:c9' set interfaces ethernet eth2 hw-id '08:00:27:5b:4a:45' set interfaces ethernet eth3 hw-id '08:00:27:05:3d:f2'
Red Hat Interfaceを設定 10 - name: Set eth1 IPv4 address
vyos_l3_interface: name: eth1 ipv4: 192.168.101.254/24 test.yml
Red Hat 実行結果 11 set interfaces ethernet eth0 address 'dhcp'
set interfaces ethernet eth0 duplex 'auto' set interfaces ethernet eth0 hw-id '08:00:27:0f:ec:bf' set interfaces ethernet eth0 smp_affinity 'auto' set interfaces ethernet eth0 speed 'auto' set interfaces ethernet eth1 address '192.168.101.254/24' set interfaces ethernet eth1 hw-id '08:00:27:61:f5:c9'
Red Hat ネットワークモジュールも活用して Happy Automation! 12
THANK YOU plus.google.com/+RedHat linkedin.com/company/red-hat youtube.com/user/RedHatVideos facebook.com/redhatinc twitter.com/RedHatNews 13