Obisidian vault auto-backup: 12-01-2026 11:57:40 on . 8 files edited

This commit is contained in:
Félix MARQUET
2026-01-12 11:57:40 +01:00
parent a1f6dfc9d0
commit 4cd959e900
8 changed files with 143 additions and 12 deletions

View File

@@ -204,25 +204,26 @@
"obsidian-git:Open Git source control": false
}
},
"active": "e11a6a080eb83632",
"active": "622da1d4e0ba0f73",
"lastOpenFiles": [
"ISEN/Cloud Computing/CIPA4/TP Ansible/templates/nginx.conf.j2",
"ISEN/Cloud Computing/CIPA4/TP Ansible/templates",
"ISEN/Cloud Computing/CIPA4/TP Ansible/roles/nginx_proxy/templates/nginx.conf.j2",
"ISEN/Cloud Computing/CIPA4/TP Ansible/roles/nginx_proxy/handlers/main.yml",
"ISEN/Cloud Computing/CIPA4/TP Ansible/roles/nginx_proxy/tasks/main.yml",
"ISEN/Cloud Computing/CIPA4/TP Ansible/roles/flask_app/tasks/main.yml",
"ISEN/Cloud Computing/CIPA4/TP Ansible/roles/nginx_proxy/templates",
"ISEN/Cloud Computing/CIPA4/TP Ansible/roles/nginx_proxy/tasks",
"ISEN/Cloud Computing/CIPA4/TP Ansible/roles/nginx_proxy/handlers",
"ISEN/Cloud Computing/CIPA4/TP Ansible/roles/flask_app/templates",
"ISEN/Cloud Computing/CIPA4/TP Ansible/roles/flask_app/tasks",
"ISEN/Cloud Computing/CIPA4/Cloud Computing Cours 1.md",
"ISEN/Cloud Computing/CIPA4/TP 4 Ansible.md",
"ISEN/Cloud Computing/CIPA4/TP 3 Ansible.md",
"ISEN/Cloud Computing/CIPA4/TP 2 Ansible.md",
"ISEN/Cloud Computing/CIPA4/TP 1 Ansible.md",
"ISEN/Réunion/CIPA 4/Réunion 8 janv 2026.md",
"ISEN/Cloud Computing/CIPA4",
"ISEN/Cloud Computing",
"ISEN/Web/CIPA 4/TP/TP1/TP1_MARQUET.zip",
"ISEN/Web/CIPA 4/TP/TP1/Archive.zip",
"ISEN/Web/CIPA 4/TP/TP1/images/ISEN_Logo.png",
"ISEN/Web/CIPA 4/TP/TP1/tp1.pdf",
"ISEN/Web/CIPA 4/TP/TP1/images",
"ISEN/Web/CIPA 4/TP/TP1/chat.html",
"ISEN/Web/CIPA 4/TP/TP1/authentification.html",
"ISEN/Web/CIPA 4/TP/TP1/accueil.html",
"ISEN/Web/CIPA 4/TP/TP1",
"conflict-files-obsidian-git.md",
"ISEN/Réunion/CIPA 4/Untitled.md",
"ISEN/English/CIPA4/24 oct 2025.md",
@@ -242,7 +243,6 @@
"ISEN/Réseau/A2/CCNA Cours 2.md",
"ISEN/Réseau/A2/CCNA Cours 3.md",
"Elevator.md",
"ISEN/JAVA/CIPA4/TP/TP2/TP2.md",
"Pasted image 20251009192656.png",
"src/Pasted image 20240130111505.png",
"src/Pasted image 20240123120819.png",

View File

@@ -0,0 +1,53 @@
---
- hosts: demo
gather_facts: yes
tasks:
- name: Installer le paquet git
apt:
name: git
state: present
- name: Cloner mon application Flask
git:
repo: 'https://github.com/arnaudmorin/demo-flask.git'
dest: /root/demo-flask
- name: Installer pip
apt:
name: python3-pip
state: present
- name: Installer les dépendances Flask
pip:
requirements: /root/demo-flask/requirements.txt
- name: Démarrer l'application Flask en arrière-plan
shell: "nohup /root/demo-flask/start.sh &"
- hosts: localhost
become: yes
vars:
proxy_port: 80
flask_port: 8080
server_name: "135.125.246.84"
tasks:
- name: Installer Nginx
apt:
name: nginx
state: present
- name: Configurer Nginx comme reverse proxy
template:
src: nginx.conf.j2
dest: /etc/nginx/sites-available/demo
notify: Restart Nginx
- name: Activer la configuration du site
file:
src: /etc/nginx/sites-available/demo
dest: /etc/nginx/sites-enabled/demo
state: link
notify: Restart Nginx
- name: Afficher l'URL d'accès au site
debug:
msg: "Votre application est accessible à l'URL : http://{{ server_name }}"
handlers:
- name: Restart Nginx
service:
name: nginx
state: restarted

View File

@@ -0,0 +1,13 @@
---
- hosts: demo
roles:
- flask_app
- hosts: localhost
become: yes
vars:
proxy_port: 80
flask_port: 8080
server_name: "135.125.246.84"
roles:
- role: nginx_proxy

View File

@@ -0,0 +1,22 @@
---
- name: Installer le paquet git
apt:
name: git
state: present
- name: Cloner l'application Flask
git:
repo: 'https://github.com/arnaudmorin/demo-flask.git'
dest: /root/demo-flask
- name: Installer pip
apt:
name: python3-pip
state: present
- name: Installer les dépendances Flask
pip:
requirements: /root/demo-flask/requirements.txt
- name: Démarrer l'application Flask en arrière-plan
shell: "nohup /root/demo-flask/start.sh &"

View File

@@ -0,0 +1,5 @@
---
- name: Restart Nginx
service:
name: nginx
state: restarted

View File

@@ -0,0 +1,18 @@
---
- name: Installer Nginx
apt:
name: nginx
state: present
- name: Configurer Nginx comme reverse proxy
template:
src: nginx.conf.j2
dest: /etc/nginx/sites-available/{{ server_name }}
notify: Restart Nginx
- name: Activer la configuration du site
file:
src: /etc/nginx/sites-available/{{ server_name }}
dest: /etc/nginx/sites-enabled/{{ server_name }}
state: link
notify: Restart Nginx

View File

@@ -0,0 +1,10 @@
server {
listen {{ proxy_port }};
server_name {{ server_name }};
location / {
proxy_pass http://127.0.0.2:{{ flask_port }};
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}

View File

@@ -0,0 +1,10 @@
server {
listen {{ proxy_port }};
server_name {{ server_name }};
location / {
proxy_pass http://127.0.0.2:{{ flask_port }};
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}