Compare commits

...

7 Commits

Author SHA1 Message Date
d29c428c46 ajout rvp2-fw 2023-04-04 10:32:42 +02:00
c446f35aed changement 2023-04-04 10:25:52 +02:00
41bd6ac61e feat: changed the way peertube role is handled 2023-04-04 10:24:41 +02:00
7ce68f6293 fix: misleading docs by redhat ;p 2023-04-04 09:38:16 +02:00
bac2f067a9 fix: sychronized roles for peertube 2023-04-04 09:27:12 +02:00
d6d4991c16 fix: edited postfix configuration 2023-04-04 09:20:33 +02:00
2f7544c3a1 fix: changed order of task in main.yaml 2023-04-04 09:01:02 +02:00
16 changed files with 56 additions and 113 deletions

View File

@ -53,7 +53,7 @@ On utilsera le script (bash) **mkvm** ou (PowerShell) **mkvm.ps1** pour créeer
```shell ```shell
gsb2023> gsb2023>
cd pre cd scripts
$ mkvm -r s-adm $ mkvm -r s-adm
``` ```

13
r-vp1-fw.yml Normal file
View File

@ -0,0 +1,13 @@
---
- hosts: localhost
connection: local
vars:
- ip1: 192.168.0.51
- remip: 192.168.0.52
- mynet: 192.168.1.0
- remnet: 172.16.128.0
roles:
- fw-ferm

View File

@ -12,10 +12,8 @@
- base - base
- goss - goss
# - snmp-agent # - snmp-agent
# - firewall-vpn-r
- post - post
- wireguard-r - wireguard-r
- fw-ferm
- ssh-cli - ssh-cli
- syslog-cli - syslog-cli

12
r-vp2-fw.yml Normal file
View File

@ -0,0 +1,12 @@
---
- hosts: localhost
connection: local
vars:
- ip1: 192.168.0.52
- remip: 192.168.0.51
- mynet: 172.16.128.0
- remnet: 192.168.1.0
roles:
- fw-ferm

View File

@ -15,10 +15,7 @@
- dns-agence - dns-agence
- ssh-root-access - ssh-root-access
# - snmp-agent # - snmp-agent
# - firewall-vpn-l
- wireguard-l - wireguard-l
# - x509-l
- post - post
- ssh-cli - ssh-cli
- syslog-cli - syslog-cli
- fw-ferm

View File

@ -1,23 +0,0 @@
// 0.2 - putconf - vendredi 12 avril 2013, 08:54:33 (UTC+0200)
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
forwarders {
172.16.0.1;
};
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};

View File

@ -1,4 +0,0 @@
---
- name: restart bind9
service: name=bind9 state=restarted

View File

@ -1,11 +0,0 @@
---
- name: Installation bind9
apt: name=bind9 state=present update_cache=yes
- name: Copie named.conf.options
copy: src=named.conf.options dest=/etc/bind
notify:
- restart bind9

View File

View File

@ -0,0 +1,23 @@
---
- name: mise a jour de resolv.conf...
copy:
src: /root/tools/ansible/gsb2023/roles/peertube/files/resolv.conf
dest: /etc/
mode: '0644'
- name: installation de docker...
shell: curl https://releases.rancher.com/install-docker/20.10.sh | sh
- name: attente de l'installation...
wait_for:
timeout: 30
host: localhost
- name: installation de k3s...
shell: curl -sfL https://get.k3s.io | sh -s - --docker
- name: mise a jour de resolv.conf...
copy:
src: /root/tools/ansible/gsb2023/roles/peertube/files/resolv.conf
dest: /etc/
mode: '0644'

View File

@ -71,7 +71,7 @@ mail:
enbled: true enbled: true
config: config:
general: general:
ALLOWED_SENDER_DOMAINS: # should be the same as your web domain ALLOWED_SENDER_DOMAINS: "yes"
DKIM_AUTOGENERATE: "yes" DKIM_AUTOGENERATE: "yes"
opendkim: opendkim:
RequireSafeKeys: "no" RequireSafeKeys: "no"

View File

@ -1,19 +1,4 @@
--- ---
- name: installation de docker...
shell: curl https://releases.rancher.com/install-docker/20.10.sh | sh
- name: installation de k3s...
shell: curl -sfL https://get.k3s.io | sh -s - --docker
- name: exposition du cluster...
shell: export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
- name: mise a jour de resolv.conf...
copy:
src: /root/tools/ansible/gsb2023/roles/peertube/files/resolv.conf
dest: /etc/
mode: '0644'
- name: création du répertoire du dépot peertube... - name: création du répertoire du dépot peertube...
file: file:
path: /root/tools/peertube path: /root/tools/peertube
@ -39,5 +24,8 @@
- name: installation de peertube... - name: installation de peertube...
shell: helm repo add postgresql https://charts.bitnami.com/bitnami && helm repo add redis https://charts.bitnami.com/bitnami && helm repo add mail https://bokysan.github.io/docker-postfix shell: helm repo add postgresql https://charts.bitnami.com/bitnami && helm repo add redis https://charts.bitnami.com/bitnami && helm repo add mail https://bokysan.github.io/docker-postfix
- name: exposition du cluster...
shell: export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
- name: lancement du helm chart peertube... - name: lancement du helm chart peertube...
shell: helm install --create-namespace -n peertube peertube-gsb /root/tools/peertube/helm shell: helm install --create-namespace -n peertube peertube-gsb /root/tools/peertube/helm

View File

@ -1,26 +0,0 @@
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
#auto lo
#iface lo inet loopback
#cote N-adm
allow-hotplug enp0s3
iface enp0s3 inet dhcp
# reseau entre vpn
allow-hotplug enp0s8
iface enp0s8 inet static
address 192.168.0.51
netmask 255.255.255.0
# reseau interne n-linkv
allow-hotplug enp0s9
iface enp0s9 inet static
address 192.168.1.2
netmask 255.255.255.0
up route add -net 172.16.128.0/24 gw 192.168.1.2
up route add default gw 192.168.1.1
# post-up /bin/bash /root/iptables-vpn
post-up /etc/init.d/ipsec restart

View File

@ -1,25 +0,0 @@
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
#auto lo
#iface lo inet loopback
# cote N-adm
allow-hotplug enp0s3
iface enp0s3 inet dhcp
# cote Agence
allow-hotplug enp0s8
iface enp0s8 inet static
address 172.16.128.254
netmask 255.255.255.0
# cote VPN
allow-hotplug enp0s9
iface enp0s9 inet static
address 192.168.0.52
netmask 255.255.255.0
up route add -net 192.168.1.0/24 gw 172.16.128.254
# post-up /bin/bash /root/iptables-vpn
post-up /etc/init.d/ipsec restart

View File

@ -14,4 +14,4 @@ iface enp0s3 inet static
allow-hotplug enp0s8 allow-hotplug enp0s8
iface enp0s8 inet static iface enp0s8 inet static
address 192.168.100.20/24 address 192.168.100.20/24
post-up systemctl start k3s && export KUBECONFIG=/etc/rancher/k3s/k3s.yaml post-up systemctl start k3s && sleep 20 && export KUBECONFIG=/etc/rancher/k3s/k3s.yaml

View File

@ -7,4 +7,5 @@
- post - post
- snmp-agent - snmp-agent
- ssh-cli - ssh-cli
- peertube-k3s
- peertube - peertube