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
840
空前絶後のォォ!超絶怒濤の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
240
勝手にAlibaba Cloud White Beltシリーズ Elastic Compute Service(ECS)/alieaters-20190301
morita92hiro
0
390
夏休みで差がつく!Ansible/ansiblejp-20180803
morita92hiro
2
2.6k
希望のRancher〜コンテナをアウフヘーベン〜/ranchermeetup-20171006
morita92hiro
0
270
いまからDockerで始めるGitLab CE/gitlabjp-20170919
morita92hiro
1
1.3k
月額10円から作るServerless Website〜Azure編〜/serverlessfukuoka-20170825
morita92hiro
8
16k
コンテナ運用いきのこるには/ranchermeetup-20170807
morita92hiro
1
560
AWS Summit Tokyoをお探しですか?/jawsug-20170713
morita92hiro
0
160
Other Decks in Technology
See All in Technology
CAMERA-Suite: 広告文生成のための評価スイート / ai-camera-suite
cyberagentdevelopers
PRO
3
260
Amazon_CloudWatch_ログ異常検出_導入ガイド
tsujiba
4
1.5k
Automated Promptingを目指すその前に / Before we can aim for Automated Prompting
rkaga
0
110
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
5
49k
生成AIとAWS CDKで実現! 自社ブログレビューの効率化
ymae
2
320
なんで、私がAWS Heroに!? 〜社外の広い世界に一歩踏み出そう〜
minorun365
PRO
6
1.1k
「 SharePoint 難しい」ってよく聞くけど、そんなに言うなら8歳の息子に試してもらった
taichinakamura
1
580
フルカイテン株式会社 採用資料
fullkaiten
0
36k
[JAWS-UG金沢支部×コンテナ支部合同企画]コンテナとは何か
furuton
3
230
小規模に始めるデータメッシュとデータガバナンスの実践
kimujun
3
560
Gradle: The Build System That Loves To Hate You
aurimas
2
140
Fargateを使った研修の話
takesection
0
110
Featured
See All Featured
Optimizing for Happiness
mojombo
376
69k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
228
52k
Happy Clients
brianwarren
97
6.7k
The Cult of Friendly URLs
andyhume
78
6k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Writing Fast Ruby
sferik
626
61k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
Automating Front-end Workflow
addyosmani
1365
200k
Art, The Web, and Tiny UX
lynnandtonic
296
20k
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
For a Future-Friendly Web
brad_frost
175
9.4k
Fireside Chat
paigeccino
32
3k
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