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/fukuten-20170127
Search
Kunihiro Morita
January 27, 2017
Technology
0
860
空前絶後のォォ!超絶怒濤のAnsible/fukuten-20170127
Fukuoka.NET #5 2017/1/27 LT資料です。
Kunihiro Morita
January 27, 2017
Tweet
Share
More Decks by Kunihiro Morita
See All by Kunihiro Morita
絵で覚える AWS 全 (?) サービス入門 〜 できるAWSカルタ 〜/jawsug-20191019
morita92hiro
1
2.3k
決戦用MSセンチネル/alterbooth-20190606
morita92hiro
1
250
勝手にAlibaba Cloud White Beltシリーズ Elastic Compute Service(ECS)/alieaters-20190301
morita92hiro
0
400
夏休みで差がつく!Ansible/ansiblejp-20180803
morita92hiro
2
2.6k
希望のRancher〜コンテナをアウフヘーベン〜/ranchermeetup-20171006
morita92hiro
0
290
いまからDockerで始めるGitLab CE/gitlabjp-20170919
morita92hiro
1
1.4k
月額10円から作るServerless Website〜Azure編〜/serverlessfukuoka-20170825
morita92hiro
8
17k
コンテナ運用いきのこるには/ranchermeetup-20170807
morita92hiro
1
570
AWS Summit Tokyoをお探しですか?/jawsug-20170713
morita92hiro
0
180
Other Decks in Technology
See All in Technology
Accessibility Inspectorを活用した アプリのアクセシビリティ向上方法
hinakko
0
180
RubyでKubernetesプログラミング
sat
PRO
4
160
Git scrapingで始める継続的なデータ追跡 / Git Scraping
ohbarye
5
500
20250116_自部署内でAmazon Nova体験会をやってみた話
riz3f7
1
100
iPadOS18でフローティングタブバーを解除してみた
sansantech
PRO
1
150
ABWGのRe:Cap!
hm5ug
1
120
.NET AspireでAzure Functionsやクラウドリソースを統合する
tsubakimoto_s
0
190
30分でわかる「リスクから学ぶKubernetesコンテナセキュリティ」/30min-k8s-container-sec
mochizuki875
3
450
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
1
16k
生成AI × 旅行 LLMを活用した旅行プラン生成・チャットボット
kominet_ava
0
160
DMMブックスへのTipKit導入
ttyi2
1
110
テストを書かないためのテスト/ Tests for not writing tests
sinsoku
1
170
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
98
18k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.2k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.4k
jQuery: Nuts, Bolts and Bling
dougneiner
62
7.6k
Code Review Best Practice
trishagee
65
17k
Agile that works and the tools we love
rasmusluckow
328
21k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
GitHub's CSS Performance
jonrohan
1030
460k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
Docker and Python
trallard
43
3.2k
VelocityConf: Rendering Performance Case Studies
addyosmani
327
24k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Transcript
ۭલઈޙͷΥΥʂ ઈౖᔶͷAnsible 2017/1/27 Fukuoka.NET (Fukuten) #5 1
Kunihiro Morita AlterBooth,inc. Solutions Architect @morita92hiro morita92hiro http://hawaku.hateblo.jp 2017/1/27 Fukuoka.NET
(Fukuten) #5 2
2017/1/27 Fukuoka.NET (Fukuten) #5 3
Ansible by Red Hat 2017/1/27 Fukuoka.NET (Fukuten) #5 4
Red Hat ❤ Microsoft 2017/1/27 Fukuoka.NET (Fukuten) #5 5
Ansibleͱ 4 PythonͰಈ͘ 4 ίʔυͰΠϯϑϥΛߏཧ͢Δπʔϧ 4 Infrastructure as code 2017/1/27
Fukuoka.NET (Fukuten) #5 6
ྨࣅπʔϧ 4 chef 4 puppet 2017/1/27 Fukuoka.NET (Fukuten) #5 7
ͳͥ͏ʁ 2017/1/27 Fukuoka.NET (Fukuten) #5 8
ߏཧπʔϧͳ͠ 4 खॱॻΛݩʹखಈͰઃఆ 4 खಈͳͷͰϛε͓͖Δ 4 खॱॻ࠷৽ͷঢ়ଶʁ 4 ൿͷλϨ 4
ࢼ͞ΕΔهԱྗ 2017/1/27 Fukuoka.NET (Fukuten) #5 9
ߏཧπʔϧ͋Γ 4 खॱΛίʔυͰهड़ 4 ίʔυΛ࣮ߦͯࣗ͠ಈͰઃఆ 4 ίʔυ͕࠷৽ͷঢ়ଶ 4 όʔδϣϯཧͯ͠ɺҎલͷঢ়ଶʹ͢ͷ؆୯ 4
Կ࣮ߦͯ͠ಉ͡ঢ়ଶʢႈੑʣ 2017/1/27 Fukuoka.NET (Fukuten) #5 10
AnsibleΠϯετʔϧ $ pip install ansible 2017/1/27 Fukuoka.NET (Fukuten) #5 11
Ansibleͷཁૉ 4 inventory 4 module 4 playbook 2017/1/27 Fukuoka.NET (Fukuten)
#5 12
inventory ࡞ۀରͱͳΔϗετΛهड़͢ΔϑΝΠϧ [web] 192.168.0.10 [db] 192.168.0.20 2017/1/27 Fukuoka.NET (Fukuten) #5
13
module ΠϯετʔϧαʔϏεىಈͳͲίϚϯυͷ෦ 4 yum 4 service $ ansible -i hosts
web -m ping 192.168.0.10 | success >> { "changed": false, "ping": "pong" } 2017/1/27 Fukuoka.NET (Fukuten) #5 14
playbook ϞδϡʔϧΛ࣮࣮ͯ͠ߦ͢Δ෦ - hosts: web sudo: yes tasks: - name:
be sure httpd is installed yum: name=httpd state=installed - name: be sure httpd is running and enabled service: name=httpd state=running enabled=yes 2017/1/27 Fukuoka.NET (Fukuten) #5 15
playbook࣮ߦ $ ansible-playbook -i hosts simple.yml PLAY [web] ************************************************************ GATHERING
FACTS *************************************************************** ok: [192.168.0.10] TASK: [be sure httpd is installed] ******************************************** changed: [192.168.0.10] TASK: [be sure httpd is running and enabled] ********************************** changed: [192.168.0.10] PLAY RECAP ******************************************************************** 192.168.0.10 : ok=3 changed=2 unreachable=0 failed=0 2017/1/27 Fukuoka.NET (Fukuten) #5 16
MacͰͬͯΈΔ 2017/1/27 Fukuoka.NET (Fukuten) #5 17
hosts localhost 2017/1/27 Fukuoka.NET (Fukuten) #5 18
playbook - hosts: localhost connection: local gather_facts: no tasks: -
name: tap homebrew cask homebrew_tap: tap=caskroom/cask state=present - name: install homebrew-cask homebrew: name=brew-cask state=latest - name: install dockertoolbox homebrew_cask: name=dockertoolbox state=present 2017/1/27 Fukuoka.NET (Fukuten) #5 19
playbook࣮ߦ $ ansible-playbook -i hosts localhost.yml -vv PLAY [localhost] **************************************************************
TASK: [tap homebrew cask] ***************************************************** <localhost> REMOTE_MODULE homebrew_tap tap=caskroom/cask state=present CHECKMODE=True ok: [localhost] => {"changed": false, "msg": "added: 0, unchanged: 1"} TASK: [install homebrew-cask] ************************************************* <localhost> REMOTE_MODULE homebrew name=brew-cask state=latest CHECKMODE=True ok: [localhost] => {"changed": false, "msg": "Package is already upgraded: brew-cask"} TASK: [install dockertoolbox] ************************************************ <localhost> REMOTE_MODULE homebrew_cask name=dockertoolbox state=present CHECKMODE=True changed: [localhost] => {"changed": true, "msg": "Cask would be installed: dockertoolbox"} PLAY RECAP ******************************************************************** localhost : ok=3 changed=1 unreachable=0 failed=0 2017/1/27 Fukuoka.NET (Fukuten) #5 20
WindowsͰͬͯΈΔ 2017/1/27 Fukuoka.NET (Fukuten) #5 21
೦ͳ͕ΒAnsibleΛ ಈ͔͢͜ͱग़དྷ·ͤΜ ! 2017/1/27 Fukuoka.NET (Fukuten) #5 22
ಈ͔͢ʹ! 4 Windows্ʹLinuxͷԾϚγϯΛ༻ҙ͢Δ 4 Cygwinʢαϙʔτ֎ʣ 4 Windows Subsystem for Linux
2017/1/27 Fukuoka.NET (Fukuten) #5 23
playbook - hosts: windows tasks: - name: Install git win_chocolatey:
name: git - name: Install SourceTree win_chocolatey: name: sourcetree - name: Install Notepad++ win_chocolatey: name: notepadplusplus.install 2017/1/27 Fukuoka.NET (Fukuten) #5 24
ଞʹ 4 VagrantϓϩϏδϣχϯά 4 DockerΠϝʔδϏϧυ 4 ֤छΫϥυͷૢ࡞ʢAzure/AWS/OpenStackͳͲʣ ͳͲͳͲ 2017/1/27 Fukuoka.NET
(Fukuten) #5 25
Ansible͍͍ͨʗڵຯ͕͋Δʁ 4 ͍ 4 ͍͍͑ 2017/1/27 Fukuoka.NET (Fukuten) #5 26
2/16ൃച✨ http://amzn.to/2jwgzVb 2017/1/27 Fukuoka.NET (Fukuten) #5 27
ߪೖ͢Δʁ 4 ͍ 4 ͍͑͢ http://amzn.to/2jwgzVb 2017/1/27 Fukuoka.NET (Fukuten) #5
28