Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Ansible Study #1
Search
mystelynx
June 10, 2014
Programming
360
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ansible Study #1
Ansible勉強会#1の資料
mystelynx
June 10, 2014
More Decks by mystelynx
See All by mystelynx
渋谷Java #3
mystelynx
2
300
Apache Commonsに関するお話
mystelynx
2
1k
Other Decks in Programming
See All in Programming
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
810
phperだってパンチカードでコーディングしたい
o0h
PRO
0
460
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
4.7k
Next.js: The final boss of Web Performance
guaca
0
340
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
320
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
210
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
150
[2026-10-14](C)Re:ゼロから始める異世界生活〜始まりの終わりと終わりの始まり〜
tosite
0
160
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
1k
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
120
気持ちぃ〜角丸 Squircle
ryu1013
0
340
残高管理から台帳サービスへの進化
artoy
1
210
Featured
See All Featured
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
HDC tutorial
michielstock
2
980
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
380
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
580
The Curse of the Amulet
leimatthew05
3
16k
Building Adaptive Systems
keathley
44
3.3k
Tell your own story through comics
letsgokoyo
1
1.1k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
Unsuck your backbone
ammeep
672
58k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.5k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
450
Transcript
7BHSBOUº"OTJCMF "OTJCMFษڧձ 5PNPIJSP6SBLBXB !NZTUFMZOY ͓·͑୭Α
WBHSBOUDNE w 7BHSBOUpMFʹఆٛ͞Ε͍ͯΔ7.ʹର͠ɺ༷ʑͳ ૢ࡞Λߦ͏ɻ w VQ7.ͷىಈ w IBMU7.ͷγϟοτμϯ w TTI7.44)Ͱଓ͢Δ
w QSPWJTJPO7.ΛϓϩϏδϣχϯά͢Δ
7BHSBOU"OTJCMF
44)ଓՄೳͳ߹ 44)ଓෆՄೳͳ߹ "OTJCMFͷҾΛࢦఆ͍ͨ͠߹ WBHSBOUQSPWJTJPOͰͬͯΈΑ͏
config.vm.define 'ec2' do |ec2|
ec2.vm.provider :aws do |aws, override| aws.access_key_id = 'xxx' aws.secret_access_key = 'yyy' aws.keypair_name = 'zzz' aws.region = 'ap-‐northeast-‐1' aws.subnet_id = 'subnet-‐public' aws.security_groups = ['sg-‐open-‐22'] aws.ami = 'ami-‐xxxxxxx' aws.instance_type = 't1.micro' aws.tags = { 'Name' => 'test', } override.ssh.username = 'ec2-‐user' override.ssh.private_key_path = './xxx.pem' end ec2.vm.provision :ansible do |ansible| ansible.playbook = 'main.yml' #ansible.inventory_path = 'ࢦఆ͠ͳ͚Εࣗಈੜ' end end
IPTUTBMM ! UBTLT OBNF)FMMP EFCVHNTH)FMMP ! OBNF)FMMP EFCVHNTH)FMMP ! OBNFbΖʔ
EFCVHNTHΖʔ
vagrant provision 44)͕ͭͳ͕Δ߹ Ҏ্
FD3VOOJOHQSPWJTJPOFSBOTJCMF TIOPUJGZTFOEDPNNBOEOPUGPVOE ! 1-":<BMM> ! ("5)&3*/('"$54 PL<FD> !
5"4,<)FMMP> PL<FD>\ NTH)J "OTJCMF ^ ! 5"4,<)FMMP> PL<FD>\ NTH)J "OTJCMF ^ ! 5"4,<Ζʔ> PL<FD>\ NTH)J "OTJCMF ^ ! 1-":3&$"1 FDPLDIBOHFEVOSFBDIBCMFGBJMFE
44)ଓՄೳͳ߹ 44)ଓෆՄೳͳ߹ "OTJCMFͷҾΛࢦఆ͍ͨ͠߹ WBHSBOUQSPWJTJPOͰͬͯΈΑ͏
ssh_proxy_command = 'ssh -‐i ./yyy.pem ec2-‐user@step -‐W %h:%p' !
config.vm.define 'ec2' do |ec2| ec2.vm.provider :aws do |aws, override| aws.access_key_id = 'xxx' aws.secret_access_key = 'yyy' aws.keypair_name = 'zzz' aws.region = 'ap-‐northeast-‐1' aws.subnet_id = 'subnet-‐private' aws.private_ip_address = '172.31.15.251' aws.ssh_host_attribute = :private_ip_address aws.security_groups = ['sg-‐open-‐22'] aws.ami = 'ami-‐xxxxxxx' aws.instance_type = 't1.micro' aws.tags = { 'Name' => 'test', } override.ssh.username = 'ec2-‐user' override.ssh.private_key_path = './xxx.pem' override.ssh.proxy_command = ssh_proxy_command end ec2.vm.provision :ansible do |ansible| ansible.playbook = 'main.yml' end end
export ANSIBLE_SSH_ARGS='-‐o "-‐ProxyCommand ssh -‐ i ./yyy.pem ec2-‐user@step -‐W %h:%p"'
vagrant provision 44)͕ͭͳ͕Βͳ͍߹ Ҏ্ʁ # ansible.cfgΛ࡞͠ɺssh_argsʹɺ # ProxyCommand…Λઃఆ͢Δ vagrant provision
ssh_proxy_command = 'ssh -‐i ./yyy.pem ec2-‐user@step -‐W %h:%p' !
config.vm.define 'ec2' do |ec2| ec2.vm.provider :aws do |aws, override| aws.access_key_id = 'xxx' aws.secret_access_key = 'yyy' aws.keypair_name = 'zzz' aws.region = 'ap-‐northeast-‐1' aws.subnet_id = ‘subnet-‐private' aws.private_ip_address = '172.31.15.251' aws.ssh_host_attribute = :private_ip_address aws.security_groups = ['sg-‐open-‐22'] aws.ami = 'ami-‐xxxxxxx' aws.instance_type = 't1.micro' aws.tags = { 'Name' => 'test', } override.ssh.username = 'ec2-‐user' override.ssh.private_key_path = './xxx.pem’ override.ssh.proxy_command = ssh_proxy_command end ec2.vm.provision :ansible do |ansible| ansible.playbook = 'main.yml' ansible.raw_ssh_args = ["-‐o 'ProxyCommand #{ssh_proxy_command}'"] end end
vagrant provision 44)͕ͭͳ͕Βͳ͍߹ Ҏ্
44)ଓՄೳͳ߹ 44)ଓෆՄೳͳ߹ "OTJCMFͷҾΛࢦఆ͍ͨ͠߹ WBHSBOUQSPWJTJPOͰͬͯΈΑ͏
config.vm.define 'ec2' do |ec2|
ec2.vm.provider :aws do |aws, override| : தུ : end ec2.vm.provision :ansible do |ansible| ansible.playbook = 'main.yml' ansible.verbose = 'vv' ansible.tags = 'release' ansible.start_at_task = 'start_here' : end end ύϥϝʔλมߋͷͨͼʹॻ͖͑ʁ ˠͦ͏ͩɺ֎෦Խ͠Α͏ʂ
config.vm.define 'ec2' do |ec2|
ec2.vm.provider :aws do |aws, override| : தུ : end ec2.vm.provision :ansible do |ansible| ansible.playbook = 'main.yml' ansible.verbose = ENV['ANSIBLE_VERBOSE'] ansible.tags = ENV['ANSIBLE_TAGS'] ansible.start_at_task = ENV['ANSIBLE_START_AT_TASK'] : end end
export ANSIBLE_VERBOSE='vvvv' export ANSIBLE_TAGS='release' export ANSIBLE_START_AT_TASK='start_here' vagrant
provision ֎෦Խͱ͍͑ڥม Ҏ্ʁ
w ແବʹͨ͘͞Μͷڥม͕Ͱ͖Δ w "OTJCMFࣗମ͕༻͢Δڥมͱ໊લ͕ඃΔՄ ೳੑ͕͋Δ w "/4*#-&@$0/'*(ͱ͔ "/4*#-&@44)@"3(4ͱ͔͋ΔΑ w Ͳ͏͍͏ม͕͑Δͷ͔7BHSBOUpMF͔ͳ͍
ͱ͔Βͳ͍ਏ͍
config.vm.define 'ec2' do |ec2|
ec2.vm.provider :aws do |aws, override| : தུ : end ec2.vm.provision :ansible do |ansible| ansible.playbook = 'main.yml' ansible.raw_arguments = ENV.fetch('ANSIBLE_RAW_ARGUMENTS', '').split(' ') end end
export ANSIBLE_RAW_ARGUMENTS= "-‐vvvv —tags=release —start-‐at-‐task=start_here" vagrant provision ڥม͚ͭͩʹͨ͠߹
Ҏ্ ŖAшŖ ŝžŕ
w ଓͰ౿Έܦ༝Ͱɺ vagrant provision͚ͩͰؤுΕΔɻ w BOTJCMFʹΦϓγϣϯΛ͍ͨ͠߹ɺ ansible.raw_argumentsΛ͏ͱεοΩϦɻ w ૉʹBOTJCMFΛ͏ʁ w
ΠϯϕϯτϦͷ໘Έͳ͍͍ͯ͘ͷͰएׯָʁ
͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ