Compare commits
2 Commits
fba9f43f5c
...
7592cf73e9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7592cf73e9 | ||
|
|
377a1eda2b |
@@ -25,7 +25,7 @@ make role test ubuntu20
|
||||
### ubuntu22.yml
|
||||
**Описание:** Пресет для Ubuntu 22.04 LTS
|
||||
**Хосты:** 3 хоста (web, db, app)
|
||||
**Порты:** 8022-8024
|
||||
**Порты:** 8220-8222
|
||||
**Использование:**
|
||||
```bash
|
||||
make role test ubuntu22
|
||||
@@ -34,7 +34,7 @@ make role test ubuntu22
|
||||
### ubuntu24.yml
|
||||
**Описание:** Пресет для Ubuntu 24.04 LTS
|
||||
**Хосты:** 3 хоста (web, db, app)
|
||||
**Порты:** 8024-8026
|
||||
**Порты:** 8240-8242
|
||||
**Использование:**
|
||||
```bash
|
||||
make role test ubuntu24
|
||||
@@ -54,7 +54,7 @@ make role test debian-all
|
||||
### debian9.yml
|
||||
**Описание:** Пресет для Debian 9 Stretch
|
||||
**Хосты:** 3 хоста (web, db, app)
|
||||
**Порты:** 9009-9011
|
||||
**Порты:** 9090-9092
|
||||
**Использование:**
|
||||
```bash
|
||||
make role test debian9
|
||||
@@ -63,7 +63,7 @@ make role test debian9
|
||||
### debian10.yml
|
||||
**Описание:** Пресет для Debian 10 Buster
|
||||
**Хосты:** 3 хоста (web, db, app)
|
||||
**Порты:** 9012-9014
|
||||
**Порты:** 9100-9102
|
||||
**Использование:**
|
||||
```bash
|
||||
make role test debian10
|
||||
@@ -72,7 +72,7 @@ make role test debian10
|
||||
### debian11.yml
|
||||
**Описание:** Пресет для Debian 11 Bullseye
|
||||
**Хосты:** 3 хоста (web, db, app)
|
||||
**Порты:** 9015-9017
|
||||
**Порты:** 9110-9112
|
||||
**Использование:**
|
||||
```bash
|
||||
make role test debian11
|
||||
@@ -81,7 +81,7 @@ make role test debian11
|
||||
### debian12.yml
|
||||
**Описание:** Пресет для Debian 12 Bookworm
|
||||
**Хосты:** 3 хоста (web, db, app)
|
||||
**Порты:** 9018-9020
|
||||
**Порты:** 9120-9122
|
||||
**Использование:**
|
||||
```bash
|
||||
make role test debian12
|
||||
@@ -101,7 +101,7 @@ make role test centos-all
|
||||
### centos7.yml
|
||||
**Описание:** Пресет для CentOS 7
|
||||
**Хосты:** 3 хоста (web, db, app)
|
||||
**Порты:** 7007-7009
|
||||
**Порты:** 7070-7072
|
||||
**Использование:**
|
||||
```bash
|
||||
make role test centos7
|
||||
@@ -110,7 +110,7 @@ make role test centos7
|
||||
### centos8.yml
|
||||
**Описание:** Пресет для CentOS 8
|
||||
**Хосты:** 3 хоста (web, db, app)
|
||||
**Порты:** 7010-7012
|
||||
**Порты:** 7080-7082
|
||||
**Использование:**
|
||||
```bash
|
||||
make role test centos8
|
||||
@@ -119,7 +119,7 @@ make role test centos8
|
||||
### centos9.yml
|
||||
**Описание:** Пресет для CentOS 9 Stream
|
||||
**Хосты:** 3 хоста (web, db, app)
|
||||
**Порты:** 7013-7015
|
||||
**Порты:** 7090-7092
|
||||
**Использование:**
|
||||
```bash
|
||||
make role test centos9
|
||||
@@ -133,15 +133,15 @@ make role test centos9
|
||||
| debian-all | Debian | 9, 10, 11, 12 | 8 | 9009-9016 | Тестирование всех версий Debian |
|
||||
| centos-all | CentOS | 7, 8, 9 | 6 | 7007-7012 | Тестирование всех версий CentOS |
|
||||
| ubuntu20 | Ubuntu | 20.04 | 3 | 8020-8022 | Тестирование Ubuntu 20.04 |
|
||||
| ubuntu22 | Ubuntu | 22.04 | 3 | 8022-8024 | Тестирование Ubuntu 22.04 |
|
||||
| ubuntu24 | Ubuntu | 24.04 | 3 | 8024-8026 | Тестирование Ubuntu 24.04 |
|
||||
| debian9 | Debian | 9 | 3 | 9009-9011 | Тестирование Debian 9 |
|
||||
| debian10 | Debian | 10 | 3 | 9012-9014 | Тестирование Debian 10 |
|
||||
| debian11 | Debian | 11 | 3 | 9015-9017 | Тестирование Debian 11 |
|
||||
| debian12 | Debian | 12 | 3 | 9018-9020 | Тестирование Debian 12 |
|
||||
| centos7 | CentOS | 7 | 3 | 7007-7009 | Тестирование CentOS 7 |
|
||||
| centos8 | CentOS | 8 | 3 | 7010-7012 | Тестирование CentOS 8 |
|
||||
| centos9 | CentOS | 9 | 3 | 7013-7015 | Тестирование CentOS 9 |
|
||||
| ubuntu22 | Ubuntu | 22.04 | 3 | 8220-8222 | Тестирование Ubuntu 22.04 |
|
||||
| ubuntu24 | Ubuntu | 24.04 | 3 | 8240-8242 | Тестирование Ubuntu 24.04 |
|
||||
| debian9 | Debian | 9 | 3 | 9090-9092 | Тестирование Debian 9 |
|
||||
| debian10 | Debian | 10 | 3 | 9100-9102 | Тестирование Debian 10 |
|
||||
| debian11 | Debian | 11 | 3 | 9110-9112 | Тестирование Debian 11 |
|
||||
| debian12 | Debian | 12 | 3 | 9120-9122 | Тестирование Debian 12 |
|
||||
| centos7 | CentOS | 7 | 3 | 7070-7072 | Тестирование CentOS 7 |
|
||||
| centos8 | CentOS | 8 | 3 | 7080-7082 | Тестирование CentOS 8 |
|
||||
| centos9 | CentOS | 9 | 3 | 7090-7092 | Тестирование CentOS 9 |
|
||||
|
||||
## 🎯 Рекомендации по использованию
|
||||
|
||||
@@ -160,8 +160,24 @@ make role test centos9
|
||||
## 🔧 Настройка портов
|
||||
|
||||
Все пресеты используют уникальные диапазоны портов:
|
||||
- **Ubuntu:** 8020-8026
|
||||
- **Debian:** 9009-9020
|
||||
- **CentOS:** 7007-7015
|
||||
|
||||
### Ubuntu пресеты:
|
||||
- **ubuntu-all:** 8020-8025 (все версии)
|
||||
- **ubuntu20:** 8020-8022
|
||||
- **ubuntu22:** 8220-8222
|
||||
- **ubuntu24:** 8240-8242
|
||||
|
||||
### Debian пресеты:
|
||||
- **debian-all:** 9009-9016 (все версии)
|
||||
- **debian9:** 9090-9092
|
||||
- **debian10:** 9100-9102
|
||||
- **debian11:** 9110-9112
|
||||
- **debian12:** 9120-9122
|
||||
|
||||
### CentOS пресеты:
|
||||
- **centos-all:** 7007-7012 (все версии)
|
||||
- **centos7:** 7070-7072
|
||||
- **centos8:** 7080-7082
|
||||
- **centos9:** 7090-7092
|
||||
|
||||
Это позволяет запускать несколько пресетов одновременно без конфликтов портов.
|
||||
|
||||
@@ -65,65 +65,65 @@
|
||||
- setup
|
||||
- update
|
||||
|
||||
# Установка common tools для всех ОС
|
||||
- name: Install common tools (Debian/Ubuntu)
|
||||
apt:
|
||||
name:
|
||||
- curl
|
||||
- jq
|
||||
- ca-certificates
|
||||
- iproute2
|
||||
- iputils-ping
|
||||
- procps
|
||||
- net-tools
|
||||
- vim
|
||||
- wget
|
||||
- unzip
|
||||
- git
|
||||
state: present
|
||||
update_cache: false
|
||||
when: ansible_os_family == 'Debian'
|
||||
tags:
|
||||
- setup
|
||||
- tools
|
||||
# Установка common tools для всех ОС (ЗАКОММЕНТИРОВАНО)
|
||||
# - name: Install common tools (Debian/Ubuntu)
|
||||
# apt:
|
||||
# name:
|
||||
# - curl
|
||||
# - jq
|
||||
# - ca-certificates
|
||||
# - iproute2
|
||||
# - iputils-ping
|
||||
# - procps
|
||||
# - net-tools
|
||||
# - vim
|
||||
# - wget
|
||||
# - unzip
|
||||
# - git
|
||||
# state: present
|
||||
# update_cache: false
|
||||
# when: ansible_os_family == 'Debian'
|
||||
# tags:
|
||||
# - setup
|
||||
# - tools
|
||||
|
||||
- name: Install common tools (RHEL/CentOS/AlmaLinux/Rocky)
|
||||
yum:
|
||||
name:
|
||||
- curl
|
||||
- jq
|
||||
- ca-certificates
|
||||
- iproute
|
||||
- iputils
|
||||
- procps-ng
|
||||
- net-tools
|
||||
- vim
|
||||
- wget
|
||||
- unzip
|
||||
- git
|
||||
state: present
|
||||
when: ansible_os_family == 'RedHat'
|
||||
tags:
|
||||
- setup
|
||||
- tools
|
||||
# - name: Install common tools (RHEL/CentOS/AlmaLinux/Rocky)
|
||||
# yum:
|
||||
# name:
|
||||
# - curl
|
||||
# - jq
|
||||
# - ca-certificates
|
||||
# - iproute
|
||||
# - iputils
|
||||
# - procps-ng
|
||||
# - net-tools
|
||||
# - vim
|
||||
# - wget
|
||||
# - unzip
|
||||
# - git
|
||||
# state: present
|
||||
# when: ansible_os_family == 'RedHat'
|
||||
# tags:
|
||||
# - setup
|
||||
# - tools
|
||||
|
||||
- name: Install common tools (Alt Linux)
|
||||
command: apt-get install -y curl jq ca-certificates iproute2 iputils procps net-tools vim wget unzip git
|
||||
when: ansible_os_family == 'Altlinux'
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
tags:
|
||||
- setup
|
||||
- tools
|
||||
# - name: Install common tools (Alt Linux)
|
||||
# command: apt-get install -y curl jq ca-certificates iproute2 iputils procps net-tools vim wget unzip git
|
||||
# when: ansible_os_family == 'Altlinux'
|
||||
# changed_when: false
|
||||
# failed_when: false
|
||||
# tags:
|
||||
# - setup
|
||||
# - tools
|
||||
|
||||
- name: Install common tools (Astra Linux)
|
||||
command: apt-get install -y curl jq ca-certificates iproute2 iputils procps net-tools vim wget unzip git
|
||||
when: ansible_os_family == 'Astra Linux'
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
tags:
|
||||
- setup
|
||||
- tools
|
||||
# - name: Install common tools (Astra Linux)
|
||||
# command: apt-get install -y curl jq ca-certificates iproute2 iputils procps net-tools vim wget unzip git
|
||||
# when: ansible_os_family == 'Astra Linux'
|
||||
# changed_when: false
|
||||
# failed_when: false
|
||||
# tags:
|
||||
# - setup
|
||||
# - tools
|
||||
|
||||
# Установка Python для Ansible (если не установлен)
|
||||
- name: Install Python (Debian/Ubuntu)
|
||||
@@ -179,38 +179,38 @@
|
||||
- setup
|
||||
- python
|
||||
|
||||
# Создание пользователя для тестирования
|
||||
- name: Create test user
|
||||
user:
|
||||
name: testuser
|
||||
shell: /bin/bash
|
||||
create_home: yes
|
||||
state: present
|
||||
tags:
|
||||
- setup
|
||||
- user
|
||||
# Создание пользователя для тестирования (ЗАКОММЕНТИРОВАНО)
|
||||
# - name: Create test user
|
||||
# user:
|
||||
# name: testuser
|
||||
# shell: /bin/bash
|
||||
# create_home: yes
|
||||
# state: present
|
||||
# tags:
|
||||
# - setup
|
||||
# - user
|
||||
|
||||
# Настройка sudo для тестового пользователя
|
||||
- name: Configure sudo for test user
|
||||
lineinfile:
|
||||
path: /etc/sudoers
|
||||
line: "testuser ALL=(ALL) NOPASSWD:ALL"
|
||||
state: present
|
||||
validate: 'visudo -cf %s'
|
||||
tags:
|
||||
- setup
|
||||
- sudo
|
||||
# Настройка sudo для тестового пользователя (ЗАКОММЕНТИРОВАНО)
|
||||
# - name: Configure sudo for test user
|
||||
# lineinfile:
|
||||
# path: /etc/sudoers
|
||||
# line: "testuser ALL=(ALL) NOPASSWD:ALL"
|
||||
# state: present
|
||||
# validate: 'visudo -cf %s'
|
||||
# tags:
|
||||
# - setup
|
||||
# - sudo
|
||||
|
||||
# Создание директории для тестов
|
||||
- name: Create test directory
|
||||
file:
|
||||
path: /tmp/ansible-test
|
||||
state: directory
|
||||
mode: '0755'
|
||||
owner: testuser
|
||||
group: testuser
|
||||
tags:
|
||||
- setup
|
||||
- directory
|
||||
# Создание директории для тестов (ЗАКОММЕНТИРОВАНО)
|
||||
# - name: Create test directory
|
||||
# file:
|
||||
# path: /tmp/ansible-test
|
||||
# state: directory
|
||||
# mode: '0755'
|
||||
# owner: testuser
|
||||
# group: testuser
|
||||
# tags:
|
||||
# - setup
|
||||
# - directory
|
||||
|
||||
- import_playbook: ../../roles/deploy.yml
|
||||
|
||||
@@ -23,12 +23,12 @@ hosts:
|
||||
- name: centos7-web
|
||||
family: centos7
|
||||
groups: [centos, test, web]
|
||||
publish: ["7007:80"]
|
||||
publish: ["7070:80"]
|
||||
- name: centos7-db
|
||||
family: centos7
|
||||
groups: [centos, test, db]
|
||||
publish: ["7008:80"]
|
||||
publish: ["7071:80"]
|
||||
- name: centos7-app
|
||||
family: centos7
|
||||
groups: [centos, test, app]
|
||||
publish: ["7009:80"]
|
||||
publish: ["7072:80"]
|
||||
|
||||
@@ -23,12 +23,12 @@ hosts:
|
||||
- name: centos8-web
|
||||
family: centos8
|
||||
groups: [centos, test, web]
|
||||
publish: ["7010:80"]
|
||||
publish: ["7080:80"]
|
||||
- name: centos8-db
|
||||
family: centos8
|
||||
groups: [centos, test, db]
|
||||
publish: ["7011:80"]
|
||||
publish: ["7081:80"]
|
||||
- name: centos8-app
|
||||
family: centos8
|
||||
groups: [centos, test, app]
|
||||
publish: ["7012:80"]
|
||||
publish: ["7082:80"]
|
||||
|
||||
@@ -23,12 +23,12 @@ hosts:
|
||||
- name: centos9-web
|
||||
family: centos9
|
||||
groups: [centos, test, web]
|
||||
publish: ["7013:80"]
|
||||
publish: ["7090:80"]
|
||||
- name: centos9-db
|
||||
family: centos9
|
||||
groups: [centos, test, db]
|
||||
publish: ["7014:80"]
|
||||
publish: ["7091:80"]
|
||||
- name: centos9-app
|
||||
family: centos9
|
||||
groups: [centos, test, app]
|
||||
publish: ["7015:80"]
|
||||
publish: ["7092:80"]
|
||||
|
||||
@@ -23,12 +23,12 @@ hosts:
|
||||
- name: debian10-web
|
||||
family: debian10
|
||||
groups: [debian, test, web]
|
||||
publish: ["9012:80"]
|
||||
publish: ["9100:80"]
|
||||
- name: debian10-db
|
||||
family: debian10
|
||||
groups: [debian, test, db]
|
||||
publish: ["9013:80"]
|
||||
publish: ["9101:80"]
|
||||
- name: debian10-app
|
||||
family: debian10
|
||||
groups: [debian, test, app]
|
||||
publish: ["9014:80"]
|
||||
publish: ["9102:80"]
|
||||
|
||||
@@ -23,12 +23,12 @@ hosts:
|
||||
- name: debian11-web
|
||||
family: debian11
|
||||
groups: [debian, test, web]
|
||||
publish: ["9015:80"]
|
||||
publish: ["9110:80"]
|
||||
- name: debian11-db
|
||||
family: debian11
|
||||
groups: [debian, test, db]
|
||||
publish: ["9016:80"]
|
||||
publish: ["9111:80"]
|
||||
- name: debian11-app
|
||||
family: debian11
|
||||
groups: [debian, test, app]
|
||||
publish: ["9017:80"]
|
||||
publish: ["9112:80"]
|
||||
|
||||
@@ -23,12 +23,12 @@ hosts:
|
||||
- name: debian12-web
|
||||
family: debian12
|
||||
groups: [debian, test, web]
|
||||
publish: ["9018:80"]
|
||||
publish: ["9120:80"]
|
||||
- name: debian12-db
|
||||
family: debian12
|
||||
groups: [debian, test, db]
|
||||
publish: ["9019:80"]
|
||||
publish: ["9121:80"]
|
||||
- name: debian12-app
|
||||
family: debian12
|
||||
groups: [debian, test, app]
|
||||
publish: ["9020:80"]
|
||||
publish: ["9122:80"]
|
||||
|
||||
@@ -23,12 +23,12 @@ hosts:
|
||||
- name: debian9-web
|
||||
family: debian9
|
||||
groups: [debian, test, web]
|
||||
publish: ["9009:80"]
|
||||
publish: ["9090:80"]
|
||||
- name: debian9-db
|
||||
family: debian9
|
||||
groups: [debian, test, db]
|
||||
publish: ["9010:80"]
|
||||
publish: ["9091:80"]
|
||||
- name: debian9-app
|
||||
family: debian9
|
||||
groups: [debian, test, app]
|
||||
publish: ["9011:80"]
|
||||
publish: ["9092:80"]
|
||||
|
||||
@@ -23,12 +23,12 @@ hosts:
|
||||
- name: ubuntu22-web
|
||||
family: ubuntu22
|
||||
groups: [ubuntu, test, web]
|
||||
publish: ["8022:80"]
|
||||
publish: ["8220:80"]
|
||||
- name: ubuntu22-db
|
||||
family: ubuntu22
|
||||
groups: [ubuntu, test, db]
|
||||
publish: ["8023:80"]
|
||||
publish: ["8221:80"]
|
||||
- name: ubuntu22-app
|
||||
family: ubuntu22
|
||||
groups: [ubuntu, test, app]
|
||||
publish: ["8024:80"]
|
||||
publish: ["8222:80"]
|
||||
|
||||
@@ -23,12 +23,12 @@ hosts:
|
||||
- name: ubuntu24-web
|
||||
family: ubuntu24
|
||||
groups: [ubuntu, test, web]
|
||||
publish: ["8024:80"]
|
||||
publish: ["8240:80"]
|
||||
- name: ubuntu24-db
|
||||
family: ubuntu24
|
||||
groups: [ubuntu, test, db]
|
||||
publish: ["8025:80"]
|
||||
publish: ["8241:80"]
|
||||
- name: ubuntu24-app
|
||||
family: ubuntu24
|
||||
groups: [ubuntu, test, app]
|
||||
publish: ["8026:80"]
|
||||
publish: ["8242:80"]
|
||||
|
||||
Reference in New Issue
Block a user