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,9 @@
---
- hosts: database
become: true
tasks:
- name: create demo database
mysql_db: name=demo state=absent
- name: create demo user
mysql_user: name=demo password=demo priv=demo.*:ALL host='%' state=absent

View File

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

View File

@@ -0,0 +1,28 @@
---
# Bring stack down
- hosts: loadbalancer
become: true
tasks:
- service: name=nginx state=stopped
- hosts: webserver
become: true
tasks:
- service: name=apache2 state=stopped
# Restart mysql - commented problem with the VMs
- hosts: database
become: true
tasks:
- service: name=mysql state=restarted
# Bring stack up
- hosts: webserver
become: true
tasks:
- service: name=apache2 state=started
- hosts: loadbalancer
become: true
tasks:
- service: name=nginx state=started