diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..cdddb6c --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,24 @@ +# Defines our Vagrant environment +# +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + config.vm.box = "debian/bullseye64" + # Pour ne pas avoir le nom default par defaut + config.vm.define "gitlab" + config.vm.hostname = "gitlab" + config.vm.network :private_network, ip: "192.168.56.10" + config.vm.provider "virtualbox" do |vb| + vb.name = "gitlab" + vb.memory = "4096" + vb.cpus = 2 + end + config.vm.provision :shell, path: "bootstrap-mgmt.sh" + config.vm.provision "ansible" do |ansible| + ansible.playbook = "ansible/playbook.yml" + ansible.groups = { + "gitlab_servers" => ["gitlab"], + "all_groups:children" => ["gitlab_servers"] + end +end \ No newline at end of file diff --git a/bootstrap-mgmt.sh b/bootstrap-mgmt.sh new file mode 100644 index 0000000..7f91c73 --- /dev/null +++ b/bootstrap-mgmt.sh @@ -0,0 +1,12 @@ +!/usr/bin/env bash + +## install ansible (http://docs.ansible.com/intro_installation.html) +# apt-get -y install software-properties-common +# apt-add-repository -y ppa:ansible/ansible +apt-get update +apt-get -y install tree + +sed -i "s/PasswordAuthentication no/PasswordAuthentication yes/g" /etc/ssh/sshd_config + +ln -fs /usr/share/zoneinfo/Europe/Paris /etc/localtime +dpkg-reconfigure --frontend noninteractive tzdata