Last active
January 22, 2019 14:00
-
-
Save orange634nty/44e1626933ce75f2c62f2c3a7080179e to your computer and use it in GitHub Desktop.
この記事で使用しているコード:https://qiita.com/orange634nty/items/7927634d471805e460fe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ssh_connection] | |
ssh_args = -F ssh_config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[develop] | |
default ansible_host=default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. | |
├── 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