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
850
空前絶後のォォ!超絶怒濤の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
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
190
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
580
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
170
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
130
10XにおけるData Contractの導入について: Data Contract事例共有会
10xinc
6
620
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
150
Can We Measure Developer Productivity?
ewolff
1
150
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
120
OCI 運用監視サービス 概要
oracle4engineer
PRO
0
4.8k
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
スクラムチームを立ち上げる〜チーム開発で得られたもの・得られなかったもの〜
ohnoeight
2
350
ハイパーパラメータチューニングって何をしているの
toridori_dev
0
140
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Typedesign – Prime Four
hannesfritz
40
2.4k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
GraphQLとの向き合い方2022年版
quramy
43
13k
Become a Pro
speakerdeck
PRO
25
5k
Rails Girls Zürich Keynote
gr2m
94
13k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Site-Speed That Sticks
csswizardry
0
23
BBQ
matthewcrist
85
9.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