Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ansible_kumamoto_PyCon9ku
Search
koedoyoshida
January 22, 2022
Programming
1
240
ansible_kumamoto_PyCon9ku
インフラエンジニアの急激なansibleバージョンアップ対応/熊本温泉案内
koedoyoshida
January 22, 2022
Tweet
Share
More Decks by koedoyoshida
See All by koedoyoshida
DebConf25参加報告
koedoyoshida
0
10
AlmaLinux Users Meetup 2025 Summer / AlmaLinuxの活動
koedoyoshida
0
150
CentOS後継!業務システムで使えるAlmaLinux for Enterprise
koedoyoshida
0
120
AlmaLinux Users Meetup 2025 Summer / サイバートラストのAlmaLinuxへの取り組み
koedoyoshida
0
140
AlmaLinux 10 / 9.6 リリース! ―変わるところと変わらないところ―
koedoyoshida
0
2.4k
almalinux.orgの翻訳による貢献
koedoyoshida
0
120
CentOS 7サポート終了直前!次はどうする?
koedoyoshida
1
670
止まらないLinuxシステムを構築する_高信頼性クラスタ入門
koedoyoshida
4
4.5k
CentOS7サポート終了まで約半年 EoL後のOSを使い続けるとどうなる?
koedoyoshida
0
840
Other Decks in Programming
See All in Programming
GeistFabrik and AI-augmented software development
adewale
PRO
0
260
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
3
1.2k
配送計画の均等化機能を提供する取り組みについて(⽩⾦鉱業 Meetup Vol.21@六本⽊(数理最適化編))
izu_nori
0
130
[SF Ruby Conf 2025] Rails X
palkan
0
450
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
180
UIデザインに役立つ 2025年の最新CSS / The Latest CSS for UI Design 2025
clockmaker
17
6.7k
TVerのWeb内製化 - 開発スピードと品質を両立させるまでの道のり
techtver
PRO
3
1.4k
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
6
2k
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
150
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
10
11k
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
hasibirok0
0
210
AIコーディングエージェント(NotebookLM)
kondai24
0
130
Featured
See All Featured
Designing for Performance
lara
610
69k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
54k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Side Projects
sachag
455
43k
The Cult of Friendly URLs
andyhume
79
6.7k
Typedesign – Prime Four
hannesfritz
42
2.9k
KATA
mclloyd
PRO
32
15k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
Faster Mobile Websites
deanohume
310
31k
Transcript
インフラエンジニアの急 激なansibleバージョン アップ対応/熊本温泉案内 Twitter:koedoyosihda #PyCon9ku
None
お前誰よ サイバートラスト株式会社 MIRACLE LINUX サポート/OSS委員長等 Python Software Foundation Managing members
2021- 一般社団法人PyCon JP Association 理事 PyCon JP 2021 会計 PyCon JP 2014(APAC)-2021 Staff PyCon JP 2017-2019 Chair Open Source Summit Japan (OSSJ,旧Linux Con)Staff 2008-
仕事と趣味 サイバートラスト株式会社 所属、MIRACLE LINUX の製品サポート などを行っている。 小江戸らぐ、東京エリアDebian勉強会 などの OSSコミュニティ活動にも参加している。 趣味は温泉巡り、OSCやカンファレンスに参加した際にもよく現地の
温泉に行く、2018年は蒲田黒湯、箱根温泉、埼玉宮沢湖温泉、長野 大柴温泉、名古屋三蔵温泉、大阪住之江温泉、石川湯涌温泉、松山道 後温泉、台湾北投温泉、シンガポール湯の森温泉などに訪問した。 twitter @koedoyoshida
温泉のおすすめ 熊本県は温泉が豊富です。 おすすめ,天草:湯楽亭 blog要チェック
平山温泉、山鹿温泉
ふもと旅館(日本秘湯を守る会)など黒川温泉
黒川温泉湯めぐり • 良い温泉が沢山ある高級温泉地 • 24軒以上の温泉宿、すべてめぐると • 湯めぐり達人認定(2013/11)
閑話休題
Pythonとの関わり python自体はzope(zwiki)で社内サイトを作ったあたりからの使用者 仕事はインフラエンジニア的な関わりがメイン ansibleでのインフラ構築や自動テストでymlを書く等 PyCon JP(2015あたり)でansibleを知って使い始めた
ansibleのバージョンアップが激しい 少し前までのansibleのバージョン 2.x 最新は?
ansibleのバージョンアップが激しい 少し前までのansibleのバージョン 2.x 最新はansible 5.2 https://pypi.org/project/ansible/#history どんどん以前の書き方がobsoleteになっていく 5.2.0 Jan 13,
2022 5.0.1 Dec 3, 2021 4.10.0 Dec 15, 2021 4.0.0 May 19, 2021 3.4.0 May 12, 2021 2.10.7 Feb 10, 2021 2.0.0 Sep 4, 2015
環境ごとに微妙に異なる実行環境 環境ごとに微妙に使用しているモジュールが違う ANSIBLE GALAXYなどから導入されるモジュール keywordの更新(obsoleteになるものと新規定義されるもの) 新旧どちらでも動くようにymlを管理するのは大変面倒 pip install ansible==2.10.7
以前に書いたansibleのymlを利用するには ansibleの実行環境を維持(再構築)しよう ansibleはpythonで作成され、pipでインストールできる つまり、pythonのバージョンとansibleのバージョンが同じなら その実行環境で以前に書いたansibleのymlが再利用できる OS標準のPythonやpipを使うとその環境の再現にはOS再インストー ルから必要になってしまう... おすすめはOS独立で環境を固定、再構築しやすくする->venv
OS独立で環境を固定、再構築しやすくする pythonのバージョンの固定 欲しいバージョン(ansible等の要件)の公式インストーラ pythonをダウンロード&ローカルでビルド 例:pypi.org/project/ansible/2.10.7/ $ sudo make altinstall ansibleのバージョンの固定
ビルドしたpythonで作ったvenv(サブディレクトリ)内にインストール $ python3.9 -m venv envpython3.9-ansible2.10.7 $ . envpython3.9-ansible2.10.7/bin/activate $ pip install ansible==2.10.7 pypiをみれば必要な情報が分かる envの名前で主要バージョンが分かるようにすると便利
OSとPythonの微妙な関係 OSパッケージのPythonを使わない理由 pythonに限った話ではなく、言語系パッケージに共通する話 • OSパッケージのPythonやpipを使うとその環境の再現にはOS再イ ンストールから必要になってしまう... • 他の(開発環境以外の)実行環境に持っていけなくなる • OSパッケージのpython等はOSに含まれるpython製のアプリケー
ションパッケージを動かすための環境。自作アプリ用ではない(私 見) • パッケージ提供の言語やpipバージョンが古いなど気に入らないと ころがあってそれを修正すると... • OS提供のパッケージの動作に問題がでる • システム設定系のモジュールがPythonで書かれていたりする...
OS付属のpython MIRACLE LINUX8/CentOS8/RockeyLinux8/AlmaLinux8/Red Hat Enterprise Linux 8 などインストール直後のデフォルト状態では "python" コマンドが存在しません。
• platform-python: OSに同梱の各種システムツールが利用するた めのPython。実行ファイルは /usr/libexec/platform-python に インストールされ、ユーザのプログラムで利用することは推奨され ない。 • python3: 8世代の標準的なPythonは3.x、xは随時変更されます。 • dnf --showduplicates list | grep python3 • python2:EOLだが、現状インストールは可能 • dnf --showduplicates list python2