Compare commits
12 Commits
v0.0.2w-ps
...
v0.0.3f-ps
Author | SHA1 | Date | |
---|---|---|---|
5dcaeb0629 | |||
82bda1c85b | |||
0537e6f942 | |||
7310641ce0 | |||
48b16468b6 | |||
c7a893651e | |||
236e560329 | |||
84144c72fb | |||
84aa96c106 | |||
d6ddbb4dd6 | |||
cc36b5dcf7 | |||
5aa12d8acd |
31
README.md
31
README.md
@ -1,34 +1,34 @@
|
|||||||
# gsb2024
|
# gsb2024
|
||||||
|
|
||||||
2024-12-21 ps
|
2024-01-13 ps
|
||||||
|
|
||||||
Environnement et playbooks ansible pour le projet GSB 2024
|
Environnement et playbooks **ansible** pour le projet **GSB 2024**
|
||||||
|
|
||||||
## Quickstart
|
## Quickstart
|
||||||
|
|
||||||
Prérequis :
|
Prérequis :
|
||||||
* une machine LInux Debian Bookworm ou Windows
|
* une machine Linux Debian Bookworm ou Windows
|
||||||
* VirtualBox
|
* VirtualBox
|
||||||
* git
|
* git
|
||||||
* fichier machines virtuelles **ova** :
|
* fichier machines virtuelles **ova** :
|
||||||
* **debian-bookworm-gsb-2023c.ova**
|
* **debian-bookworm-gsb-2023c.ova**
|
||||||
* **debian-buster-gsb-2023a.ova**
|
* **debian-bullseye-gsb-2024a.ova**
|
||||||
|
|
||||||
|
|
||||||
## Les machines
|
## Les machines
|
||||||
|
|
||||||
* **s-adm** : routeur adm, DHCP + NAT, deploiement, proxy squid
|
* **s-adm** : routeur adm, DHCP + NAT, déploiement, proxy squid
|
||||||
* **s-infra** : DNS maitre, autoconfiguration navigateurs avec **wpad**
|
* **s-infra** : DNS maitre, autoconfiguration navigateurs avec **wpad**
|
||||||
* **r-int** : routage, DHCP
|
* **r-int** : routage, DHCP
|
||||||
* **r-ext** : routage, NAT
|
* **r-ext** : routage, NAT
|
||||||
* **s-proxy** : squid
|
* **s-proxy** : proxy **squid**
|
||||||
* **s-itil** : serveur GLPI
|
* **s-itil** : serveur GLPI
|
||||||
* **s-backup** : DNS esclave + sauvegarde s-win (SMB)
|
* **s-backup** : DNS esclave + sauvegarde s-win (SMB)
|
||||||
* **s-mon** : supervision avec **Nagios4**, notifications et syslog
|
* **s-mon** : supervision avec **Nagios4**, notifications et syslog
|
||||||
* **s-fog** : deploiement postes de travail avec **FOG**
|
* **s-fog** : deploiement postes de travail avec **FOG**
|
||||||
* **s-win** : Windows Server 2019, AD, DNS, DHCP, partage fichiers
|
* **s-win** : Windows Server 2019, AD, DNS, DHCP, partage fichiers
|
||||||
* **s-nxc** : NextCloud avec **docker**
|
* **s-nxc** : NextCloud avec **docker** via proxy inverse **traefik** et certificat auto-signé
|
||||||
* **s-elk** : pile ELK dockerisée
|
* **s-elk** : pile **ELK** dockerisée
|
||||||
* **s-lb** : Load Balancer **HaProxy** pour application Wordpress (DMZ)
|
* **s-lb** : Load Balancer **HaProxy** pour application Wordpress (DMZ)
|
||||||
* **r-vp1** : Routeur VPN Wireguard coté siège
|
* **r-vp1** : Routeur VPN Wireguard coté siège
|
||||||
* **r-vp2** : Routeur VPN Wireguard coté agence, DHCP
|
* **r-vp2** : Routeur VPN Wireguard coté agence, DHCP
|
||||||
@ -51,8 +51,8 @@ On utilisera les images de machines virtuelle suivantes :
|
|||||||
* Debian Bookworm 12.4 - 2 cartes - 1 Go - Stockage 20 Go
|
* Debian Bookworm 12.4 - 2 cartes - 1 Go - Stockage 20 Go
|
||||||
|
|
||||||
et pour **s-fog** :
|
et pour **s-fog** :
|
||||||
* **debian-buster-2023a.ova** (2023-01-06)
|
* **debian-bullseye-2024a.ova** (2024-01-06)
|
||||||
* Debian Buster 10 - 2 cartes - 1 Go - stockage 20 Go
|
* Debian Bullseye 11.8 - 2 cartes - 1 Go - stockage 20 Go
|
||||||
|
|
||||||
Les images **.ova** doivent etre stockées dans le répertoire habituel de téléchargement de l'utilisateur courant.
|
Les images **.ova** doivent etre stockées dans le répertoire habituel de téléchargement de l'utilisateur courant.
|
||||||
|
|
||||||
@ -72,6 +72,10 @@ mkvm -r s-adm
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Machine s-adm
|
### Machine s-adm
|
||||||
|
|
||||||
|
La machine **-sadm** est la première machine à installer.
|
||||||
|
|
||||||
|
|
||||||
* créer la machine virtuelle **s-adm** avec **mkvm** comme décrit plus haut.
|
* créer la machine virtuelle **s-adm** avec **mkvm** comme décrit plus haut.
|
||||||
* démarrer la VM puis ouvir une session
|
* démarrer la VM puis ouvir une session
|
||||||
* utiliser le script de renommage comme suit :
|
* utiliser le script de renommage comme suit :
|
||||||
@ -85,13 +89,12 @@ bash chname <nouveau_nom_de_machine>` , puis redémarrer
|
|||||||
git clone https://gitea.lyc-lecastel.fr/gsb/gsb2024.git
|
git clone https://gitea.lyc-lecastel.fr/gsb/gsb2024.git
|
||||||
cd gsb2024/pre
|
cd gsb2024/pre
|
||||||
bash inst-depl
|
bash inst-depl
|
||||||
cd /var/www/html/gsbstore
|
cd /root/tools/ansible/gsb2024/pre
|
||||||
bash getall
|
|
||||||
cd /root/tools/ansible/gsb024/pre
|
|
||||||
bash gsbboot
|
bash gsbboot
|
||||||
cd .. ; bash pull-config
|
cd .. ; bash pull-config
|
||||||
```
|
```
|
||||||
- redémarrer
|
- redémarrer
|
||||||
|
- la machine **s-adm** doit etre opérationnelle
|
||||||
|
|
||||||
### Pour chaque machine
|
### Pour chaque machine
|
||||||
|
|
||||||
@ -99,7 +102,7 @@ bash chname <nouveau_nom_de_machine>` , puis redémarrer
|
|||||||
|
|
||||||
- créer la machine avec **mkvm -r**, les cartes réseau sont paramétrées par **mkvm** selon les spécifications
|
- créer la machine avec **mkvm -r**, les cartes réseau sont paramétrées par **mkvm** selon les spécifications
|
||||||
- ouvrir une session sur la machine considérée
|
- ouvrir une session sur la machine considérée
|
||||||
- renomme la machine soit
|
- renommer la machine soit
|
||||||
* en utilisant le script de renommage comme suit :
|
* en utilisant le script de renommage comme suit :
|
||||||
` /root/tools/ansible/gsb2024/scripts/chname <nouveau_nom_de_machine>`
|
` /root/tools/ansible/gsb2024/scripts/chname <nouveau_nom_de_machine>`
|
||||||
* soit avec :
|
* soit avec :
|
||||||
|
@ -1,6 +1,18 @@
|
|||||||
|
file:
|
||||||
|
/var/www/html/gsbstore/getall:
|
||||||
|
exists: true
|
||||||
|
mode: "0644"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
filetype: file
|
||||||
|
contents: []
|
||||||
package:
|
package:
|
||||||
dnsmasq:
|
dnsmasq:
|
||||||
installed: true
|
installed: true
|
||||||
|
lighttpd:
|
||||||
|
installed: true
|
||||||
|
versions:
|
||||||
|
- 1.4.69-1
|
||||||
squid:
|
squid:
|
||||||
installed: true
|
installed: true
|
||||||
addr:
|
addr:
|
||||||
@ -12,10 +24,18 @@ port:
|
|||||||
listening: true
|
listening: true
|
||||||
ip:
|
ip:
|
||||||
- 0.0.0.0
|
- 0.0.0.0
|
||||||
|
tcp:80:
|
||||||
|
listening: true
|
||||||
|
ip:
|
||||||
|
- 0.0.0.0
|
||||||
tcp6:53:
|
tcp6:53:
|
||||||
listening: true
|
listening: true
|
||||||
ip:
|
ip:
|
||||||
- '::'
|
- '::'
|
||||||
|
tcp6:80:
|
||||||
|
listening: true
|
||||||
|
ip:
|
||||||
|
- '::'
|
||||||
udp:53:
|
udp:53:
|
||||||
listening: true
|
listening: true
|
||||||
ip:
|
ip:
|
||||||
@ -32,6 +52,9 @@ service:
|
|||||||
dnsmasq:
|
dnsmasq:
|
||||||
enabled: true
|
enabled: true
|
||||||
running: true
|
running: true
|
||||||
|
lighttpd:
|
||||||
|
enabled: true
|
||||||
|
running: true
|
||||||
squid:
|
squid:
|
||||||
enabled: true
|
enabled: true
|
||||||
running: true
|
running: true
|
||||||
@ -61,6 +84,8 @@ dns:
|
|||||||
process:
|
process:
|
||||||
dnsmasq:
|
dnsmasq:
|
||||||
running: true
|
running: true
|
||||||
|
lighttpd:
|
||||||
|
running: true
|
||||||
squid:
|
squid:
|
||||||
running: true
|
running: true
|
||||||
interface:
|
interface:
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
#package:
|
||||||
|
# systemd-journal-remote:
|
||||||
|
# installed: true
|
||||||
file:
|
file:
|
||||||
/var/www/html/glpi:
|
/var/www/html/glpi:
|
||||||
exists: true
|
exists: true
|
||||||
@ -6,7 +9,7 @@ file:
|
|||||||
group: www-data
|
group: www-data
|
||||||
filetype: directory
|
filetype: directory
|
||||||
|
|
||||||
/var/www/html/ficlients:
|
/var/www/html/glpicli:
|
||||||
exists: true
|
exists: true
|
||||||
mode: "0775"
|
mode: "0775"
|
||||||
owner: www-data
|
owner: www-data
|
||||||
@ -18,13 +21,17 @@ file:
|
|||||||
mode: "0777"
|
mode: "0777"
|
||||||
filetype: directory
|
filetype: directory
|
||||||
|
|
||||||
|
/var/www/html/glpicli/GLPI-Agent-1.7-x64.msi:
|
||||||
|
exists: true
|
||||||
|
#mode: "0777"
|
||||||
|
filetype: file
|
||||||
|
|
||||||
/var/www/html/index.nginx-debian.html:
|
/var/www/html/index.nginx-debian.html:
|
||||||
exists: true
|
exists: true
|
||||||
mode: "0775"
|
mode: "0775"
|
||||||
owner: www-data
|
owner: www-data
|
||||||
group: www-data
|
group: www-data
|
||||||
filetype: file
|
filetype: file
|
||||||
|
|
||||||
service:
|
service:
|
||||||
mariadb:
|
mariadb:
|
||||||
enabled: true
|
enabled: true
|
||||||
@ -34,3 +41,19 @@ service:
|
|||||||
enabled: true
|
enabled: true
|
||||||
running: true
|
running: true
|
||||||
|
|
||||||
|
zabbix-agent:
|
||||||
|
enable: true
|
||||||
|
running: true
|
||||||
|
|
||||||
|
systemd-journal-upload.service:
|
||||||
|
enabled: true
|
||||||
|
running: true
|
||||||
|
port:
|
||||||
|
tcp:10050:
|
||||||
|
listening: true
|
||||||
|
ip:
|
||||||
|
- 0.0.0.0
|
||||||
|
tcp:10050:
|
||||||
|
listening: true
|
||||||
|
ip:
|
||||||
|
- '::'
|
||||||
|
@ -15,6 +15,17 @@ package:
|
|||||||
installed: true
|
installed: true
|
||||||
python3-pymysql:
|
python3-pymysql:
|
||||||
installed: true
|
installed: true
|
||||||
|
systemd-journal-remote:
|
||||||
|
installed: true
|
||||||
|
file:
|
||||||
|
/etc/systemd/system/systemd-journal-remote.service:
|
||||||
|
exist: true
|
||||||
|
mode: "0777"
|
||||||
|
filetype: directory
|
||||||
|
/var/log/journal/remote:
|
||||||
|
exist: true
|
||||||
|
mode: "0777"
|
||||||
|
filetype: directory
|
||||||
port:
|
port:
|
||||||
tcp:80:
|
tcp:80:
|
||||||
listening: true
|
listening: true
|
||||||
@ -32,6 +43,10 @@ port:
|
|||||||
listening: true
|
listening: true
|
||||||
ip:
|
ip:
|
||||||
- 0.0.0.0
|
- 0.0.0.0
|
||||||
|
tcp:19532:
|
||||||
|
listening: true
|
||||||
|
ip:
|
||||||
|
- '*'
|
||||||
service:
|
service:
|
||||||
apache2:
|
apache2:
|
||||||
enabled: true
|
enabled: true
|
||||||
@ -42,6 +57,9 @@ service:
|
|||||||
zabbix-agent:
|
zabbix-agent:
|
||||||
enabled: true
|
enabled: true
|
||||||
running: true
|
running: true
|
||||||
|
systemd-journal-remote.socket:
|
||||||
|
enabled: true
|
||||||
|
running: true
|
||||||
command:
|
command:
|
||||||
sysctl net.ipv4.ip_forward:
|
sysctl net.ipv4.ip_forward:
|
||||||
exit-status: 0
|
exit-status: 0
|
||||||
|
@ -8,25 +8,26 @@ set -o pipefail
|
|||||||
GITUSR=gitgsb
|
GITUSR=gitgsb
|
||||||
GITPRJ=gsb2024
|
GITPRJ=gsb2024
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y apache2 git
|
apt-get install -y lighttpd git
|
||||||
STOREREP="/var/www/html/gsbstore"
|
STOREREP="/var/www/html/gsbstore"
|
||||||
|
|
||||||
|
|
||||||
GLPIREL=10.0.11
|
GLPIREL=10.0.11
|
||||||
str="wget -nc https://github.com/glpi-project/glpi/releases/download/${GLPIREL}/glpi-${GLPIREL}.tgz"
|
str="wget -nc -4 https://github.com/glpi-project/glpi/releases/download/${GLPIREL}/glpi-${GLPIREL}.tgz"
|
||||||
|
|
||||||
#GLPI Agent
|
#GLPI Agent
|
||||||
|
|
||||||
GLPIAGVER=1.7
|
GLPIAGVER=1.7
|
||||||
str31="wget -nc https://github.com/glpi-project/glpi-agent/releases/download/${GLPIAGVER}/GLPI-Agent-${GLPIAGVER}-x64.msi"
|
str31="wget -nc -4 https://github.com/glpi-project/glpi-agent/releases/download/${GLPIAGVER}/GLPI-Agent-${GLPIAGVER}-x64.msi"
|
||||||
|
|
||||||
#str32="wget -nc https://github.com/glpi-project/glpi-agent/releases/download/${GLPIAGVER}/GLPI-Agent-${GLPIAGVER}-x86.msi"
|
#str32="wget -nc -4 https://github.com/glpi-project/glpi-agent/releases/download/${GLPIAGVER}/GLPI-Agent-${GLPIAGVER}-x86.msi"
|
||||||
|
|
||||||
FOGREL=1.5.10
|
FOGREL=1.5.10
|
||||||
str4="wget -nc https://github.com/FOGProject/fogproject/archive/${FOGREL}.tar.gz -O fogproject-${FOGREL}.tar.gz"
|
str4="wget -nc -4 https://github.com/FOGProject/fogproject/archive/${FOGREL}.tar.gz -O fogproject-${FOGREL}.tar.gz"
|
||||||
|
|
||||||
WPREL=6.4.2
|
WPREL=6.4.2
|
||||||
#v6.1.1 le 17/01/2023
|
#v6.1.1 le 17/01/2023
|
||||||
str5="wget -nc https://fr.wordpress.org/latest-fr_FR.tar.gz -O wordpress-6.4.2-fr_FR.tar.gz"
|
str5="wget -nc -4 https://fr.wordpress.org/latest-fr_FR.tar.gz -O wordpress-6.4.2-fr_FR.tar.gz"
|
||||||
|
|
||||||
str6="curl -L https://github.com/goss-org/goss/releases/latest/download/goss-linux-amd64 -o goss"
|
str6="curl -L https://github.com/goss-org/goss/releases/latest/download/goss-linux-amd64 -o goss"
|
||||||
|
|
||||||
@ -34,17 +35,17 @@ str7="curl -L https://github.com/goss-org/goss/releases/latest/download/dgoss -o
|
|||||||
|
|
||||||
#GESTSUPREL=3.2.30
|
#GESTSUPREL=3.2.30
|
||||||
#str8="wget -nc 'https://gestsup.fr/index.php?page=download&channel=stable&version=${GESTSUPREL}&type=gestsup' -O gestsup_${GESTSUPREL}.zip"
|
#str8="wget -nc 'https://gestsup.fr/index.php?page=download&channel=stable&version=${GESTSUPREL}&type=gestsup' -O gestsup_${GESTSUPREL}.zip"
|
||||||
str8="wget -nc 'https://gestsup.fr/index.php?page=download&channel=stable&version=3.2.30&type=gestsup' -O gestsup_3.2.30.zip"
|
str8="wget -nc -4 'https://gestsup.fr/index.php?page=download&channel=stable&version=3.2.30&type=gestsup' -O gestsup_3.2.30.zip"
|
||||||
|
|
||||||
#METRICBEAT ET FILEBEAT
|
#METRICBEAT ET FILEBEAT
|
||||||
ELKREL=8.11.3
|
ELKREL=8.11.3
|
||||||
str81="wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-${ELKREL}-amd64.deb"
|
str81="wget -nc -4 https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-${ELKREL}-amd64.deb"
|
||||||
str82="wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-${ELKREL}-windows-x86_64.zip"
|
str82="wget -nc -4 https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-${ELKREL}-windows-x86_64.zip"
|
||||||
str83="wget https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-${ELKREL}-windows-x86_64.zip"
|
str83="wget -nc -4 https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-${ELKREL}-windows-x86_64.zip"
|
||||||
str84="wget https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-${ELKREL}-amd64.deb"
|
str84="wget -nc -4 https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-${ELKREL}-amd64.deb"
|
||||||
|
|
||||||
|
|
||||||
[[ -d "${STOREREP}" ]]|| mkdir "${STOREREP}"
|
[[ -d "${STOREREP}" ]] || mkdir "${STOREREP}"
|
||||||
|
|
||||||
(cat <<EOT > "${STOREREP}/getall"
|
(cat <<EOT > "${STOREREP}/getall"
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
@ -61,10 +62,10 @@ chmod +x ./goss ./dgoss
|
|||||||
curl -L https://get.docker.com -o getdocker.sh
|
curl -L https://get.docker.com -o getdocker.sh
|
||||||
chmod +x ./getdocker.sh
|
chmod +x ./getdocker.sh
|
||||||
|
|
||||||
wget -nc https://github.com/FiloSottile/mkcert/releases/download/v1.4.4/mkcert-v1.4.4-linux-amd64 -O mkcert
|
wget -nc -4 https://github.com/FiloSottile/mkcert/releases/download/v1.4.4/mkcert-v1.4.4-linux-amd64 -O mkcert
|
||||||
chmod +x ./mkcert
|
chmod +x ./mkcert
|
||||||
|
|
||||||
${str8}
|
#${str8}
|
||||||
|
|
||||||
${str81}
|
${str81}
|
||||||
${str82}
|
${str82}
|
||||||
@ -75,3 +76,9 @@ EOT
|
|||||||
)
|
)
|
||||||
|
|
||||||
cat "${STOREREP}/getall"
|
cat "${STOREREP}/getall"
|
||||||
|
|
||||||
|
cd "${STOREREP}" || exit 2
|
||||||
|
bash getall
|
||||||
|
cp goss /usr/local/bin
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
|
- name: desactive unatentted upgrade
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: unattended-upgrades.service
|
||||||
|
state: stopped
|
||||||
|
enabled: false
|
||||||
|
|
||||||
- name: Copie sources.list
|
- name: Copie sources.list
|
||||||
copy:
|
copy:
|
||||||
src: sources.list.{{ ansible_distribution }}
|
src: sources.list.{{ ansible_distribution_release }}
|
||||||
dest: /etc/apt/sources.list
|
dest: /etc/apt/sources.list
|
||||||
|
|
||||||
- name: Copie apt.conf pour proxy
|
- name: Copie apt.conf pour proxy
|
||||||
@ -75,8 +81,3 @@
|
|||||||
- net.ipv6.conf.default.disable_ipv6
|
- net.ipv6.conf.default.disable_ipv6
|
||||||
- net.ipv6.conf.lo.disable_ipv6
|
- net.ipv6.conf.lo.disable_ipv6
|
||||||
|
|
||||||
- name: desactive unatentted upgrade
|
|
||||||
ansible.builtin.service:
|
|
||||||
name: unattended-upgrades.service
|
|
||||||
state: stopped
|
|
||||||
enabled: false
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
depl_url: "http://s-adm.gsb.adm/gsbstore"
|
depl_url: "http://s-adm.gsb.adm/gsbstore"
|
||||||
depl_fog: "fogproject-1.5.9.tar.gz"
|
depl_fog: "fogproject-1.5.10.tar.gz"
|
||||||
instructions: "Pour lancer l'installateur Fog, faites : 'bash /root/tools/fog/bin/installfog.sh'. Suivez ensuite les instructions"
|
instructions: "Pour lancer l'installateur Fog, faites : 'bash /root/tools/fog/bin/installfog.sh'. Suivez ensuite les instructions"
|
||||||
|
@ -3,11 +3,8 @@
|
|||||||
## Find more information about this file in the FOG Project wiki:
|
## Find more information about this file in the FOG Project wiki:
|
||||||
## https://wiki.fogproject.org/wiki/index.php?title=.fogsettings
|
## https://wiki.fogproject.org/wiki/index.php?title=.fogsettings
|
||||||
## Version: 1.5.10
|
## Version: 1.5.10
|
||||||
<<<<<<< HEAD
|
|
||||||
## Install time: jeu. 11 janv. 2024
|
## Install time: jeu. 11 janv. 2024
|
||||||
=======
|
|
||||||
## Install time: jeu. 11 janv. 2024 11:41:05
|
## Install time: jeu. 11 janv. 2024 11:41:05
|
||||||
>>>>>>> cbcefb5fbd5abe52a1704026505ff174752c7c11
|
|
||||||
ipaddress='172.16.64.16'
|
ipaddress='172.16.64.16'
|
||||||
copybackold='0'
|
copybackold='0'
|
||||||
interface='enp0s9'
|
interface='enp0s9'
|
||||||
|
@ -6,7 +6,7 @@ Le rôle permet de créer la base GLPI.
|
|||||||
|
|
||||||
## Comment utiliser GLPI
|
## Comment utiliser GLPI
|
||||||
|
|
||||||
Après le pull-config, depuis une machine du réseau n-user, se rendre sur l'URL : *http://s-itil/install/install.php*
|
Après le pull-config, depuis une machine du réseau n-user, se rendre sur l'URL : *http://s-itil.gsb.lan*
|
||||||
Puis lancer l'installation, les paramètres sql à fournir sont les suivant :
|
Puis lancer l'installation, les paramètres sql à fournir sont les suivant :
|
||||||
* serveur : **localhost**
|
* serveur : **localhost**
|
||||||
* utilisateur : **glpi**
|
* utilisateur : **glpi**
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
---
|
---
|
||||||
- name: restart php-fpm
|
- name: restart php-fpm
|
||||||
service: name=php8.2-fpm
|
service:
|
||||||
state=: restarted
|
name: php8.2-fpm
|
||||||
|
state=: restarted
|
||||||
|
|
||||||
- name: restart nginx
|
- name: restart nginx
|
||||||
service: name=nginx
|
service:
|
||||||
state: restarted
|
name: nginx
|
||||||
|
state: restarted
|
||||||
|
|
||||||
- name: restart mariadb-server
|
- name: restart mariadb-server
|
||||||
service: name=mariadb-server
|
service:
|
||||||
state: restarted
|
name: mariadb-server
|
||||||
|
state: restarted
|
||||||
|
@ -1,16 +1,30 @@
|
|||||||
# Role syslog : installation et configuration de syslog serveur (centralisation des logs)
|
# Role journald-rcv : installation et configuration du serveur systemd-journal-remote (centralisation des logs)
|
||||||
***
|
***
|
||||||
|
## Fonctionnalitées du rôle:
|
||||||
|
|
||||||
Ce role a pour objectif de activer le module UDP dans le fichier /etc/rsyslog.conf pour accepter les logs entrants des machines concernées :
|
Ce role a pour objectif d'installer et d'éditer les fichiers de configuration de systemd journal remote afin que les machines lançant ce rôle puissent recevoir les logs des autres machine du parc.
|
||||||
on décommente la ligne suivante :
|
|
||||||
'module(load="imudp"\)'
|
|
||||||
|
|
||||||
Ensuite le role active l'écoute du module UDP sur le port 514 afin de pouvoir envoyer les logs.
|
## Opérations réaliser par le role:
|
||||||
on décommente la ligne suivante dans le même fichier que ci-dessus :
|
Le role réalise les opération suivante:
|
||||||
'input\(type="imudp" port="514"\)'
|
* installation du paquet **systemd-journal-remote**.
|
||||||
|
* Démarrage et activation (au démarrage) du service **systemd-journal-remote.socket.
|
||||||
|
* Création des fichiers de configuration de **systemd-journal-remote** à partir d'une copie du fichier de configuration déja existante.
|
||||||
|
* Changement du protocole utilisé par journald. Passant du protocole **HTTPS** au protocole **HTTP*** Activation du mode split qui permet d'avoir un fichier de log par machine supervisées.
|
||||||
|
* Création du répertoire qui accueillera les fichiers de logs.
|
||||||
|
* Rédémarrage du daemon systemd afin que le système prenne en compte les modifications efféctuées.
|
||||||
|
|
||||||
pour finir le role va charger le module UDP afin que la machine **s-infra** puissent reçevoir les logs entrants.
|
## Test du bon fonctionnement du rôle
|
||||||
Pour faire cela on décommente la ligne suivante dans le fichier /etc/systemd/journald.conf :
|
|
||||||
'ForwardToSyslog=yes'
|
|
||||||
|
|
||||||
pour finir le role va redemmarer automatiquement les services journald et rsyslog
|
Afin de tester le rôle nous éffectuons un test:
|
||||||
|
|
||||||
|
**Depuis la machine sur laquelle ce rôle est installé:**
|
||||||
|
* **journalctl -f -D /var/log/journal/remote/
|
||||||
|
* S'assurer que le port 19532 (port par défault utilisé par le serviceà) soit ouvert et utilisable sur toutes les machines en entrée.
|
||||||
|
|
||||||
|
Afin de consulter les fichiers d'événement.
|
||||||
|
|
||||||
|
** Depuis une des machines eméttrices de logs:**
|
||||||
|
|
||||||
|
* **logger ok**
|
||||||
|
|
||||||
|
Si le message émis par la machine éméttrice et consultable depuis la machine receptrice alors le test est réussi.
|
||||||
|
@ -10,4 +10,5 @@
|
|||||||
- snmp-agent
|
- snmp-agent
|
||||||
# - syslog-cli
|
# - syslog-cli
|
||||||
# - fog
|
# - fog
|
||||||
|
- - journald-snd
|
||||||
- post
|
- post
|
||||||
|
@ -17,4 +17,5 @@
|
|||||||
- glpi
|
- glpi
|
||||||
- ssh-cli
|
- ssh-cli
|
||||||
# - syslog-cli
|
# - syslog-cli
|
||||||
|
- journald-snd
|
||||||
- post
|
- post
|
||||||
|
Reference in New Issue
Block a user