Vagrant files

This commit is contained in:
Olivier 2022-10-09 14:30:51 +02:00
parent a027f35aa4
commit 32d03cd555
2 changed files with 36 additions and 0 deletions

24
Vagrantfile vendored Normal file
View File

@ -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

12
bootstrap-mgmt.sh Normal file
View File

@ -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