Commit 7db16f43 authored by Andre Blanke's avatar Andre Blanke
Browse files

Add basic Ansible playbooks

parent 4286e255
......@@ -5,5 +5,5 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[Vagrantfile]
[{*.yml,Vagrantfile}]
indent_size = 2
# IntelliJ IDEA/PyCharm project files
.idea/
.vagrant/
# Project structure
```text
├─ ansible/ # Contains Ansible playbooks used by Vagrant
│ ├─ load_balancer.yml
│ └─ worker.yml
├─ frontend/ # Angular frontend, not yet set up
├─ shortener/ # Django backend
│ ├─ shortener/
......@@ -9,6 +12,7 @@
│ │ ├─ urls.py
│ │ └─ wsgi.py
│ └─ manage.py
├─ ansible.cfg
├─ README.md
├─ requirements.txt # Required Python packages
└─ Vagrantfile # Virtual machine configurations
......
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/focal64"
config.vm.provision :ansible_local do |ansible|
ansible.playbook = "ansible/worker.yml"
# https://github.com/ansible/ansible/issues/68645
ansible.install_mode = "pip"
end
config.vm.define "load_balancer" do |load_balancer|
load_balancer.vm.provision :ansible_local do |ansible|
ansible.playbook = "ansible/load_balancer.yml"
end
end
config.vm.define "worker0"
end
[defaults]
deprecation_warnings = False
---
- hosts: all
tasks:
- name: Update APT package repositories
become: yes
apt:
update_cache: yes
- name: Install HAProxy
become: yes
apt:
name: haproxy
---
- hosts: all
tasks:
- name: Update APT package repositories
become: yes
apt:
update_cache: yes
- name: Install Apache HTTP Server
become: yes
apt:
name: apache2
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment