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
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
5
AlmaLinux Users Meetup 2025 Summer / AlmaLinuxの活動
koedoyoshida
0
140
CentOS後継!業務システムで使えるAlmaLinux for Enterprise
koedoyoshida
0
76
AlmaLinux Users Meetup 2025 Summer / サイバートラストのAlmaLinuxへの取り組み
koedoyoshida
0
130
AlmaLinux 10 / 9.6 リリース! ―変わるところと変わらないところ―
koedoyoshida
0
1.9k
almalinux.orgの翻訳による貢献
koedoyoshida
0
120
CentOS 7サポート終了直前!次はどうする?
koedoyoshida
1
650
止まらないLinuxシステムを構築する_高信頼性クラスタ入門
koedoyoshida
4
4.4k
CentOS7サポート終了まで約半年 EoL後のOSを使い続けるとどうなる?
koedoyoshida
0
820
Other Decks in Programming
See All in Programming
Devvox Belgium - Agentic AI Patterns
kdubois
1
150
オープンソースソフトウェアへの解像度🔬
utam0k
17
3.2k
Devoxx BE - Local Development in the AI Era
kdubois
0
150
CSC305 Lecture 08
javiergs
PRO
0
280
AI 駆動開発におけるコミュニティと AWS CDK の価値
konokenj
5
290
Cursorハンズオン実践!
eltociear
2
1.2k
Leading Effective Engineering Teams in the AI Era
addyosmani
7
660
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
34k
チームの境界をブチ抜いていけ
tokai235
0
230
Claude Agent SDK を使ってみよう
hyshu
0
1.4k
開発組織の戦略的な役割と 設計スキル向上の効果
masuda220
PRO
10
1.8k
Migration to Signals, Resource API, and NgRx Signal Store
manfredsteyer
PRO
0
130
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.7k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
Keith and Marios Guide to Fast Websites
keithpitt
411
23k
The Language of Interfaces
destraynor
162
25k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
Raft: Consensus for Rubyists
vanstee
140
7.2k
Writing Fast Ruby
sferik
630
62k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.1k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
RailsConf 2023
tenderlove
30
1.3k
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