You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Key point:** THP, ulimits, and base sysctl settings are configured once in `security.yml` and inherited by all hosts including `mongo` and `redis`. This avoids duplication and ensures consistency.
43
+
44
+
### User Model
45
+
46
+
**Security best practice:** Database services run as dedicated unprivileged users:
47
+
48
+
-**MongoDB** runs as `mongod` user (created by MongoDB package)
49
+
-**Redis** runs as `redis` user (created by Redis package)
50
+
-**deploy** user is for application code deployment
51
+
-**devops** user has sudo access for administration
52
+
53
+
This provides proper isolation and follows the principle of least privilege.
54
+
55
+
## Files
56
+
57
+
-**`mongo.yml`** - MongoDB deployment playbook
58
+
-**`redis.yml`** - Redis deployment playbook
59
+
-**`unbound.yml`** - DNS caching with DNSSEC/DANE support
60
+
-**`security.yml`** - Security hardening (updated to include mongo/redis hosts)
61
+
-**`requirements.yml`** - Ansible Galaxy role dependencies
Both MongoDB and Redis playbooks automatically configure swap space per official recommendations.
252
+
253
+
**Redis Official Documentation:**
254
+
> "Ensured that swap is enabled and that your swap file size is equal to amount of memory on your system. If Linux does not have swap set up, and your Redis instance accidentally consumes too much memory, Redis can crash when it is out of memory, or the Linux kernel OOM killer can kill the Redis process."
0 commit comments