From 0ab0c2d74c67b6c093bf0b56cf42a6efeda9a1b7 Mon Sep 17 00:00:00 2001 From: phil Date: Wed, 10 Jan 2024 12:23:26 +0100 Subject: [PATCH] modifs de base --- kea-dhcp-ha/Vagrantfile | 50 ++++++++--------------------- kea-dhcp-ha/provision/setup-kea.yml | 10 ++++-- 2 files changed, 21 insertions(+), 39 deletions(-) diff --git a/kea-dhcp-ha/Vagrantfile b/kea-dhcp-ha/Vagrantfile index 40389c1..4a78cba 100644 --- a/kea-dhcp-ha/Vagrantfile +++ b/kea-dhcp-ha/Vagrantfile @@ -16,49 +16,27 @@ Vagrant.configure("2") do |config| v.customize ["modifyvm", :id, "--ioapic", "on"] end - # lb HAproxy. - config.vm.define "lb" do |lb| - lb.vm.hostname = "lb.test" - lb.vm.network :private_network, ip: "192.168.56.2" - lb.vm.provision "shell", - inline: "sudo apt-get update ; sudo apt-get install -y vim curl wget" - lb.vm.provision "ansible" do |ansible| - ansible.playbook = "provision/setup-lb.yml" - end - end - - # NFS. - config.vm.define "nfs" do |nfs| - nfs.vm.hostname = "nfs.test" - nfs.vm.network :private_network, ip: "192.168.56.6" - nfs.vm.provision "shell", - inline: "sudo apt-get update ; sudo apt-get install -y vim curl wget" - nfs.vm.provision "ansible" do |ansible| - ansible.playbook = "provision/setup-nfs.yml" - end - end - # MySQL. config.vm.define "db" do |db| db.vm.hostname = "db.test" db.vm.network :private_network, ip: "192.168.56.5" db.vm.provision "shell", inline: "sudo apt-get update ; sudo apt-get install -y vim curl wget" - db.vm.provision "ansible" do |ansible| - ansible.playbook = "provision/setup-db.yml" - end + # db.vm.provision "ansible" do |ansible| + # ansible.playbook = "provision/setup-db.yml" + # end end # Kea DHCP server 1. config.vm.define "kea1" do |kea1| - web1.vm.hostname = "kea1" - web1.vm.network :private_network, ip: "192.168.56.2" - web1.vm.provider :virtualbox do |v| + kea1.vm.hostname = "kea1" + kea1.vm.network :private_network, ip: "192.168.56.2" + kea1.vm.provider :virtualbox do |v| v.customize ["modifyvm", :id, "--memory", 512] end - web1.vm.provision "shell", + kea1.vm.provision "shell", inline: "sudo apt-get update ; sudo apt-get install -y vim curl wget" - web1.vm.provision "ansible" do |ansible| + kea1.vm.provision "ansible" do |ansible| ansible.extra_vars = { srv_ip: "192.168.56.2", } @@ -67,15 +45,15 @@ Vagrant.configure("2") do |config| end # Kea DHCP server 2. - config.vm.define "web2" do |kea2| - web2.vm.hostname = "kea2" - web2.vm.network :private_network, ip: "192.168.56.3" - web2.vm.provider :virtualbox do |v| + config.vm.define "kea2" do |kea2| + kea2.vm.hostname = "kea2" + kea2.vm.network :private_network, ip: "192.168.56.3" + kea2.vm.provider :virtualbox do |v| v.customize ["modifyvm", :id, "--memory", 512] end - web2.vm.provision "shell", + kea2.vm.provision "shell", inline: "sudo apt-get update ; sudo apt-get install -y vim curl wget" - web2.vm.provision "ansible" do |ansible| + kea2.vm.provision "ansible" do |ansible| ansible.playbook = "provision/setup-kea.yml" end end diff --git a/kea-dhcp-ha/provision/setup-kea.yml b/kea-dhcp-ha/provision/setup-kea.yml index b4b09b0..c7b94e2 100644 --- a/kea-dhcp-ha/provision/setup-kea.yml +++ b/kea-dhcp-ha/provision/setup-kea.yml @@ -11,7 +11,11 @@ state: present - name: genere ca.cnf dasn /etc/kea-ctrl-agent - template: - src: ca.j2 - dest: present + fetch: + src: /etc/kea/kea-ctrl-agent.conf + dest: . + - name: genere ca.cnf dasn /etc/kea-ctrl-agent + fetch: + src: /etc/kea/kea-dhcp4-server.conf + dest: ..