Skip to content

Instantly share code, notes, and snippets.

@orange634nty
Last active Jan 22, 2019
Embed
What would you like to do?
この記事で使用しているコード:https://qiita.com/orange634nty/items/7927634d471805e460fe
[ssh_connection]
ssh_args = -F ssh_config
[develop]
default ansible_host=default
# Makefile
#### vagrant ####
# 仮想環境起動
vup:
vagrant up
vagrant ssh-config > ssh_config
# 仮想環境削除
vdestroy:
vagrant destroy -f
# 仮想環境起動 + ansible実行
vinit:
make vup
make play
#### ansible ####
# ansible実行
play:
ansible-playbook -i hosts playbook.yml
# ansible実行(チェック)
check:
ansible-playbook -i hosts playbook.yml --check
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "mvbcoding/awslinux"
config.vm.provider :virtualbox do |vbox|
vbox.customize ["modifyvm", :id, "--cableconnected1", "on"]
end
config.vm.network "private_network", ip: "192.168.33.25"
end
.
├── Makefile
├── Vagrantfile
├── ansible.cfg
├── hosts
├── ssh_config # gitignoreする
├── playbook.yml # ↓これ以下は普通のansibleと同じです
├── roles/
├── var_groups/
└── vars/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment