eadl:bloc4:fm2:td3

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
eadl:bloc4:fm2:td3 [2026/05/26 02:43] – [12. Probleme volontaire] jcheroneadl:bloc4:fm2:td3 [2026/06/12 08:05] (Version actuelle) jcheron
Ligne 1: Ligne 1:
-====== TD - Automatisation d'une stack web avec Ansible ======+====== TD3 - Automatisation d'une stack web avec Ansible ======
  
 ===== Objectifs ===== ===== Objectifs =====
Ligne 114: Ligne 114:
       python3 \       python3 \
       python3-pip \       python3-pip \
 +      sudo \
       curl \       curl \
     && mkdir -p /run/sshd \     && mkdir -p /run/sshd \
Ligne 395: Ligne 396:
     name: "{{ db_user }}"     name: "{{ db_user }}"
     password: "{{ db_password }}"     password: "{{ db_password }}"
-    priv: "{{ db_name }}.*:ALL" 
     state: present     state: present
 +- name: Attribution des privilègees
 +  become: yes
 +  become_user: postgres
 +  postgresql_privs:
 +    database: "{{ db_name }}"
 +    role: "{{ db_user }}"
 +    privs: ALL
 +    type: database
 +    state: present
 +
 </sxh> </sxh>
  
Ligne 518: Ligne 528:
  
 - name: Demarrage de Flask - name: Demarrage de Flask
-  systemd: +  shellnohup python3 /opt/flask/app.py > /var/log/flask.log 2>&1 & 
-    name: flask +  args 
-    statestarted +    chdir/opt/flask
-    enabledyes +
-    daemon_reload: yes+
 </sxh> </sxh>
  
Ligne 530: Ligne 538:
 --- ---
 - name: restart flask - name: restart flask
-  systemd: +  shellpkill -f "python3 /opt/flask/app.py"; nohup python3 /opt/flask/app.py > /var/log/flask.log 2>&1 & 
-    name: flask +  args 
-    staterestarted +    chdir/opt/flask
-    daemon_reloadyes+
 </sxh> </sxh>
  
Ligne 658: Ligne 665:
 Verifiez que l'application repond : Verifiez que l'application repond :
  
-  curl http://localhost:8080/health+  curl http://localhost:8090/health
 </WRAP> </WRAP>
  
-===== 12. Probleme volontaire =====+===== 12. Problème volontaire =====
  
 <WRAP round todo> <WRAP round todo>
  • eadl/bloc4/fm2/td3.1779756190.txt.gz
  • Dernière modification : il y a 6 semaines
  • de jcheron