Moved all hosts into one inventory and moved playbooks into setup playbook

This commit is contained in:
2023-08-17 20:39:12 +02:00
parent dc07d21320
commit 227f804457
8 changed files with 56 additions and 52 deletions
-20
View File
@@ -1,20 +0,0 @@
---
- name: Create server
hosts: setup
gather_facts: false
roles:
- server_setup
- name: Set up domain
hosts: frontend
gather_facts: false
remote_user: "{{ ssh_user }}"
roles:
- frontend
- name: Set up Spring Boot applications
hosts: springBoot
gather_facts: false
become: true
become_method: ansible.builtin.sudo
remote_user: "{{ ssh_user }}"
roles:
- spring_boot
-20
View File
@@ -1,20 +0,0 @@
---
- name: Create server
hosts: setup
gather_facts: false
roles:
- server_setup
- name: Set up drone
hosts: ci
gather_facts: false
become: true
become_method: ansible.builtin.sudo
remote_user: "{{ ssh_user }}"
roles:
- drone
- name: Set up Gitea
hosts: git
gather_facts: false
remote_user: "{{ ssh_user }}"
roles:
- gitea
-8
View File
@@ -1,8 +0,0 @@
[setup]
devops ansible_host=localhost ansible_connection=local ansible_python_interpreter=python3
[ci]
devops ansible_host=49.12.69.146 ansible_python_interpreter=python3
[git]
gitea ansible_host=giteajim.uber.space ansible_python_interpreter=/usr/bin/python
@@ -1,3 +1,3 @@
--- ---
server_name: devops server_name: production
server_type: cax21 server_type: cax21
@@ -1,8 +1,15 @@
[setup] [setup]
devops ansible_host=localhost ansible_connection=local ansible_python_interpreter=python3
applications ansible_host=localhost ansible_connection=local ansible_python_interpreter=python3 applications ansible_host=localhost ansible_connection=local ansible_python_interpreter=python3
[ci]
devops ansible_host=49.12.69.146 ansible_python_interpreter=python3
[git]
gitea ansible_host=giteajim.uber.space ansible_python_interpreter=/usr/bin/python
[frontend] [frontend]
wahlrecht-frontend ansible_host=wahlfron.uber.space ansible_python_interpreter=/usr/bin/python wahlrecht-frontend ansible_host=wahlfron.uber.space ansible_python_interpreter=/usr/bin/python
[springBoot] [applications]
api-server ansible_host=49.13.77.70 ansible_python_interpreter=python3 api-server ansible_host=49.13.77.70 ansible_python_interpreter=python3
+46
View File
@@ -0,0 +1,46 @@
---
- name: Create server
hosts: setup
gather_facts: false
serial: 1
roles:
- server_setup
- name: Set up frontend domains
hosts: frontend
gather_facts: false
remote_user: "{{ ssh_user }}"
roles:
- frontend
- name: Set up Drone
hosts: ci
gather_facts: false
become: true
become_method: ansible.builtin.sudo
remote_user: "{{ ssh_user }}"
roles:
- drone
- name: Set up Gitea
hosts: git
gather_facts: false
remote_user: "{{ ssh_user }}"
roles:
- gitea
- name: Set up application server
hosts: applications
gather_facts: false
become: true
become_method: ansible.builtin.sudo
remote_user: "{{ ssh_user }}"
roles:
- docker
- nginx
- letsencrypt
- kafka
- name: Set up Spring Boot applications
hosts: applications
gather_facts: false
become: true
become_method: ansible.builtin.sudo
remote_user: "{{ ssh_user }}"
roles:
- spring_boot
+1 -2
View File
@@ -1,3 +1,2 @@
--- ---
- include: devops.yaml - include: setup.yaml
- include: applications.yaml