Обновление конфигурации Ansible: добавлены новые пресеты, улучшен Makefile, добавлена документация

This commit is contained in:
Сергей Антропов
2025-10-25 10:11:17 +03:00
parent c99df83bad
commit 60ee5e90a5
21 changed files with 1193 additions and 147 deletions

View File

@@ -1,5 +1,5 @@
---
# Минимальный пресет для быстрого тестирования
# Стандартный пресет по умолчанию для тестирования
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
@@ -9,6 +9,7 @@ generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы
images:
debian: "ghcr.io/ansible-community/molecule-ubuntu-systemd:jammy"
rhel: "quay.io/centos/centos:stream9-systemd"
systemd_defaults:
privileged: true
@@ -19,7 +20,10 @@ systemd_defaults:
capabilities: ["SYS_ADMIN"]
hosts:
# Минимальный набор - один хост
# Стандартный набор - 2 хоста для базового тестирования
- name: u1
family: debian
groups: [test]
groups: [test, web]
- name: u2
family: rhel
groups: [test, web]

View File

@@ -0,0 +1,38 @@
---
# Пресет для тестирования производительности
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы
images:
debian: "ghcr.io/ansible-community/molecule-ubuntu-systemd:jammy"
rhel: "quay.io/centos/centos:stream9-systemd"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:ro"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Нагрузочное тестирование - 5 хостов
- name: perf1
family: debian
groups: [test, performance]
- name: perf2
family: debian
groups: [test, performance]
- name: perf3
family: rhel
groups: [test, performance]
- name: perf4
family: rhel
groups: [test, performance]
- name: perf5
family: debian
groups: [test, performance]

View File

@@ -0,0 +1,32 @@
---
# Пресет для тестирования безопасности
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы
images:
debian: "ghcr.io/ansible-community/molecule-ubuntu-systemd:jammy"
rhel: "quay.io/centos/centos:stream9-systemd"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:ro"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Тестирование безопасности - 3 хоста с разными ОС
- name: sec1
family: debian
groups: [test, security, web]
- name: sec2
family: rhel
groups: [test, security, db]
- name: sec3
family: debian
groups: [test, security, api]

25
molecule/presets/test.yml Normal file
View File

@@ -0,0 +1,25 @@
---
# Минимальный пресет для быстрого тестирования
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы
images:
debian: "ghcr.io/ansible-community/molecule-ubuntu-systemd:jammy"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:ro"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Минимальный набор - один хост
- name: u1
family: debian
groups: [test]