Created
September 16, 2018 09:55
-
-
Save bngsudheer/5a1485325066c619cf0498564ec49656 to your computer and use it in GitHub Desktop.
Vagrantfile for Redmine
This file contains hidden or 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 = "centos/7" | |
config.vm.post_up_message = "Happy Redmine development" | |
config.vm.network "private_network", ip: "192.168.100.51" | |
config.vm.network :forwarded_port, guest: 22, host: 7101, id: 'ssh', auto_correct: false | |
# https://gist.github.com/amccarty/2137ae65ddada56c0865 | |
id_rsa_key_pub = File.read(File.join(Dir.home, ".ssh", "id_rsa.pub")) | |
config.vm.provision :shell, | |
:inline => "echo 'appending SSH Pub Key to ~vagrant/.ssh/authorized_keys' && echo '#{id_rsa_key_pub }' >> /home/vagrant/.ssh/authorized_keys && chmod 600 /home/vagrant/.ssh/authorized_keys" | |
config.ssh.insert_key = false | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment