MAJ role KEA MAJ test goss KEA
This commit is contained in:
parent
3100ba51e2
commit
2653221559
173
goss/s-kea1.yaml
173
goss/s-kea1.yaml
@ -1,90 +1,93 @@
|
|||||||
file:
|
file:
|
||||||
/etc/kea/kea-ctrl-agent.conf:
|
/etc/kea/kea-ctrl-agent.conf:
|
||||||
exists: true
|
exists: true
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
size: 2470
|
owner: _kea
|
||||||
owner: _kea
|
group: root
|
||||||
group: root
|
filetype: file
|
||||||
filetype: file
|
contents: []
|
||||||
contains: []
|
/etc/kea/kea-dhcp4.conf:
|
||||||
/etc/kea/kea-dhcp4.conf:
|
exists: true
|
||||||
exists: true
|
mode: "0644"
|
||||||
mode: "0644"
|
owner: _kea
|
||||||
size: 11346
|
group: root
|
||||||
owner: _kea
|
filetype: file
|
||||||
group: root
|
contents: []
|
||||||
filetype: file
|
/tmp/kea4-ctrl-socket:
|
||||||
contains: []
|
exists: true
|
||||||
/tmp/kea4-ctrl-socket:
|
mode: "0755"
|
||||||
exists: true
|
size: 0
|
||||||
mode: "0755"
|
owner: _kea
|
||||||
size: 0
|
group: _kea
|
||||||
owner: _kea
|
filetype: socket
|
||||||
group: _kea
|
contains: []
|
||||||
filetype: socket
|
contents: null
|
||||||
contains: []
|
/usr/lib/x86_64-linux-gnu/kea:
|
||||||
/usr/local/lib/kea:
|
exists: true
|
||||||
exists: true
|
mode: "0755"
|
||||||
mode: "0755"
|
owner: root
|
||||||
size: 4096
|
group: root
|
||||||
owner: root
|
filetype: directory
|
||||||
group: root
|
contents: []
|
||||||
filetype: directory
|
|
||||||
contains: []
|
|
||||||
package:
|
package:
|
||||||
isc-kea-common:
|
isc-kea-common:
|
||||||
installed: true
|
installed: true
|
||||||
versions:
|
versions:
|
||||||
- 2.4.1-isc20231123184533
|
- 2.4.1-isc20231123184533
|
||||||
isc-kea-ctrl-agent:
|
isc-kea-ctrl-agent:
|
||||||
installed: true
|
installed: true
|
||||||
versions:
|
versions:
|
||||||
- 2.4.1-isc20231123184533
|
- 2.4.1-isc20231123184533
|
||||||
isc-kea-dhcp4:
|
isc-kea-dhcp4:
|
||||||
installed: true
|
installed: true
|
||||||
versions:
|
versions:
|
||||||
- 2.4.1-isc20231123184533
|
- 2.4.1-isc20231123184533
|
||||||
isc-kea-hooks:
|
isc-kea-hooks:
|
||||||
installed: true
|
installed: true
|
||||||
versions:
|
versions:
|
||||||
- 2.4.1-isc20231123184533
|
- 2.4.1-isc20231123184533
|
||||||
libmariadb3:
|
libmariadb3:
|
||||||
installed: true
|
installed: true
|
||||||
versions:
|
versions:
|
||||||
- 1:10.11.4-1~deb12u1
|
- 1:10.11.4-1~deb12u1
|
||||||
mariadb-common:
|
mariadb-common:
|
||||||
installed: true
|
installed: true
|
||||||
versions:
|
versions:
|
||||||
- 1:10.11.4-1~deb12u1
|
- 1:10.11.4-1~deb12u1
|
||||||
mysql-common:
|
mysql-common:
|
||||||
installed: true
|
installed: true
|
||||||
versions:
|
versions:
|
||||||
- 5.8+1.1.0
|
- 5.8+1.1.0
|
||||||
|
addr:
|
||||||
|
udp://172.16.64.254:67:
|
||||||
|
local-address: 127.0.0.1
|
||||||
|
reachable: true
|
||||||
|
timeout: 500
|
||||||
port:
|
port:
|
||||||
tcp:8000:
|
tcp:8000:
|
||||||
listening: true
|
listening: true
|
||||||
ip:
|
ip:
|
||||||
- 172.16.64.20
|
- 172.16.0.20
|
||||||
service:
|
service:
|
||||||
isc-kea-ctrl-agent.service:
|
isc-kea-ctrl-agent.service:
|
||||||
enabled: true
|
enabled: true
|
||||||
running: true
|
running: true
|
||||||
isc-kea-dhcp4-server.service:
|
isc-kea-dhcp4-server.service:
|
||||||
enabled: true
|
enabled: true
|
||||||
running: true
|
running: true
|
||||||
interface:
|
interface:
|
||||||
enp0s3:
|
enp0s3:
|
||||||
exists: true
|
exists: true
|
||||||
addrs:
|
addrs:
|
||||||
- 192.168.99.20/24
|
- 192.168.99.20/24
|
||||||
mtu: 1500
|
mtu: 1500
|
||||||
enp0s8:
|
enp0s8:
|
||||||
exists: true
|
exists: true
|
||||||
addrs:
|
addrs:
|
||||||
- 172.16.0.20/24
|
- 172.16.0.20/24
|
||||||
mtu: 1500
|
mtu: 1500
|
||||||
enp0s9:
|
enp0s9:
|
||||||
exists: true
|
exists: true
|
||||||
addrs:
|
addrs:
|
||||||
- 172.16.64.20/24
|
- 172.16.64.20/24
|
||||||
mtu: 1500
|
mtu: 1500
|
||||||
|
173
goss/s-kea2.yaml
173
goss/s-kea2.yaml
@ -1,90 +1,93 @@
|
|||||||
file:
|
file:
|
||||||
/etc/kea/kea-ctrl-agent.conf:
|
/etc/kea/kea-ctrl-agent.conf:
|
||||||
exists: true
|
exists: true
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
size: 2470
|
owner: _kea
|
||||||
owner: _kea
|
group: root
|
||||||
group: root
|
filetype: file
|
||||||
filetype: file
|
contents: []
|
||||||
contains: []
|
/etc/kea/kea-dhcp4.conf:
|
||||||
/etc/kea/kea-dhcp4.conf:
|
exists: true
|
||||||
exists: true
|
mode: "0644"
|
||||||
mode: "0644"
|
owner: _kea
|
||||||
size: 11346
|
group: root
|
||||||
owner: _kea
|
filetype: file
|
||||||
group: root
|
contents: []
|
||||||
filetype: file
|
/tmp/kea4-ctrl-socket:
|
||||||
contains: []
|
exists: true
|
||||||
/tmp/kea4-ctrl-socket:
|
mode: "0755"
|
||||||
exists: true
|
size: 0
|
||||||
mode: "0755"
|
owner: _kea
|
||||||
size: 0
|
group: _kea
|
||||||
owner: _kea
|
filetype: socket
|
||||||
group: _kea
|
contains: []
|
||||||
filetype: socket
|
contents: null
|
||||||
contains: []
|
/usr/lib/x86_64-linux-gnu/kea:
|
||||||
/usr/local/lib/kea:
|
exists: true
|
||||||
exists: true
|
mode: "0755"
|
||||||
mode: "0755"
|
owner: root
|
||||||
size: 4096
|
group: root
|
||||||
owner: root
|
filetype: directory
|
||||||
group: root
|
contents: []
|
||||||
filetype: directory
|
|
||||||
contains: []
|
|
||||||
package:
|
package:
|
||||||
isc-kea-common:
|
isc-kea-common:
|
||||||
installed: true
|
installed: true
|
||||||
versions:
|
versions:
|
||||||
- 2.4.1-isc20231123184533
|
- 2.4.1-isc20231123184533
|
||||||
isc-kea-ctrl-agent:
|
isc-kea-ctrl-agent:
|
||||||
installed: true
|
installed: true
|
||||||
versions:
|
versions:
|
||||||
- 2.4.1-isc20231123184533
|
- 2.4.1-isc20231123184533
|
||||||
isc-kea-dhcp4:
|
isc-kea-dhcp4:
|
||||||
installed: true
|
installed: true
|
||||||
versions:
|
versions:
|
||||||
- 2.4.1-isc20231123184533
|
- 2.4.1-isc20231123184533
|
||||||
isc-kea-hooks:
|
isc-kea-hooks:
|
||||||
installed: true
|
installed: true
|
||||||
versions:
|
versions:
|
||||||
- 2.4.1-isc20231123184533
|
- 2.4.1-isc20231123184533
|
||||||
libmariadb3:
|
libmariadb3:
|
||||||
installed: true
|
installed: true
|
||||||
versions:
|
versions:
|
||||||
- 1:10.11.4-1~deb12u1
|
- 1:10.11.4-1~deb12u1
|
||||||
mariadb-common:
|
mariadb-common:
|
||||||
installed: true
|
installed: true
|
||||||
versions:
|
versions:
|
||||||
- 1:10.11.4-1~deb12u1
|
- 1:10.11.4-1~deb12u1
|
||||||
mysql-common:
|
mysql-common:
|
||||||
installed: true
|
installed: true
|
||||||
versions:
|
versions:
|
||||||
- 5.8+1.1.0
|
- 5.8+1.1.0
|
||||||
|
addr:
|
||||||
|
udp://172.16.64.254:67:
|
||||||
|
local-address: 127.0.0.1
|
||||||
|
reachable: true
|
||||||
|
timeout: 500
|
||||||
port:
|
port:
|
||||||
tcp:8000:
|
tcp:8000:
|
||||||
listening: true
|
listening: true
|
||||||
ip:
|
ip:
|
||||||
- 172.16.64.21
|
- 172.16.0.21
|
||||||
service:
|
service:
|
||||||
isc-kea-ctrl-agent.service:
|
isc-kea-ctrl-agent.service:
|
||||||
enabled: true
|
enabled: true
|
||||||
running: true
|
running: true
|
||||||
isc-kea-dhcp4-server.service:
|
isc-kea-dhcp4-server.service:
|
||||||
enabled: true
|
enabled: true
|
||||||
running: true
|
running: true
|
||||||
interface:
|
interface:
|
||||||
enp0s3:
|
enp0s3:
|
||||||
exists: true
|
exists: true
|
||||||
addrs:
|
addrs:
|
||||||
- 192.168.99.21/24
|
- 192.168.99.21/24
|
||||||
mtu: 1500
|
mtu: 1500
|
||||||
enp0s8:
|
enp0s8:
|
||||||
exists: true
|
exists: true
|
||||||
addrs:
|
addrs:
|
||||||
- 172.16.0.21/24
|
- 172.16.0.21/24
|
||||||
mtu: 1500
|
mtu: 1500
|
||||||
enp0s9:
|
enp0s9:
|
||||||
exists: true
|
exists: true
|
||||||
addrs:
|
addrs:
|
||||||
- 172.16.64.21/24
|
- 172.16.64.21/24
|
||||||
mtu: 1500
|
mtu: 1500
|
||||||
|
@ -1,14 +1,21 @@
|
|||||||
# Rôle Kea
|
# Rôle Kea
|
||||||
***
|
***
|
||||||
Rôle du Kea pour la haute disponibilité dhcp
|
Rôle Kea: Configuration de 2 serveurs KEA en mode haute disponbilité.
|
||||||
|
|
||||||
## Tables des matières
|
## Tables des matières
|
||||||
1. [Que fait le rôle Kea ?]
|
1. [Que fait le rôle Kea ?]
|
||||||
|
2. [Installation et configuration de ka]
|
||||||
|
3. [Remarques]
|
||||||
|
|
||||||
|
|
||||||
## Que fait le rôle Kea ?
|
## Que fait le rôle Kea ?
|
||||||
Il permet de configurer les serveur kea en mode haute disponibilité.
|
Le rôle KEA permet de configurer 1 serveurs kea (s-kea1 et s-kea2) en mode haute disponibilité.
|
||||||
|
- Le serveur **s-kea1** sera en mode **primary** il délivrera les baux DHCP sur le réseau n-user.
|
||||||
|
- Le serveur **s-kea2**, sera en mode **stand-by** le service DHCP basculera donc sur **s-kea2** en cas disponibilité du serveur**s-kea1**.
|
||||||
|
|
||||||
### Installation et configuration de kea
|
### Installation et configuration de kea
|
||||||
|
|
||||||
Le rôle kea va installer les packets kea dhcp4, hook, admin une fois les packets installer. Nous allons configurer les 2 serveurs kea pour qu'il distribut les ip de n-user et soit en haute disponibilité.
|
Le rôle kea installe les packets **kea dhcp4, hooks, admin** une fois les packets installer. Il configure un serveur kea pour qu'il distribue les ips sur le réseau n-user et soit en haute disponibilité.
|
||||||
|
|
||||||
|
### Remarquees ###
|
||||||
|
Une fois le playbook **s-kea** correctement terminé et la machine **s-kea** redemarrée, redémarrée le service **isc-kea-dhcp4.service** afin de prendre en compte les modifications éfféctuées sur la couche réseau par le role POST.
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"severity": "INFO",
|
"severity": "INFO",
|
||||||
|
"debuglevel": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
// The DHCPv4 server listens on this interface. When changing this to
|
// The DHCPv4 server listens on this interface. When changing this to
|
||||||
// the actual name of your interface, make sure to also update the
|
// the actual name of your interface, make sure to also update the
|
||||||
// interface parameter in the subnet definition below.
|
// interface parameter in the subnet definition below.
|
||||||
"interfaces": "{{ kea_dhcp_int }}"
|
"interfaces": ["{{ kea_dhcp_int }}"]
|
||||||
},
|
},
|
||||||
|
|
||||||
// Control socket is required for communication between the Control
|
// Control socket is required for communication between the Control
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
---
|
|
||||||
- hosts: localhost
|
|
||||||
connection: local
|
|
||||||
vars:
|
|
||||||
kea_this_server: "s-kea1"
|
|
||||||
kea_srv1: "s-kea1"
|
|
||||||
kea_srv2: "s-kea2"
|
|
||||||
kea_ctrl_address_this: "172.16.0.20"
|
|
||||||
kea_ctrl_address1: "172.16.0.20"
|
|
||||||
kea_ctrl_address2: "172.16.0.21"
|
|
||||||
kea_dhcp_int: ["enp0s9"]
|
|
||||||
|
|
||||||
roles:
|
|
||||||
- base
|
|
||||||
- goss
|
|
||||||
# - ssh-cli
|
|
||||||
- kea
|
|
||||||
# - zabbix-cli
|
|
||||||
# - journald-snd
|
|
||||||
# - snmp-agent
|
|
||||||
- post
|
|
20
s-kea1.yml
20
s-kea1.yml
@ -1,13 +1,21 @@
|
|||||||
---
|
---
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
connection: local
|
connection: local
|
||||||
|
vars:
|
||||||
|
kea_this_server: "s-kea1"
|
||||||
|
kea_srv1: "s-kea1"
|
||||||
|
kea_srv2: "s-kea2"
|
||||||
|
kea_ctrl_address_this: "172.16.0.20"
|
||||||
|
kea_ctrl_address1: "172.16.0.20"
|
||||||
|
kea_ctrl_address2: "172.16.0.21"
|
||||||
|
kea_dhcp_int: "enp0s9"
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- base
|
- base
|
||||||
#- goss
|
- goss
|
||||||
#- ssh-cli
|
- ssh-cli
|
||||||
- kea-master
|
- kea
|
||||||
#- zabbix-cli
|
# - zabbix-cli
|
||||||
#- journald-snd
|
- journald-snd
|
||||||
#- snmp-agent
|
- snmp-agent
|
||||||
- post
|
- post
|
||||||
|
20
s-kea2.yml
20
s-kea2.yml
@ -1,13 +1,21 @@
|
|||||||
---
|
---
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
connection: local
|
connection: local
|
||||||
|
vars:
|
||||||
|
kea_this_server: "s-kea2"
|
||||||
|
kea_srv1: "s-kea1"
|
||||||
|
kea_srv2: "s-kea2"
|
||||||
|
kea_ctrl_address_this: "172.16.0.21"
|
||||||
|
kea_ctrl_address1: "172.16.0.20"
|
||||||
|
kea_ctrl_address2: "172.16.0.21"
|
||||||
|
kea_dhcp_int: "enp0s9"
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- base
|
- base
|
||||||
# - goss
|
- goss
|
||||||
# - ssh-cli
|
- ssh-cli
|
||||||
- kea-slave
|
- kea
|
||||||
# - zabbix-cli
|
# - zabbix-cli
|
||||||
# - journald-snd
|
- journald-snd
|
||||||
# - snmp-agent
|
- snmp-agent
|
||||||
- post
|
- post
|
||||||
|
Loading…
x
Reference in New Issue
Block a user