Compare commits

...

4 commits

Author SHA1 Message Date
Jérémy Lecour d62f39576f
Amélioration de la partie Vagrant 2024-05-03 15:09:08 +02:00
Jérémy Lecour b8d0a571a7
amélioration des définitions de VM dans Vagrant
* on fait un "apt update" systématique, au cas où on ne jouerait pas le rôle "evolinux-base"
* configuration en ELTS pour Jessie et Stretch
* suppression de Squeeze (plus de box Vagrant dispo)
2024-01-18 10:11:18 +01:00
Jérémy Lecour 014bdd2a65
Improve support for old versions of Debian 2023-12-09 14:23:25 +01:00
Jérémy Lecour 5265709704
Add support for Bookworm 2023-12-09 14:23:12 +01:00
2 changed files with 80 additions and 102 deletions

134
test/Vagrantfile vendored
View file

@ -19,17 +19,55 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
libvirt.cpus = 1
end
elts_script = <<~SCRIPT
echo "" > /etc/apt/sources.list
echo "" > /etc/apt/sources.list.d/extended-lts.list
echo "deb http://elts.evolix.org/extended-lts $(lsb_release --codename --short) main" >> /etc/apt/sources.list.d/extended-lts.list
echo "deb http://elts.evolix.org/extended-lts $(lsb_release --codename --short)-lts main" >> /etc/apt/sources.list.d/extended-lts.list
wget --no-check-certificate https://deb.freexian.com/extended-lts/archive-key.gpg -O /etc/apt/trusted.gpg.d/freexian-archive-extended-lts.gpg
chmod 644 /etc/apt/trusted.gpg.d/freexian-archive-extended-lts.gpg
DEBIAN_FRONTEND=noninteractive apt-get --quiet update
SCRIPT
# Bookworm
config.vm.define :bookworm do |node|
node.vm.hostname = "bookworm.evolix.net"
node.vm.box = "debian/bookworm64"
node.vm.provision "apt update", type: "shell", inline: "DEBIAN_FRONTEND=noninteractive apt-get --quiet update"
node.vm.provision :ansible do |ansible|
ansible.limit = "bookworm"
ansible.playbook = "vagrant.yml"
# ansible.tags = "mysql"
ansible.raw_arguments = [
"-b",
# "--ask-vault-pass",
# "--diff",
# "--step",
# "--syntax",
# "-vvv",
]
ansible.extra_vars = {
ansible_python_interpreter: "/usr/bin/python3"
}
end
end
# Bullseye
config.vm.define :bullseye do |node|
node.vm.hostname = "bullseye.evolix.net"
node.vm.box = "debian/bullseye64"
node.vm.provision "apt update", type: "shell", inline: "DEBIAN_FRONTEND=noninteractive apt-get --quiet update"
node.vm.provision :ansible do |ansible|
ansible.limit = "bullseye"
ansible.playbook = "vagrant.yml"
# ansible.tags = "mysql"
ansible.raw_arguments = [
"-b",
"--ask-vault-pass",
# "--ask-vault-pass",
# "--diff",
# "--step",
# "--syntax",
@ -45,13 +83,20 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define :buster do |node|
node.vm.hostname = "buster"
node.vm.box = "debian/buster64"
clean_backports_script = <<~SCRIPT
sed -i '/backports/d' /etc/apt/sources.list
DEBIAN_FRONTEND=noninteractive apt-get --quiet update
SCRIPT
node.vm.provision "backports", type: "shell", inline: clean_backports_script
node.vm.provision :ansible do |ansible|
ansible.limit = "buster"
ansible.playbook = "vagrant.yml"
# ansible.tags = "mysql"
ansible.raw_arguments = [
"-b",
"--ask-vault-pass",
# "--ask-vault-pass",
# "--diff",
# "--step",
# "--syntax",
@ -64,13 +109,16 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define :stretch do |node|
node.vm.hostname = "stretch"
node.vm.box = "debian/stretch64"
node.vm.provision "elts", type: "shell", inline: elts_script
node.vm.provision :ansible do |ansible|
ansible.limit = "stretch"
ansible.playbook = "vagrant.yml"
# ansible.tags = "mysql"
ansible.raw_arguments = [
"-b",
"--ask-vault-pass",
# "--ask-vault-pass",
# "--diff",
# "--step",
# "--syntax",
@ -79,17 +127,28 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
end
end
old_ssh_options = [
"-o HostKeyAlgorithms=+ssh-rsa",
"-o PubkeyAcceptedKeyTypes=+ssh-rsa"
]
# Jessie
config.vm.define :jessie do |node|
node.vm.hostname = "jessie"
node.vm.box = "debian/jessie64"
node.ssh.extra_args = old_ssh_options
node.vm.provision "elts", type: "shell", inline: elts_script
node.vm.provision :ansible do |ansible|
ansible.limit = "jessie"
ansible.playbook = "vagrant.yml"
# ansible.tags = "mysql"
ansible.raw_ssh_args = old_ssh_options
ansible.raw_arguments = [
"-b",
"--ask-vault-pass",
# "--ask-vault-pass",
# "--diff",
# "--step",
# "--syntax",
@ -98,64 +157,23 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
end
end
# Squeeze
config.vm.define :squeeze do |node|
node.vm.hostname = "squeeze"
node.vm.box = "debian/squeeze64"
node.vm.provision :ansible do |ansible|
ansible.limit = "squeeze"
ansible.playbook = "vagrant.yml"
# ansible.tags = "mysql"
ansible.raw_arguments = [
"-b",
"--ask-vault-pass",
# "--diff",
# "--step",
# "--syntax",
# "-vvv",
]
end
end
# # Stretch
# config.vm.define :mongo1 do |node|
# node.vm.synced_folder "./vagrant_share/", "/vagrant", disabled: false
# node.vm.hostname = "mongo1"
# node.vm.box = "debian/stretch64"
# # Squeeze
# config.vm.define :squeeze do |node|
# node.vm.hostname = "squeeze"
# node.vm.box = "debian/squeeze64"
# node.ssh.extra_args = old_ssh_options
# node.vm.provision :ansible do |ansible|
# ansible.limit = "mongo1"
# ansible.playbook = "vagrant-mongo.yml"
# ansible.limit = "squeeze"
# ansible.playbook = "vagrant.yml"
# # ansible.tags = "mysql"
# ansible.raw_ssh_args = old_ssh_options
# ansible.raw_arguments = [
# "-b",
# # "--ask-vault-pass",
# ]
# end
# end
# config.vm.define :mongo2 do |node|
# node.vm.hostname = "mongo2"
# node.vm.box = "debian/stretch64"
# node.vm.provision :ansible do |ansible|
# ansible.limit = "mongo2"
# ansible.playbook = "vagrant-mongo.yml"
# # ansible.tags = "mysql"
# ansible.raw_arguments = [
# "-b",
# # "--ask-vault-pass",
# ]
# end
# end
# config.vm.define :mongo3 do |node|
# node.vm.hostname = "mongo3"
# node.vm.box = "debian/stretch64"
# node.vm.provision :ansible do |ansible|
# ansible.limit = "mongo3"
# ansible.playbook = "vagrant-mongo.yml"
# # ansible.tags = "mysql"
# ansible.raw_arguments = [
# "-b",
# # "--ask-vault-pass",
# "--ask-vault-pass",
# # "--diff",
# # "--step",
# # "--syntax",
# # "-vvv",
# ]
# end
# end

View file

@ -65,6 +65,10 @@
release: buster
- name: php74
release: bullseye
- name: php82
release: bookworm
- name: php83
release: bookworm
# evolinux_apt_public_sources: False
# pre_tasks:
@ -73,53 +77,9 @@
# var: hostvars[inventory_hostname]
roles:
- bullseye-detect
# - aws-tuning
# - apt
- evolinux-base
- evolinux-users
# - { role: del-user, username: "gcolpart" }
# - metricbeat
# - { role: squid, squid_localproxy_enable: True }
# - apache
# - nginx
# - mysql
# - mysql-oracle
# - percona
# - postgresql
- packweb-apache
# - { role: packweb-apache, packweb_mysql_variant: "oracle" }
# - { role: memcached, memcached_instance_name: "instance1" }
# - { role: memcached, memcached_instance_name: "instance2", memcached_port: 11212 }
# - { role: redis }
# - { role: redis, redis_instance_name: "instance1", redis_port: 6380 }
# - { role: redis, redis_instance_name: "instance2", redis_port: 6381 }
# - evoacme
# - etc-git
# - kvm-host
# - mongodb
# - mysql
# - proftpd
# - haproxy
# - varnish
# - supervisord
# - elasticsearch
# - kibana
# - evoacme
# - lxc
# - { role: lxc-php, lxc_php_version: "php56" }
# - { role: lxc-php, lxc_php_version: "php70" }
# - { role: lxc-php, lxc_php_version: "php73" }
# - { role: lxc-php, lxc_php_version: "php74" }
# - evocheck
# - tomcat
# - redis
# - unbound
# - php
# - ldap
# - { role: postfix, postfix_packmail: True, postfix_force_main_cf: True }
# - apache
# - php
# - { role: webapps/evoadmin-mail }
# - { role: webapps/roundcube }