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
350
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
290
Apache Commonsに関するお話
mystelynx
2
1k
Other Decks in Programming
See All in Programming
AIとGame Jamで、ゲームを完成させた話
takahirosaeki
0
120
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
140
Can LLMs Replicate 4 Years of Compose Migration? Exploring the boundaries of automation with 279 XML files from a real product
makun
0
130
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
5.9k
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
240
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
270
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
330
kubernetes コンポーネント開発入門 / 新卒N年目の勉強会&交流会!〜〇〇への誘い〜 #n_study
mazrean
0
200
業務時間外もAIに働いてもらう話
colorful12
3
10k
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
4
630
Security issues being discussed on Web Platforms
petamoriken
0
630
スマート反転とウェブアクセシビリティ
camiha
0
180
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
699
190k
Claude Code のすすめ
schroneko
67
230k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
380
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.9k
Building an army of robots
kneath
306
46k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.7k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
730
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
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
ΠϯϕϯτϦͷ໘Έͳ͍͍ͯ͘ͷͰएׯָʁ
͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ