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
hiyokotaisa
November 08, 2018
Technology
1
1.3k
Red Hat Tech Night 2018: Ansible x Network Ansibleで実践するネットワーク自動化
2018/11/8(木)に開催されたRed Hat Tech Night 2018のLT資料です。
hiyokotaisa
November 08, 2018
Tweet
Share
More Decks by hiyokotaisa
See All by hiyokotaisa
JTF2020 C1: テクニカルサポートエンジニアという働き方
hiyokotaisa
2
15k
RHTN - 5分でわかるAnsible TowerのSSO
hiyokotaisa
0
250
Interact 2019 -OP01: ひよこでもわかるAnsible AnsibleによるAzure構成管理
hiyokotaisa
3
2.8k
RHTN: Ansible 2.8 x Windows
hiyokotaisa
1
3.9k
Twitter転職でなってみたグローバルサポートエンジニア
hiyokotaisa
1
2.1k
インフラ勉強会にみるコミュニティへの「貢献」
hiyokotaisa
2
3k
AnsibleではじめるWindows自動化
hiyokotaisa
7
6.5k
Other Decks in Technology
See All in Technology
株式会社EventHub・エンジニア採用資料
eventhub
0
4.3k
2024.02.19 W&B AIエージェントLT会 / AIエージェントが業務を代行するための計画と実行 / Algomatic 宮脇
smiyawaki0820
13
3.3k
ビジネスモデリング道場 目的と背景
masuda220
PRO
9
520
バックエンドエンジニアのためのフロントエンド入門 #devsumiC
panda_program
18
7.5k
あれは良かった、あれは苦労したB2B2C型SaaSの新規開発におけるCloud Spanner
hirohito1108
2
580
TAMとre:Capセキュリティ編 〜拡張脅威検出デモを添えて〜
fujiihda
2
240
Amazon S3 Tablesと外部分析基盤連携について / Amazon S3 Tables and External Data Analytics Platform
nttcom
0
130
速くて安いWebサイトを作る
nishiharatsubasa
10
12k
Platform Engineeringは自由のめまい
nwiizo
4
2.1k
2025-02-21 ゆるSRE勉強会 Enhancing SRE Using AI
yoshiiryo1
1
330
エンジニアのためのドキュメント力基礎講座〜構造化思考から始めよう〜(2025/02/15jbug広島#15発表資料)
yasuoyasuo
17
6.7k
地方拠点で エンジニアリングマネージャーってできるの? 〜地方という制約を楽しむオーナーシップとコミュニティ作り〜
1coin
1
230
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
229
18k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.2k
Scaling GitHub
holman
459
140k
Bash Introduction
62gerente
611
210k
Building Applications with DynamoDB
mza
93
6.2k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
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