mirror of
https://github.com/2martens/cloud-configuration.git
synced 2026-10-17 08:37:56 +02:00
Moved all hosts into one inventory and moved playbooks into setup playbook
This commit is contained in:
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
||||||
@@ -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
@@ -1,3 +1,2 @@
|
|||||||
---
|
---
|
||||||
- include: devops.yaml
|
- include: setup.yaml
|
||||||
- include: applications.yaml
|
|
||||||
|
|||||||
Reference in New Issue
Block a user