Files
DevOpsLab/molecule/presets/security.yml
Сергей Антропов 24d229b026 Добавлены образы Ubuntu 22.04 и Debian для тестирования
- Созданы Dockerfile'ы для Ubuntu 22.04 и Debian:
  - dockerfiles/ubuntu/Dockerfile - Ubuntu 22.04 с systemd
  - dockerfiles/debian/Dockerfile - Debian bookworm с systemd
- Обновлен Makefile:
  - Добавлены ubuntu и debian в DOCKER_IMAGES
  - Добавлена поддержка в docker-get-base-tag
  - Обновлена справка с новыми образами
- Обновлены все пресеты для поддержки новых образов:
  - ubuntu: inecs/ansible-lab:ubuntu-latest
  - debian: inecs/ansible-lab:debian-latest
- Обновлен molecule.yml для поддержки новых образов
- Обновлен скрипт test-custom-images.sh для проверки новых образов
- Теперь поддерживается 10 собственных образов AnsibleTemplate

Автор: Сергей Антропов
Сайт: https://devops.org.ru
2025-10-25 15:56:30 +03:00

84 lines
2.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
#description: Пресет для тестирования безопасности с 10 хостами (bastion + internal + monitoring)
# Автор: Сергей Антропов
# Сайт: 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"
# Собственные образы AnsibleTemplate
alt: "inecs/ansible-lab:alt-linux-latest"
astra: "inecs/ansible-lab:astra-linux-latest"
rhel: "inecs/ansible-lab:rhel-latest"
centos: "inecs/ansible-lab:centos-latest"
alma: "inecs/ansible-lab:alma-latest"
rocky: "inecs/ansible-lab:rocky-latest"
redos: "inecs/ansible-lab:redos-latest"
ubuntu: "inecs/ansible-lab:ubuntu-latest"
debian: "inecs/ansible-lab:debian-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:ro"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
# Описание кластера для тестирования безопасности
hosts:
# Bastion хосты (точки входа)
- name: bastion1
family: rhel
groups: [bastion, security, jump]
publish: ["2222:22"]
- name: bastion2
family: debian
groups: [bastion, security, jump]
publish: ["2223:22"]
# Внутренние серверы (без внешнего доступа)
- name: internal1
family: rhel
groups: [internal, servers, app]
- name: internal2
family: debian
groups: [internal, servers, app]
- name: internal3
family: rhel
groups: [internal, servers, app]
# База данных (изолированная сеть)
- name: db-secure1
family: rhel
groups: [database, secure, internal]
- name: db-secure2
family: debian
groups: [database, secure, internal]
# Мониторинг и логирование
- name: monitor1
family: debian
groups: [monitoring, security, logs]
- name: monitor2
family: rhel
groups: [monitoring, security, logs]
# Firewall и сетевые компоненты
- name: fw1
family: rhel
groups: [firewall, network, security]
- name: fw2
family: debian
groups: [firewall, network, security]
# DOoD узел для тестирования Docker безопасности
- name: docker-secure
type: dood
family: debian
groups: [docker, security, apps]
publish: ["8080:8080"]
env:
DOCKER_HOST: "unix:///var/run/docker.sock"