Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Red Hat Tech Night 2018: Ansible x Network Ansi...
Search
hiyokotaisa
November 08, 2018
Technology
1.4k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
320
Interact 2019 -OP01: ひよこでもわかるAnsible AnsibleによるAzure構成管理
hiyokotaisa
3
3.1k
RHTN: Ansible 2.8 x Windows
hiyokotaisa
1
4.5k
Twitter転職でなってみたグローバルサポートエンジニア
hiyokotaisa
1
2.4k
インフラ勉強会にみるコミュニティへの「貢献」
hiyokotaisa
2
3.1k
AnsibleではじめるWindows自動化
hiyokotaisa
7
6.9k
Other Decks in Technology
See All in Technology
生成AIのテナント制御とシャドーMCP対策 | AIを"止めずに"、情報を守る
yukun
0
150
Gitは怖い?共有ワークスペースから始めるSnowflakeチーム開発
coco_se
0
130
アリアドネの糸と、20年ごとの建て替え ── 長尾真『電子図書館』を、伊勢で読み直す / Rereading Makoto Nagao’s "Electronic Library" in Ise
ykiyota
0
160
AIネイティブプロダクトで顧客価値を最大化するプロダクトエンジニアとFDEの協働
righttouch
PRO
0
230
山手線を徒歩で一周してわかった、 位置情報アプリは「足」が最強のデバッガー
hinakko
0
110
OpenTelemetry eBPF Instrumentationの舞台裏 / Behind the Scenes of OpenTelemetry eBPF Instrumentation
ymotongpoo
4
1k
From Vanilla Kubernetes to a Batteries-Included Platform: Developer Experience at 1,300+ Clusters
yosshi_
0
680
Redmine 7.0で私が開発した新機能の狙いと背景
vividtone
1
160
株式会社シーエーシー エンジニア向け会社紹介資料
cac
0
57k
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
3
460
10分で知る最近のOmarchy
komagata
0
260
アプリをもっと"iOSアプリっぽく"する小さな工夫 / Small Touches That Make Your App Feel More Like an iOS App
matsuji
1
560
Featured
See All Featured
Balancing Empowerment & Direction
lara
6
1.3k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
440
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
590
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Product Roadmaps are Hard
iamctodd
55
13k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
510
Producing Creativity
orderedlist
PRO
348
41k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
410
A designer walks into a library…
pauljervisheath
211
25k
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
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