Last active
October 31, 2019 05:26
-
-
Save Mo3g4u/7556a176cfe092c5e933b84dda0fcbaa to your computer and use it in GitHub Desktop.
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
# Ansible test environment | |
# https://app.vagrantup.com/centos/boxes/7 | |
Vagrant.configure("2") do |config| | |
config.vm.define "ansible_control" do |ansible_control| | |
ansible_control.vm.box = "centos/7" | |
ansible_control.vm.network "public_network", ip: "192.168.1.30" | |
ansible_control.vm.synced_folder "../control", "/vagrant" | |
end | |
config.vm.define "ansible_target" do |ansible_target| | |
ansible_target.vm.box = "centos/7" | |
ansible_target.vm.network "public_network", ip: "192.168.1.40" | |
ansible_target.vm.synced_folder "../target", "/vagrant" | |
end | |
end | |
# vagrant ssh-config で秘密鍵の場所確認 | |
# centos/7はデフォルトでvagrantユーザ以外でsuできない | |
# https://www.ikemo3.com/inverted/vagrant/centos6-su/ | |
# vagrant sshでサーバにログインし、/etc/pam.d/su の以下の行をコメントアウトする。再起動などは不要。 | |
# account required pam_succeed_if.so user notin root:vagrant | |
# ansibleユーザを作成して | |
# # usermod -aG wheel ansible |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment