Grundstuktur erstellt.
This commit is contained in:
commit
db6f5ac31a
15 changed files with 67 additions and 0 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
ansible.log
|
||||||
|
ansible.cfg
|
||||||
|
.vaultpass
|
||||||
24
ansible.cfg.dist
Normal file
24
ansible.cfg.dist
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
[defaults]
|
||||||
|
|
||||||
|
inventory = ./inventory/demo/
|
||||||
|
roles_path = ./roles
|
||||||
|
collections_path = ./collections
|
||||||
|
|
||||||
|
log_path = ansible.log
|
||||||
|
|
||||||
|
|
||||||
|
# Create vault-file:
|
||||||
|
# read -s P
|
||||||
|
# printf "%s" "$P" > .vaultpass
|
||||||
|
#vault_password_file = ./.vaultpass
|
||||||
|
|
||||||
|
ansible_managed = Ansible managed: {file}
|
||||||
|
|
||||||
|
[inventory]
|
||||||
|
unparsed_is_failed = True
|
||||||
|
|
||||||
|
[ssh_connection]
|
||||||
|
pipelining = True
|
||||||
|
ssh_args = -o ControlMaster=auto -o ControlPersist=600s
|
||||||
|
timeout = 10
|
||||||
|
control_path = %(directory)s/%%h-%%r
|
||||||
0
collections/.gitkeep
Normal file
0
collections/.gitkeep
Normal file
3
inventory/demo/host_vars/server1.example.com.yml
Normal file
3
inventory/demo/host_vars/server1.example.com.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
ansible_host: 192.0.2.10
|
||||||
|
#ansible_user: ansible
|
||||||
3
inventory/demo/host_vars/server2.example.com.yml
Normal file
3
inventory/demo/host_vars/server2.example.com.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
ansible_host: 192.0.2.20
|
||||||
|
#ansible_user: ansible
|
||||||
3
inventory/demo/host_vars/server3.example.com.yml
Normal file
3
inventory/demo/host_vars/server3.example.com.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
ansible_host: 192.0.2.30
|
||||||
|
#ansible_user: ansible
|
||||||
7
inventory/demo/hosts
Normal file
7
inventory/demo/hosts
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
[loadbalancer]
|
||||||
|
server1.example.com
|
||||||
|
|
||||||
|
[webserver]
|
||||||
|
server2.example.com
|
||||||
|
server3.example.com
|
||||||
|
|
||||||
9
roles/haproxy/README.md
Normal file
9
roles/haproxy/README.md
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
# haproxy
|
||||||
|
|
||||||
|
## Aufgaben der Rolle
|
||||||
|
|
||||||
|
- Installation der haproxy-Software
|
||||||
|
- Konfigdatei aus Template erzeugen und auf Zielsystem speichern
|
||||||
|
- Systemd Service aktivieren und starten
|
||||||
|
- Wenn die Konfigdatei sich ändert, soll ein Restart des haproxy erfolgen
|
||||||
|
|
||||||
1
roles/haproxy/handlers/main.yml
Normal file
1
roles/haproxy/handlers/main.yml
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
---
|
||||||
1
roles/haproxy/tasks/main.yml
Normal file
1
roles/haproxy/tasks/main.yml
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
---
|
||||||
0
roles/haproxy/templates/.gitkeep
Normal file
0
roles/haproxy/templates/.gitkeep
Normal file
11
roles/nginx/README.md
Normal file
11
roles/nginx/README.md
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
# nginx
|
||||||
|
|
||||||
|
## Aufgaben der Rolle
|
||||||
|
|
||||||
|
- Installation von nginx
|
||||||
|
- Aktivieren und Starten des Services
|
||||||
|
- Konfigdatei aus Template erzeugen
|
||||||
|
- Verzeichnis für virtualhosts anlegen (vhosts.d)
|
||||||
|
- Wenn sich eine Konfigdatei ändert, soll nginx neu gestartet werden
|
||||||
|
|
||||||
|
|
||||||
1
roles/nginx/handlers/main.yml
Normal file
1
roles/nginx/handlers/main.yml
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
---
|
||||||
1
roles/nginx/tasks/main.yml
Normal file
1
roles/nginx/tasks/main.yml
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
---
|
||||||
0
roles/nginx/templates/.gitkeep
Normal file
0
roles/nginx/templates/.gitkeep
Normal file
Loading…
Add table
Add a link
Reference in a new issue