Refactor AIDE configuration and add exclusion paths
This commit is contained in:
@@ -84,6 +84,13 @@ fail2ban_jails:
|
|||||||
findtime: 600
|
findtime: 600
|
||||||
bantime: 3600
|
bantime: 3600
|
||||||
|
|
||||||
|
# aide
|
||||||
|
install_aide: true
|
||||||
|
aide_exclude:
|
||||||
|
- "!/var/lib/snapd"
|
||||||
|
- "!/mnt/microk8s_persistent"
|
||||||
|
- "!/var/lib/encrypted_volumes"
|
||||||
|
|
||||||
# Unattended upgrades
|
# Unattended upgrades
|
||||||
unattended_reboot: true
|
unattended_reboot: true
|
||||||
unattended_reboot_time: "04:30"
|
unattended_reboot_time: "04:30"
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
install_aide: true
|
||||||
|
aide_exclude: []
|
||||||
|
_default_aide_exclude:
|
||||||
|
- "!/var/lib/docker"
|
||||||
|
- "!/var/lib/lxcfs"
|
||||||
|
- "!/var/lib/private/systemd"
|
||||||
|
- "!/var/log/audit"
|
||||||
|
- "!/var/log/journal"
|
||||||
|
|
||||||
|
_aide_exclude: "{{ _default_aide_exclude + aide_exclude }}"
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
---
|
---
|
||||||
install_aide: false
|
|
||||||
reboot_ubuntu: false
|
reboot_ubuntu: false
|
||||||
redhat_signing_keys:
|
redhat_signing_keys:
|
||||||
- 567E347AD0044ADE55BA8A5F199E2F91FD431D51
|
- 567E347AD0044ADE55BA8A5F199E2F91FD431D51
|
||||||
|
|||||||
@@ -69,11 +69,9 @@
|
|||||||
backup: true
|
backup: true
|
||||||
insertafter: EOF
|
insertafter: EOF
|
||||||
block: |
|
block: |
|
||||||
!/var/lib/docker
|
{% for exclude in _aide_exclude %}
|
||||||
!/var/lib/lxcfs
|
{{ exclude }}
|
||||||
!/var/lib/private/systemd
|
{% endfor %}
|
||||||
!/var/log/audit
|
|
||||||
!/var/log/journal
|
|
||||||
when: ansible_os_family == "Debian"
|
when: ansible_os_family == "Debian"
|
||||||
tags:
|
tags:
|
||||||
- aide
|
- aide
|
||||||
|
|||||||
@@ -221,6 +221,13 @@
|
|||||||
tags:
|
tags:
|
||||||
- roles::cis::extras
|
- roles::cis::extras
|
||||||
|
|
||||||
|
- name: Configure aide
|
||||||
|
ansible.builtin.include_tasks: aide.yml
|
||||||
|
when: install_aide
|
||||||
|
tags:
|
||||||
|
- roles::cis::aide
|
||||||
|
|
||||||
|
|
||||||
- name: Miscellaneous tasks after all handlers
|
- name: Miscellaneous tasks after all handlers
|
||||||
ansible.builtin.include_tasks: post.yml
|
ansible.builtin.include_tasks: post.yml
|
||||||
tags:
|
tags:
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ resource "kubernetes_deployment" "chronograf" {
|
|||||||
volume {
|
volume {
|
||||||
name = "persistent-storage"
|
name = "persistent-storage"
|
||||||
host_path {
|
host_path {
|
||||||
path = "/mnt/microk8s_persistent/chronograf.data"
|
path = "${local.persistent_folder}/chronograf.data"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
volume {
|
volume {
|
||||||
|
|||||||
@@ -44,6 +44,9 @@ locals {
|
|||||||
# notification
|
# notification
|
||||||
scaleway_smtp_host = "smtp.tem.scw.cloud"
|
scaleway_smtp_host = "smtp.tem.scw.cloud"
|
||||||
scaleway_smtp_port = 587
|
scaleway_smtp_port = 587
|
||||||
|
|
||||||
|
# storage
|
||||||
|
persistent_folder = "/mnt/microk8s_persistent"
|
||||||
}
|
}
|
||||||
|
|
||||||
data "scaleway_account_project" "default" {
|
data "scaleway_account_project" "default" {
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ locals {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gitea_path = "/mnt/microk8s_persistent/gitea"
|
gitea_path = "${local.persistent_folder}/gitea"
|
||||||
gitea_mysql_path = "/mnt/microk8s_persistent/mysql.gitea"
|
gitea_mysql_path = "${local.persistent_folder}/mysql.gitea"
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -108,8 +108,9 @@ module "gitea_backup" {
|
|||||||
secret_key = scaleway_iam_api_key.backup_app_api.secret_key
|
secret_key = scaleway_iam_api_key.backup_app_api.secret_key
|
||||||
bucket_name = scaleway_object_bucket.backup.name
|
bucket_name = scaleway_object_bucket.backup.name
|
||||||
|
|
||||||
retention_days = local.local_backup_retention_days
|
retention_days = local.local_backup_retention_days
|
||||||
cron_schedule = local.gitea_files_backup_cron_schedule
|
cron_schedule = local.gitea_files_backup_cron_schedule
|
||||||
|
host_storage_path = local.persistent_folder
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
locals {
|
locals {
|
||||||
m3uproxy_path = "/mnt/microk8s_persistent/m3uproxy"
|
m3uproxy_path = "${local.persistent_folder}/m3uproxy"
|
||||||
m3uproxy_cache_path = "${local.m3uproxy_path}/cache"
|
m3uproxy_cache_path = "${local.m3uproxy_path}/cache"
|
||||||
squid_app_path = "${local.m3uproxy_path}/squid"
|
squid_app_path = "${local.m3uproxy_path}/squid"
|
||||||
geoip_path = "${local.m3uproxy_path}/geoip"
|
geoip_path = "${local.m3uproxy_path}/geoip"
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ variable "app_password" {
|
|||||||
|
|
||||||
variable "host_storage_path" {
|
variable "host_storage_path" {
|
||||||
description = "host storage path"
|
description = "host storage path"
|
||||||
default = "/srv"
|
|
||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ variable "cron_schedule" {
|
|||||||
|
|
||||||
variable "host_storage_path" {
|
variable "host_storage_path" {
|
||||||
description = "Host path"
|
description = "Host path"
|
||||||
default = "/var/lib"
|
|
||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -74,8 +74,8 @@ locals {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nextcloud_path = "/mnt/microk8s_persistent/nextcloud"
|
nextcloud_path = "${local.persistent_folder}/nextcloud"
|
||||||
nextcloud_mysql_path = "/mnt/microk8s_persistent/mysql.nextcloud"
|
nextcloud_mysql_path = "${local.persistent_folder}/mysql.nextcloud"
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -170,8 +170,9 @@ module "nextcloud_backup" {
|
|||||||
secret_key = scaleway_iam_api_key.backup_app_api.secret_key
|
secret_key = scaleway_iam_api_key.backup_app_api.secret_key
|
||||||
bucket_name = scaleway_object_bucket.backup.name
|
bucket_name = scaleway_object_bucket.backup.name
|
||||||
|
|
||||||
retention_days = local.local_backup_retention_days
|
retention_days = local.local_backup_retention_days
|
||||||
cron_schedule = local.nextcloud_files_backup_cron_schedule
|
cron_schedule = local.nextcloud_files_backup_cron_schedule
|
||||||
|
host_storage_path = local.persistent_folder
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
locals {
|
locals {
|
||||||
wordpress_path = "/mnt/microk8s_persistent/wordpress"
|
wordpress_path = "${local.persistent_folder}/wordpress"
|
||||||
wordpress_mysql_path = "/mnt/microk8s_persistent/mysql.wordpress"
|
wordpress_mysql_path = "${local.persistent_folder}/mysql.wordpress"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "kubernetes_namespace" "wordpress" {
|
resource "kubernetes_namespace" "wordpress" {
|
||||||
@@ -54,8 +54,9 @@ module "wordpress_backup" {
|
|||||||
secret_key = scaleway_iam_api_key.backup_app_api.secret_key
|
secret_key = scaleway_iam_api_key.backup_app_api.secret_key
|
||||||
bucket_name = scaleway_object_bucket.backup.name
|
bucket_name = scaleway_object_bucket.backup.name
|
||||||
|
|
||||||
retention_days = local.local_backup_retention_days
|
retention_days = local.local_backup_retention_days
|
||||||
cron_schedule = local.wordpress_files_backup_cron_schedule
|
cron_schedule = local.wordpress_files_backup_cron_schedule
|
||||||
|
host_storage_path = local.persistent_folder
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user