From 3686fecf0b20ca817b6f86b878cd10f84b2defc4 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Sun, 15 Apr 2018 16:00:28 +0200 Subject: [PATCH] better vagrant playbook for tests --- test/Vagrantfile | 9 ++++---- test/vagrant.yml | 58 ++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 54 insertions(+), 13 deletions(-) diff --git a/test/Vagrantfile b/test/Vagrantfile index 05646a3..84e6af0 100644 --- a/test/Vagrantfile +++ b/test/Vagrantfile @@ -5,10 +5,11 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.synced_folder "./vagrant_share/", "/vagrant", disabled: true + config.vm.network "forwarded_port", guest: 80, host: 8080, auto_correct: true config.vm.provider :virtualbox do |v| - v.memory = 2048 - v.cpus = 2 + v.memory = 1024 + v.cpus = 1 v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] v.customize ["modifyvm", :id, "--ioapic", "on"] end @@ -17,7 +18,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define :stretch do |node| node.vm.hostname = "stretch" node.vm.box = "debian/stretch64" - # default.vm.network :private_network, ip: "192.168.33.33" node.vm.provision :ansible, run: "always" do |ansible| ansible.limit = "stretch" ansible.playbook = "vagrant.yml" @@ -26,6 +26,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| "-b", "--ask-vault-pass", "--diff", + # "--step", # "--syntax", # "-vvv", ] @@ -36,7 +37,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define :jessie do |node| node.vm.hostname = "jessie" node.vm.box = "debian/jessie64" - # default.vm.network :private_network, ip: "192.168.33.33" node.vm.provision :ansible, run: "always" do |ansible| ansible.limit = "jessie" ansible.playbook = "vagrant.yml" @@ -45,6 +45,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| "-b", "--ask-vault-pass", "--diff", + # "--step", # "--syntax", # "-vvv", ] diff --git a/test/vagrant.yml b/test/vagrant.yml index e67d81b..6ccd1ef 100644 --- a/test/vagrant.yml +++ b/test/vagrant.yml @@ -8,21 +8,61 @@ vars: evolinux_apt_upgrade: False - evolinux_root_disable_ssh: False + # evolinux_root_disable_ssh: False + evolinux_ssh_allow_current_user: True - minifirewall_privilegied_ips: ["192.168.0.0/16", "10.0.0.0/8"] + minifirewall_additional_trusted_ips: ["192.168.0.0/16", "10.0.0.0/8"] packweb_enable_evoadmin_vhost: True packweb_phpmyadmin_suffix: "uE34swx9" - evolinux_postfix_include: False - - evolinux_hostname: "vagrant" + evolinux_hostname: "vagrant-{{ inventory_hostname }}" evolinux_domain: "evolix.local" - evolinux_fqdn: "vagrant.evolix.local" + evolinux_fqdn: "{{ evolinux_hostname }}.{{ evolinux_domain }}" + + evolinux_apt_include: True + evolinux_etcgit_include: True + evolinux_hostname_include: True + evolinux_kernel_include: True + evolinux_fstab_include: True + evolinux_packages_include: True + evolinux_system_include: True + evolinux_evomaintenance_include: True + evolinux_ssh_include: True + evolinux_users_include: False + evolinux_root_include: True + evolinux_postfix_include: True + evolinux_logs_include: True + evolinux_default_www_include: True + evolinux_hardware_include: True + evolinux_provider_online_include: False + evolinux_provider_orange_fce_include: False + evolinux_log2mail_include: True + evolinux_minifirewall_include: True + evolinux_munin_include: True + evolinux_nagios_nrpe_include: True + evolinux_fail2ban_include: False + mysql_custom_datadir: '/home/mysql' + mysql_custom_tmpdir: '/home/tmpmysql' + + roles: - - evolinux-base - - packweb-apache - - ~/GIT/evolix-private/roles/generateldif + - evolinux-base + - { role: squid, squid_localproxy_enable: True } + - apache + # - nginx + - evolinux-users + # - mysql-oracle + - { role: packweb-apache, packweb_mysql_variant: "oracle" } + # - evoacme + - mongodb + # - mysql + - proftpd + - redis + # - supervisord + # - evoacme + # - tomcat + - redis + # - unbound