Compare commits
3 Commits
ef3ae97f90
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 55591374b2 | |||
| eec112e28c | |||
| f648429d15 |
@@ -30,6 +30,10 @@ cloud_nginx_sites:
|
||||
port: 8087
|
||||
max_body: 2g # song uploads
|
||||
|
||||
stroopwafel_dir: /opt/stroopwafel
|
||||
stroopwafel_repo: gitea@git.hoekveen.net:mark/stroopwafel.git
|
||||
stroopwafel_version: master
|
||||
|
||||
backup_dump_dir: /var/backups/aurbis
|
||||
backup_paths:
|
||||
- /etc # nginx, certs, systemd units
|
||||
|
||||
@@ -1,15 +1,5 @@
|
||||
rpi:
|
||||
hosts:
|
||||
# azura:
|
||||
# ansible_host: 127.0.0.1
|
||||
# ansible_port: 3027
|
||||
# ansible_user: vagrant
|
||||
# ansible_ssh_private_key_file: .vagrant/machines/azura/libvirt/private_key
|
||||
# kynareth:
|
||||
# ansible_host: 127.0.0.1
|
||||
# ansible_port: 3028
|
||||
# ansible_user: vagrant
|
||||
# ansible_ssh_private_key_file: .vagrant/machines/kynareth/libvirt/private_key
|
||||
nocturnal:
|
||||
ansible_host: 127.0.0.1
|
||||
ansible_port: 3023
|
||||
@@ -24,7 +14,6 @@ x86:
|
||||
ansible_user: vagrant
|
||||
ansible_ssh_private_key_file: .vagrant/machines/talos/libvirt/private_key
|
||||
akatosh:
|
||||
# qemu test VM, see docs/migration-survey.md (cloud-init creates nerevar)
|
||||
ansible_host: 127.0.0.1
|
||||
ansible_port: 3029
|
||||
ansible_user: nerevar
|
||||
@@ -34,14 +23,8 @@ debian:
|
||||
talos:
|
||||
nocturnal:
|
||||
akatosh:
|
||||
# arch:
|
||||
# hosts:
|
||||
# azura:
|
||||
# kynareth:
|
||||
home:
|
||||
hosts:
|
||||
# azura:
|
||||
# kynareth:
|
||||
nocturnal:
|
||||
talos:
|
||||
cloud:
|
||||
|
||||
@@ -121,6 +121,7 @@
|
||||
- import_tasks: tasks/hdwiki.yml
|
||||
- import_tasks: tasks/gitea.yml
|
||||
- import_tasks: tasks/nightingale.yml
|
||||
- import_tasks: tasks/stroopwafel.yml
|
||||
- import_tasks: tasks/cloud_nginx.yml
|
||||
- name: Ensure the backup user can run the forced-command pull
|
||||
user:
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# Pulling needs to have git access; root does not.
|
||||
- name: Include stroopwafel vault
|
||||
include_vars:
|
||||
dir: stroopwafel
|
||||
files_matching: vault.yml
|
||||
- name: Create stroopwafel directory
|
||||
file:
|
||||
path: "{{ stroopwafel_dir }}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: "{{ service_group | default('aurbis') }}"
|
||||
mode: "0775"
|
||||
- name: Check out stroopwafel source
|
||||
ansible.builtin.git:
|
||||
repo: "{{ stroopwafel_repo }}"
|
||||
dest: "{{ stroopwafel_dir }}"
|
||||
version: "{{ stroopwafel_version }}"
|
||||
update: "{{ stroopwafel_update | default(false) }}"
|
||||
accept_hostkey: true
|
||||
force: false
|
||||
become_user: "{{ stroopwafel_git_user | default(omit) }}"
|
||||
- name: Deploy stroopwafel .env
|
||||
copy:
|
||||
content: "{{ stroopwafel_env_b64 | b64decode }}"
|
||||
dest: "{{ stroopwafel_dir }}/.env"
|
||||
owner: root
|
||||
group: "{{ service_group | default('aurbis') }}"
|
||||
mode: "0640"
|
||||
when: stroopwafel_env_b64 is defined
|
||||
no_log: true
|
||||
- name: Copy docker-compose file
|
||||
template:
|
||||
src: stroopwafel/docker-compose.yml.j2
|
||||
dest: "{{ stroopwafel_dir }}/docker-compose.yml"
|
||||
owner: root
|
||||
group: "{{ service_group | default('aurbis') }}"
|
||||
mode: "0664"
|
||||
- name: Start stroopwafel
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ stroopwafel_dir }}"
|
||||
build: policy
|
||||
@@ -0,0 +1,7 @@
|
||||
services:
|
||||
stroopwafel:
|
||||
build: .
|
||||
command: python Stroopwafel.py
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- .:/opt/stroopwafel
|
||||
+11
-3
@@ -5,17 +5,21 @@
|
||||
- zsh-syntax-highlighting
|
||||
- fzf
|
||||
state: present
|
||||
- name: Create .config/zsh directory
|
||||
- name: Create .config and .config/zsh directories
|
||||
file:
|
||||
path: "/home/{{ item }}/.config/zsh"
|
||||
path: "/home/{{ item.0 }}/{{ item.1 }}"
|
||||
state: directory
|
||||
owner: "{{ item.0 }}"
|
||||
group: "{{ item.0 }}"
|
||||
mode: "0755"
|
||||
loop: "{{ users }}"
|
||||
loop: "{{ users | product(['.config', '.config/zsh']) | list }}"
|
||||
when: users is defined
|
||||
- name: Copy .zshenv
|
||||
copy:
|
||||
src: zsh/.zshenv
|
||||
dest: "/home/{{ item }}/.zshenv"
|
||||
owner: "{{ item }}"
|
||||
group: "{{ item }}"
|
||||
mode: "0644"
|
||||
loop: "{{ users }}"
|
||||
when: users is defined
|
||||
@@ -23,6 +27,8 @@
|
||||
copy:
|
||||
src: zsh/.zshrc
|
||||
dest: "/home/{{ item }}/.config/zsh/.zshrc"
|
||||
owner: "{{ item }}"
|
||||
group: "{{ item }}"
|
||||
mode: "0644"
|
||||
loop: "{{ users }}"
|
||||
when: users is defined
|
||||
@@ -30,6 +36,8 @@
|
||||
copy:
|
||||
src: zsh/.aliasrc
|
||||
dest: "/home/{{ item }}/.config/zsh/.aliasrc"
|
||||
owner: "{{ item }}"
|
||||
group: "{{ item }}"
|
||||
mode: "0644"
|
||||
loop: "{{ users }}"
|
||||
when: users is defined
|
||||
|
||||
Reference in New Issue
Block a user