Compare commits
13 Commits
v0.0.2a-ps
...
v0.0.2l-aa
Author | SHA1 | Date | |
---|---|---|---|
c2eb2b85a4 | |||
c20f44ec6e | |||
0c7d48caf3 | |||
12de1c8891 | |||
5fffbc77e2 | |||
b1e87cdd1e | |||
7f7207cf46 | |||
1187a5e28d | |||
8cef3cbf6b | |||
49ca8325e8 | |||
08973e83b3 | |||
79c7bd34e6 | |||
0cd9f1bb4c |
@ -1,11 +1,25 @@
|
|||||||
---
|
- name: install haproxy
|
||||||
- name: Installation d'HAproxy
|
apt:
|
||||||
apt: pkg=haproxy state=present update_cache=yes
|
name: haproxy
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Fichier de configuration
|
- name: parametre backend et fontend
|
||||||
copy: src=haproxy.cfg dest=/etc/haproxy/haproxy.cfg
|
blockinfile:
|
||||||
notify:
|
path: /etc/haproxy/haproxy.cfg
|
||||||
- restart haproxy
|
block: |
|
||||||
|
frontend proxypublic
|
||||||
|
bind 192.168.56.2:80
|
||||||
|
default_backend fermeweb
|
||||||
|
|
||||||
|
backend fermeweb
|
||||||
|
balance roundrobin
|
||||||
|
option httpclose
|
||||||
|
#option httpchk HEAD / HTTP/1.0
|
||||||
|
server web1.test 192.168.56.3:80 check
|
||||||
|
#server web2.test 192.168.56.4:80 check
|
||||||
|
|
||||||
- name: Copie de goss
|
- name: redemarre haproxy
|
||||||
copy: src=goss.yaml dest=/root
|
service:
|
||||||
|
name: haproxy
|
||||||
|
state: restarted
|
||||||
|
enabled: yes
|
||||||
|
@ -2,34 +2,36 @@
|
|||||||
|
|
||||||
Nextcloud et Traefik fonctionnent grâce à docker. Pour pouvoir faire fonctionner ce playbook, docker doit être installé.
|
Nextcloud et Traefik fonctionnent grâce à docker. Pour pouvoir faire fonctionner ce playbook, docker doit être installé.
|
||||||
|
|
||||||
## Premièrement
|
## 1.
|
||||||
|
|
||||||
Le playbook va créer le dossier nxc à la racine de root. Deux fichier docker-compose "nextcloud.yml" et "traefik.yml" y seront copiés depuis le répertoire "files" du playbook.
|
Le playbook crée le dossier **nxc** à la racine de root.
|
||||||
Enfin, dans le répertoire nxc, seront créé les dossier certs et config.
|
|
||||||
|
|
||||||
### Deuxièmement
|
Les fichiers "nextcloud.yml" et "traefik.yml" y seront copiés depuis le répertoire "files" du playbook.
|
||||||
|
|
||||||
Le playbook va copier les fichiers placés dans "files" et les placer dans les bons répertoires.
|
Enfin, dans le répertoire nxc, sont créés les répertoires **certs** et **config**.
|
||||||
|
|
||||||
#### Troisièmement
|
## 2. Copie des fichiers
|
||||||
|
|
||||||
Le playbook va créer un certificat x509 grâce à mkcert, il s'agit d'une solution permettant de créer
|
Le playbook copie les fichiers placés dans "files" et les placer dans les bons répertoires.
|
||||||
des certificats auto-signés. Pour cela il télécharge mkcert sur s-adm (utiliser le getall).
|
|
||||||
|
|
||||||
mkcert sera placé dans : /usr/local/bin/
|
## 3. Génération du certificat
|
||||||
|
|
||||||
Pour créer le certificat le playbook va executer des lignes de commandes (lancé depuis nxc/) :
|
Le playbook crée un certificat **x509** grâce à **mkcert**, il s'agit d'une solution permettant de créer des certificats auto-signés. Pour cela, il télécharge **mkcert** sur **s-adm** (utiliser le script **getall**).
|
||||||
|
|
||||||
|
**mkcert** est placé dans : /usr/local/bin/
|
||||||
|
|
||||||
|
Pour créer le certificat, le playbook exécute les commandes (lancé depuis nxc/) :
|
||||||
```
|
```
|
||||||
/usr/local/bin/mkcert -install # Installe mkcert
|
/usr/local/bin/mkcert -install # Installe mkcert
|
||||||
/usr/local/bin/mkcert -key-file key.pem -cert-file cert.pem "hôte.domaine.local" "*.domaine.local" #Crée le certificat le DNS spécifié
|
/usr/local/bin/mkcert -key-file key.pem -cert-file cert.pem "hôte.domaine.local" "*.domaine.local" #Crée le certificat le DNS spécifié
|
||||||
```
|
```
|
||||||
##### Quatrièmement
|
## 4. Lancement
|
||||||
|
|
||||||
Le playbook va lancer les fichier "docker-compose" à savoir : nextcloud.yml et traefik.yml.
|
Le playbook lance les fichiers "docker-compose" à savoir : nextcloud.yml et traefik.yml qui démarrent les deux piles **docker**.
|
||||||
Cela va installer les solutions automatiquement. Nextcloud est alors fonctionnel avec
|
|
||||||
un proxy inverse qui va rediriger en HTTPS.
|
Nextcloud est alors fonctionnel avec le proxy inverse **traefik** assurant la redirection vers HTTPS.
|
||||||
|
|
||||||
|
|
||||||
ATTENTION : Après avoir relancé la VM, executez le script "nxc-start.sh" afin d'installer les piles applicatives.
|
ATTENTION : Après avoir relancé la VM, executez le script "nxc-start.sh" afin d'installer les piles applicatives.
|
||||||
Une fois le script fini, accedez au site :
|
|
||||||
https://s-nxc.gsb.lan
|
Une fois le script terminé, le site est disponible ici : https://s-nxc.gsb.lan
|
||||||
|
@ -8,37 +8,30 @@ iface lo inet loopback
|
|||||||
# Reseau N-adm
|
# Reseau N-adm
|
||||||
allow-hotplug enp0s3
|
allow-hotplug enp0s3
|
||||||
iface enp0s3 inet static
|
iface enp0s3 inet static
|
||||||
address 192.168.99.12
|
address 192.168.99.12/24
|
||||||
netmask 255.255.255.0
|
|
||||||
|
|
||||||
|
|
||||||
# Reseau liaison avec r-ext
|
# Reseau liaison avec r-ext
|
||||||
allow-hotplug enp0s8
|
allow-hotplug enp0s8
|
||||||
iface enp0s8 inet static
|
iface enp0s8 inet static
|
||||||
address 192.168.200.254
|
address 192.168.200.254/24
|
||||||
netmask 255.255.255.0
|
|
||||||
gateway 192.168.200.253
|
gateway 192.168.200.253
|
||||||
up ip route add default via 192.168.200.253
|
|
||||||
|
|
||||||
|
|
||||||
# Reseau wifi
|
# Reseau wifi
|
||||||
allow-hotplug enp0s9
|
allow-hotplug enp0s9
|
||||||
iface enp0s9 inet static
|
iface enp0s9 inet static
|
||||||
address 172.16.65.254
|
address 172.16.65.254/24
|
||||||
netmask 255.255.255.0
|
|
||||||
|
|
||||||
|
|
||||||
# Reseau user
|
# Reseau user
|
||||||
allow-hotplug enp0s10
|
allow-hotplug enp0s10
|
||||||
iface enp0s10 inet static
|
iface enp0s10 inet static
|
||||||
address 172.16.64.254
|
address 172.16.64.254/24
|
||||||
netmask 255.255.255.0
|
|
||||||
|
|
||||||
|
|
||||||
# Reseau infra
|
# Reseau infra
|
||||||
allow-hotplug enp0s16
|
allow-hotplug enp0s16
|
||||||
iface enp0s16 inet static
|
iface enp0s16 inet static
|
||||||
address 172.16.0.254
|
address 172.16.0.254/24
|
||||||
netmask 255.255.255.0
|
|
||||||
up /root/routagenat
|
|
||||||
|
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
- name: Copie du fichier sysctl.conf
|
- name: Copie du fichier sysctl.conf
|
||||||
copy: src=sysctl.conf dest=/etc/
|
copy: src=sysctl.conf dest=/etc/
|
||||||
|
|
||||||
- name: copier le script de routage
|
#- name: copier le script de routage
|
||||||
copy: src=routagenat dest=/root/
|
# copy: src=routagenat dest=/root/
|
||||||
|
|
||||||
- name: rendre executabe le script
|
#- name: rendre executabe le script
|
||||||
shell: chmod +x /root/routagenat
|
# shell: chmod +x /root/routagenat
|
||||||
|
|
||||||
#- name: exectuer le script
|
#- name: exectuer le script
|
||||||
# script: /root/routagenat
|
# script: /root/routagenat
|
||||||
|
@ -17,5 +17,5 @@
|
|||||||
#- name: copie du fichier de configuration depuis r-vp1
|
#- name: copie du fichier de configuration depuis r-vp1
|
||||||
# command: "sshpass -p 'root' scp -r root@192.168.99.112:/root/confwg/wg0-b.conf /etc/wireguard/"
|
# command: "sshpass -p 'root' scp -r root@192.168.99.112:/root/confwg/wg0-b.conf /etc/wireguard/"
|
||||||
|
|
||||||
- name: renommage du fichier de configuration
|
#- name: renommage du fichier de configuration
|
||||||
command: "mv /etc/wireguard/wg0-b.conf /etc/wireguard/wg0.conf"
|
# command: "mv /etc/wireguard/wg0-b.conf /etc/wireguard/wg0.conf"
|
||||||
|
@ -2,14 +2,14 @@ mkdir C:\gsb\partages
|
|||||||
|
|
||||||
cd C:\gsb\partages
|
cd C:\gsb\partages
|
||||||
|
|
||||||
mkdir compta
|
mkdir compta
|
||||||
|
|
||||||
mkdir ventes
|
mkdir ventes
|
||||||
|
|
||||||
mkdir public
|
mkdir public
|
||||||
|
|
||||||
mkdir commun
|
mkdir commun
|
||||||
|
|
||||||
mkdir users
|
cd C:\gsb
|
||||||
|
|
||||||
|
mkdir users
|
3
windows/mkusr-backup.cmd
Normal file
3
windows/mkusr-backup.cmd
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
net group gg-backup /ADD
|
||||||
|
call mkusr uBackup "u-backup" gg-backup
|
||||||
|
icacls "C:\gsb\partages\public" /Grant:r uBackup:M /T
|
@ -1,14 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo ping interface paserelle r-vp2
|
||||||
ping -c3 172.16.128.254
|
ping -c3 172.16.128.254
|
||||||
|
|
||||||
|
echo ping r-vp1 interface n-linkv
|
||||||
ping -c3 192.168.1.2
|
ping -c3 192.168.1.2
|
||||||
|
|
||||||
|
echo ping r-ext interface n-linkv
|
||||||
ping -c3 192.168.1.1
|
ping -c3 192.168.1.1
|
||||||
|
|
||||||
|
echo ping r-ext interface n-link
|
||||||
ping -c3 192.168.200.253
|
ping -c3 192.168.200.253
|
||||||
|
|
||||||
|
echo ping r-int interface n-link
|
||||||
ping -c3 192.168.200.254
|
ping -c3 192.168.200.254
|
||||||
|
|
||||||
|
echo ping r-int interface s-infra
|
||||||
ping -c3 172.16.0.254
|
ping -c3 172.16.0.254
|
||||||
|
|
||||||
|
echo ping s-infra
|
||||||
ping -c3 172.16.0.1
|
ping -c3 172.16.0.1
|
||||||
|
@ -1,14 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo ping s-infra
|
||||||
ping -c3 172.16.0.1
|
ping -c3 172.16.0.1
|
||||||
|
|
||||||
|
echo ping r-int interface n-infra
|
||||||
ping -c3 172.16.0.254
|
ping -c3 172.16.0.254
|
||||||
|
|
||||||
|
echo ping r-int interface n-link
|
||||||
ping -c3 192.168.200.254
|
ping -c3 192.168.200.254
|
||||||
|
|
||||||
|
echo ping r-ext interface n-linkv
|
||||||
ping -c3 192.168.1.1
|
ping -c3 192.168.1.1
|
||||||
|
|
||||||
|
echo ping r-vp1 interface n-linkv
|
||||||
ping -c3 192.168.1.2
|
ping -c3 192.168.1.2
|
||||||
|
|
||||||
|
echo ping r-vp2 interface n-ag
|
||||||
ping -c3 172.16.128.254
|
ping -c3 172.16.128.254
|
||||||
|
|
||||||
|
echo ping s-agence
|
||||||
ping -c3 172.16.128.10
|
ping -c3 172.16.128.10
|
||||||
|
@ -1,12 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo ping s-infra
|
||||||
ping -c3 172.16.0.1
|
ping -c3 172.16.0.1
|
||||||
|
|
||||||
|
echo ping r-ext interface n-link
|
||||||
ping -c3 192.168.200.253
|
ping -c3 192.168.200.253
|
||||||
|
|
||||||
|
echo ping r-ext interface n-linkv
|
||||||
ping -c3 192.168.1.1
|
ping -c3 192.168.1.1
|
||||||
|
|
||||||
|
echo ping r-vp1 interface n-link
|
||||||
ping -c3 192.168.1.2
|
ping -c3 192.168.1.2
|
||||||
|
|
||||||
|
echo ping r-vp2 interface n-ag
|
||||||
ping -c3 172.16.128.254
|
ping -c3 172.16.128.254
|
||||||
|
|
||||||
|
echo ping s-agence
|
||||||
ping -c3 172.16.128.10
|
ping -c3 172.16.128.10
|
||||||
|
@ -1,14 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
echo ping vers r-int
|
||||||
ping -c3 172.16.0.254
|
ping -c3 172.16.0.254
|
||||||
|
|
||||||
|
echo ping r-int interface externe
|
||||||
ping -c3 192.168.200.254
|
ping -c3 192.168.200.254
|
||||||
|
|
||||||
|
echo ping r-ext interface interne
|
||||||
ping -c3 192.168.200.253
|
ping -c3 192.168.200.253
|
||||||
|
|
||||||
|
echo ping r-ext interface liaison
|
||||||
ping -c3 192.168.1.1
|
ping -c3 192.168.1.1
|
||||||
|
|
||||||
|
echo ping r-vp1 interface liaison n-linkv
|
||||||
ping -c3 192.168.1.2
|
ping -c3 192.168.1.2
|
||||||
|
|
||||||
ping -c3 172.16.125.254
|
echo ping r-vp2 interface interface interne
|
||||||
|
ping -c3 172.16.128.254
|
||||||
|
|
||||||
ping -c3 172.16.128.10
|
echo ping s-agence
|
||||||
|
ping -c3 172.16.128.11
|
||||||
|
Reference in New Issue
Block a user