Added all files

This commit is contained in:
2025-05-30 09:53:45 +02:00
commit e1e343667a
885 changed files with 22353 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
---
- hosts: control
become: true
tasks:
- name: install tools
apt: name={{item}} state=present update_cache=yes
with_items:
- uacme

View File

@@ -0,0 +1,9 @@
---
- hosts: database
become: true
tasks:
- name: install mysql-server
apt: name=mysql-server state=present update_cache=yes
- name: ensure mysql started
service: name=mysql state=started enabled=yes

View File

@@ -0,0 +1,9 @@
---
- hosts: loadbalancer
become: true
tasks:
- name: install nginx
apt: name=nginx state=present update_cache=yes
- name: ensure nginx started
service: name=nginx state=started enabled=yes

View File

@@ -0,0 +1,5 @@
---
- hosts: all
tasks:
- name: get server hostname
command: hostname

View File

@@ -0,0 +1,18 @@
---
- hosts: database
become: true
tasks:
- name: reiniciar mysql
service: name=mysql state=restarted
- hosts: loadbalancer
become: true
tasks:
- name: reiniciar nginx
service: name=nginx state=restarted
- hosts: webserver
become: true
tasks:
- name: reiniciar apache
service: name=apache2 state=restarted

View File

@@ -0,0 +1,17 @@
---
- hosts: database
become: true
tasks:
- name: reiniciar mysql
service: name=mysql state=restarted
- hosts: loadbalancer
become: true
tasks:
- name: reiniciar nginx
service: name=nginx state=restarted
- hosts: webserver
become: true
tasks:
service: name=apache2 state=restarted

View File

@@ -0,0 +1,18 @@
---
- hosts: database
become: true
tasks:
- name: parar mysql
service: name=mysql state=stopped
- hosts: loadbalancer
become: true
tasks:
- name: parar nginx
service: name=nginx state=stopped
- hosts: webserver
become: true
tasks:
- name: parar apache
service: name=apache2 state=stopped

View File

@@ -0,0 +1,14 @@
---
- hosts: webserver
become: true
tasks:
- name: install web components
apt: name={{item}} state=present update_cache=yes
with_items:
- apache2
- libapache2-mod-wsgi-py3
- python-pip-whl
- python3-virtualenv
- name: ensure apache2 started
service: name=apache2 state=started enabled=yes