This commit is contained in:
Javier Feliz 2025-03-25 12:51:36 -04:00
parent 92d5357c2c
commit c838e19c84
7 changed files with 99 additions and 165 deletions

View File

@ -5,22 +5,16 @@ all:
hosts:
node1:
ansible_host: 10.89.0.13
node2:
ansible_host: 10.89.0.11
node3:
ansible_host: 10.89.0.12
nas:
ansible_host: 10.89.0.15
virtual_machines:
vms:
hosts:
portainer_main:
ansible_host: 10.89.0.101
prod_services:
ansible_host: 11.89.0.102
stash:
ansible_host: 10.89.0.103
plane_so:
ansible_host: 10.89.0.104
ansible_host: 10.89.0.102
dev_services:
ansible_host: 10.89.0.105
streaming_services:

View File

@ -100,7 +100,6 @@
args:
chdir: /home/javi/docker/arrstack
become: true
# - name: Restart just in case
# ansible.builtin.command: docker compose restart
# args:

View File

@ -1,10 +0,0 @@
---
- name: Distribute SSH public key to my hosts
hosts: all
become: true
tasks:
- name: Add SSH key for remote user
ansible.posix.authorized_key:
user: javi
state: present
key: "{{ lookup('file', '/home/javi/.ssh/homelab_keypair_ed25519.pub') }}"

View File

@ -1,6 +1,6 @@
---
- name: Set up a new virtual machine
hosts: all
hosts: vms
become: true
roles:
- role: docker/install

View File

@ -1,16 +0,0 @@
---
- name: Create standardized admin on all hosts
hosts: virtual_machines
become: true
vars:
username: serveradmin
password: "Cinnamonbun89$"
tasks:
- name: Create the standard user on the host
ansible.builtin.user:
name: "{{ username }}"
state: present
shell: /bin/bash
create_home: true
groups: sudo
append: true

View File

@ -1,39 +0,0 @@
---
- name: Set up wizarr
hosts: streaming_services
become: true
tasks:
- name: Create app DB
ansible.builtin.include_tasks:
file: '../tasks/create_app_db.yml'
vars:
app: wizarr
- name: Make sure UUID PG extension is installed
ansible.builtin.include_tasks:
file: '../tasks/postgres/install_extension.yml'
vars:
extension: uuid-ossp
database: wizarr
- name: Ensure config directories exist
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: '0777'
loop:
- '/home/docker/wizarr'
- '/home/javi/docker/wizarr'
- name: Copy docker-compose.yml to server
ansible.builtin.copy:
src: '../docker/wizarr/docker-compose.yml'
dest: '/home/javi/docker/wizarr/docker-compose.yml'
owner: javi
group: javi
mode: '0777'
- name: Start up the containers
ansible.builtin.command: docker compose up -d
args:
chdir: /home/javi/docker/wizarr

View File

@ -0,0 +1,6 @@
---
- name: Add SSH key for remote user
ansible.posix.authorized_key:
user: javi
state: present
key: "{{ lookup('file', '/home/javi/.ssh/homelab_keypair_ed25519.pub') }}"