Skip to content

Commit 0e784a4

Browse files
Shamzicjenovateurs
andauthored
Màj preprod (#211)
* Ajout wrapper cron sentry (production) (#198) * chore: upgrade version github actions (cd.yml) (#201) downgrade python github action to v4 fix cd * feat: ajoute un wrapper pour capturer les erreurs des crons sur sentry * feat: add sentry-cli * fix: indentation * fix: sentry-cli install * fix: sentry_wrapper_cron path * fix: sentry wrapper fonctionnel * Merge dev -> main (#207) * chore: upgrade version github actions (cd.yml) (#201) downgrade python github action to v4 fix cd * Ajout wrapper cron sentry (#204) * feat: ajoute un wrapper pour capturer les erreurs des crons sur sentry * feat: add sentry-cli * fix: indentation * fix: sentry-cli install * fix: sentry_wrapper_cron path * fix: sentry wrapper fonctionnel * fix: arg invalide en production - install ansible * chore: bump pm2 v5.4.2 (#206) * fix: utilise apt pour l'install ansible * fix: utilise environnement virtuel pour l'install ansible * fix: utilise environnement virtuel pour l'install ansible * chore: reset pm2 v5.2 * fix: setup openfisca install * Debian 11 to 12 (#208) * fix: ajout de paramétrage pour gérer les M1 plus proprement * feat: passage a la version 12 de debian --------- Co-authored-by: Jeremy PASTOURET <[email protected]> * chore: upgrade pm2 version * trigger CD --------- Co-authored-by: Jeremy PASTOURET <[email protected]> * Setup la roation des journaux systemd (#209) * feat: setup la roation des journaux systemd * lint: handler name * fix: la casse du notify pour restart systemd-journald * refactor: rotation des logs fixée à 30 jours --------- Co-authored-by: Jeremy PASTOURET <[email protected]>
1 parent e5072ae commit 0e784a4

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

roles/bootstrap/handlers/main.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@
88
ansible.builtin.service:
99
name: sshd
1010
state: restarted
11+
- name: Restart systemd-journald
12+
ansible.builtin.service:
13+
name: systemd-journald
14+
state: restarted

roles/bootstrap/tasks/main.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
- name: Install and configure certbot
3232
ansible.builtin.include_tasks: install_certbot.yaml
3333

34+
## Setup systemd
35+
- name: Setup systemd journal rotation
36+
ansible.builtin.include_tasks: setup_systemd_journal.yaml
37+
3438
## Setup Monitoring service
3539
- name: Configure monitoring service
3640
ansible.builtin.include_tasks: setup_monitor.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
- name: Setup systemd journal rotation
3+
ansible.builtin.blockinfile:
4+
path: /etc/systemd/journald.conf
5+
block: |
6+
[Journal]
7+
SystemMaxUse=2G
8+
SystemMaxFileSize=100M
9+
MaxRetentionSec=30d
10+
Compress=yes
11+
notify: Restart systemd-journald
12+
13+
- name: Force immediate cleanup of old journals
14+
ansible.builtin.command: journalctl --vacuum-time=30d
15+
changed_when: true

0 commit comments

Comments
 (0)