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
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
1.1k
dotNET_vulnclicker_intro.pdf
deka_morita
0
150
[Dev Group Paris Octobre 26] Agentforce, SIforce, Claudeforce, Slackbot… on s'y retrouve ?
nabondance
0
120
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.7k
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
1.8k
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
340
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
1k
Inertia Rails: The One-Person Framework with React & Friends
skryukov
0
120
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
810
続・コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions-again
handlename
0
130
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
180
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
2
220
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1033
470k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
280
The Limits of Empathy - UXLibs8
cassininazir
2
730
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
The Curious Case for Waylosing
cassininazir
1
580
Discover your Explorer Soul
emna__ayadi
2
1.3k
How STYLIGHT went responsive
nonsquared
100
6.3k
Product Roadmaps are Hard
iamctodd
55
13k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
490
It's Worth the Effort
3n
188
29k
Optimising Largest Contentful Paint
csswizardry
37
4k
Design in an AI World
tapps
1
360
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
ΠϯϕϯτϦͷ໘Έͳ͍͍ͯ͘ͷͰएׯָʁ
͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ