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
ベンダー開発モジュールの使い方
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
yascaim
November 20, 2019
Technology
2.5k
3
Share
ベンダー開発モジュールの使い方
20191120 Ansiblejp ネットワーク部 LTで使用
yascaim
November 20, 2019
More Decks by yascaim
See All by yascaim
Ansible Towerでやってること、やれること、やりたいこと
yascaim
3
2.3k
Other Decks in Technology
See All in Technology
オライリーイベント登壇資料「鉄リサイクル・産廃業界におけるAI技術実応用のカタチ」
takarasawa_
0
370
Agent Skillsで実現する記憶領域の運用とその後
yamadashy
2
1.6k
「強制アップデート」か「チームの自律」か?エンタープライズが辿り着いたプラットフォームのハイブリッド運用/cloudnative-kaigi-hybrid-platform-operations
mhrtech
0
150
ボトムアップの改善の火を灯し続けろ!〜支援現場で学んだ、消えないための3つの打ち手〜 / 20260509 Kazuki Mori
shift_evolve
PRO
2
610
Building a Study Buddy AI Agent from Scratch: From Passive Chatbots to Autonomous Systems
itchimonji
0
150
React 19×Rustツール 進化の「ズレ」を設計で埋める
remrem0090
1
110
全社統制を維持しながら現場負担をどう減らすか〜プラットフォームチームとセキュリティチームで進めたSecurity Hub活用によるAWS統制の見直し〜/secjaws-security-hub-custom-insights
mhrtech
1
180
Modernizing Your HCL Connections Experience: Visual Report to chain, Profile Enhancements, and AI Integration
wannesrams
0
300
Shiny New Tools Won't Fix Your Problem
trishagee
1
120
Forget technical debt
ufried
0
180
AI時代に越境し、 組織を変えるQAスキルの正体 / QA Skills for Transforming an Organization
mii3king
5
4.2k
世界の中心でApp Runnerを叫ぶ FINAL
tsukuboshi
0
260
Featured
See All Featured
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
450
Exploring anti-patterns in Rails
aemeredith
3
350
Building Applications with DynamoDB
mza
96
7k
Mobile First: as difficult as doing things right
swwweet
225
10k
Chasing Engaging Ingredients in Design
codingconduct
0
190
How to train your dragon (web standard)
notwaldorf
97
6.6k
Google's AI Overviews - The New Search
badams
0
1k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Test your architecture with Archunit
thirion
1
2.2k
GitHub's CSS Performance
jonrohan
1032
470k
Transcript
1 ベンダー開発の モジュールの使い方 (オマケ) 手順書をPlaybook化 するときに気にしてる事 @yascaim1
2 仕事:DCNWの設計、構築? 好きなもの: - Ansible - ボードゲーム - 数学
- ケーキ Ansible歴:1年6か月 自己紹介
3 A10製品とAnsible
4 A10networksとは 製品概要: - ロードバランサー、セキュリティプラットフォームなど - CLI,GUI,APIが揃ってて ”Cisco” 触った人なら馴染み易い -
まだ商用で使えてないけど面白い機能が結構ある
5 https://docs.ansible.com/ansible/latest/modules/list_of_network_modules.html モジュールはどうなの?
6 あるところにはある 大体1,600くらい(やべー https://github.com/a10networks/a10-ansible
7 用法用量を守らない使い方
8 Ansibleもくもく会 また企画したろ。 モジュール増えたなぁ とりあえずgit clone したろ。 検証環境で ワークショップの復習だ!
9 Playbook全部動かない...ッ!
10 今のところ見つけた差分: - NW機器の接続プロトコルの書き方が違う - パラメータの名前が変わってて”undefined” - パラメータの型が変わってる - パラメータで指定できる値が変わってる
tasks: - name: Enable ethernet interfaces a10_interface_ethernet: a10_host: "{{ a10_host }}" a10_port: "{{ a10_port }}" a10_username: "{{ a10_username }}" a10_password: "{{ a10_password }}" ifnum: "{{ item.ifnum }}" action: enable state: present partition: test with_items: - { ifnum: 1 } - { ifnum: 2 } tasks: - name: Enable ethernet interfaces a10_interface_ethernet: a10_host: "{{ a10_host }}" a10_port: "{{ a10_port }}" a10_username: "{{ a10_username }}" a10_password: "{{ a10_password }}" a10_protocol: “https” ifnum: "{{ item.ifnum }}" action: enable state: present a10_partition: name: test shared: 0 with_items: - { ifnum: 1 } - { ifnum: 2 } プロトコル指定が requiredなパラメータで増えた パラメータの名前が変わってる 気付いたら辞書型になってる shared指定の仕方が変わってる
11 メリデメの整理
12 メリット: - やりたいこと:モジュール が 1:1で大体ある - YAMLで書くため、機器初心者でも可読性が高い - 強制的にモジュールのコードを読むことになる デメリット:
- Ansible docのリリースノートに載ってない - OSのリリースノートにも載ってない - モジュールを使ったサンプルコードが落ちてない 用法用量は模索中
13 まとめ
14 - 当然ですが商用環境でいきなりアップデートはやらない - github見て何かが違う!?って思ったらサポートに聞く - 極力、変数はPlaybookの外で管理する - library を別の
directoryで管理する(ansible.cfgで切替える)
ご清聴ありがとうございました! 15
16 おまけ(気を付けてること編)
17 動作確認 事前ログ取得 事後ログ取得 設定変更 ・どこから何を確認するかを明記 ・「異常がないこと」という記載を一切排除 ・作業前との比較結果 ↑全て比較、一致、含む、含まない で記述 ・設定変更/追加する順序を考える
- script投入の順番 - 作業機器の順番 ・作業を切り戻す際の順序を考える ・検証環境で絶対試す 最初からAnsible化することを想定し、 Playbookにし易い手順書を常に心がける。