Move from localhost to vagrant

This commit is contained in:
Lukáš Kucharczyk 2021-05-13 23:47:34 +02:00
parent 5986bdeed8
commit f458dc9229
No known key found for this signature in database
GPG Key ID: 65524498C0196B64
5 changed files with 45 additions and 4 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
docker-data/
docker-data/
.vagrant

18
Vagrantfile vendored Normal file
View File

@ -0,0 +1,18 @@
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "archlinux/archlinux"
# config.vm.network :forwarded_port, guest: 80, host: 80
# config.vm.network :forwarded_port, guest: 443, host: 443
config.vm.network "public_network", ip: "192.168.0.104", bridge: [ "enp0s31f6" ]
config.vm.provision :ansible do |ansible|
ansible.become = true
ansible.compatibility_mode = "2.0"
ansible.playbook = "playbook.yml"
ansible.raw_arguments = ["--extra-vars=ansible_python_interpreter=/usr/bin/python3"]
end
end

View File

@ -1,8 +1,8 @@
base_domain: "dev.local"
self_signed: false
admin_email: "lukas@kucharczyk.xyz"
server_ip: "192.168.0.107"
data_folder: "{{ playbook_dir }}/docker-data"
server_ip: "192.168.0.104"
data_folder: "/home/vagrant/docker-data"
nginx_confd_folder: "{{ data_folder }}/nginx/conf.d"
puid: "1000"
pgid: "1000"

View File

@ -1,5 +1,6 @@
---
- hosts: localhost
- hosts: all
roles:
- docker
- nginx
- jellyfin

View File

@ -0,0 +1,21 @@
- name: install docker and pip
pacman:
name:
- docker
- python-pip
state: present
update_cache: true
- name: start
service:
name: docker
state: started
- name: add user to group
user:
name: lukas
groups: docker
append: true
- name: install python docker
pip:
name:
- docker
state: present