convert bookstack to wikmd and not using docker
This commit is contained in:
98
roles/ind/wikmd/wikmd-install.yml
Normal file
98
roles/ind/wikmd/wikmd-install.yml
Normal file
@@ -0,0 +1,98 @@
|
||||
---
|
||||
- hosts: all
|
||||
become: yes
|
||||
remote_user: ansible
|
||||
gather_facts: false
|
||||
|
||||
vars:
|
||||
docker_compose_definition: |
|
||||
services:
|
||||
bookstack:
|
||||
image: lscr.io/linuxserver/bookstack
|
||||
container_name: bookstack
|
||||
environment:
|
||||
- PUID=2000
|
||||
- PGID=996
|
||||
- TZ=America/Chicago
|
||||
- APP_URL=http://192.168.0.56:8080
|
||||
- DB_HOST=bookstack_db
|
||||
- DB_PORT=3306
|
||||
- DB_USER=bookstack
|
||||
- DB_PASS=Wp6DwHwFCAToFhEYDhcrMI3
|
||||
- DB_DATABASE=bookstackapp
|
||||
volumes:
|
||||
- /data/app:/config
|
||||
ports:
|
||||
- 8080:80
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- bookstack_db
|
||||
|
||||
bookstack_db:
|
||||
image: lscr.io/linuxserver/mariadb
|
||||
container_name: bookstack_db
|
||||
environment:
|
||||
- PUID=2000
|
||||
- PGID=996
|
||||
- TZ=America/Chicago
|
||||
- MYSQL_ROOT_PASSWORD=yNTUxOQAAACADSWp6DwHwFCA
|
||||
- MYSQL_DATABASE=bookstackapp
|
||||
- MYSQL_USER=bookstack
|
||||
- MYSQL_PASSWORD=Wp6DwHwFCAToFhEYDhcrMI3
|
||||
volumes:
|
||||
- /data/db:/config
|
||||
restart: unless-stopped
|
||||
|
||||
tasks:
|
||||
- name: Upgrade-packages.yml - update packages
|
||||
include: ../../lib/upgrade-packages.yml
|
||||
|
||||
- name: Install-docker.yml - setting up docker
|
||||
include: ../../lib/install-docker.yml
|
||||
|
||||
- name: Install Restic and setup
|
||||
include: ../../lib/setup-restic.yml
|
||||
|
||||
- name: Setup Restic Cron jobs
|
||||
include: ../../lib/setup-restic-cron.yml
|
||||
|
||||
- name: Create wikmd user
|
||||
user:
|
||||
name: wikmd
|
||||
uid: 2002
|
||||
group: users
|
||||
state: present
|
||||
create_home: yes
|
||||
home: /data
|
||||
shell: /bin/bash
|
||||
|
||||
- name: Install Python Packages
|
||||
apt:
|
||||
name:
|
||||
- python3-full
|
||||
- python3-pip
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
||||
- name: setup service
|
||||
- name: start server, should be afte restore below
|
||||
- name:
|
||||
# docker image is broken using manual install method
|
||||
#- name: Write docker-compose.yml
|
||||
# ansible.builtin.copy:
|
||||
# content: "{{ docker_compose_definition }}"
|
||||
# dest: /home/docker/docker-compose.yml
|
||||
# owner: docker
|
||||
# group: docker
|
||||
# mode: u=rw,g=r,o=r
|
||||
|
||||
#- name: Start services
|
||||
# community.docker.docker_compose_v2:
|
||||
# project_src: /home/docker/
|
||||
# register: output
|
||||
|
||||
- name: Restore Wikmd Dir
|
||||
command: restic --password-file ./.resticpassword -r sftp:misamisa://home/restic/$(hostname) --target /data/wikmd restore latest
|
||||
args:
|
||||
chdir: /home/restic
|
||||
creates: /data/wikmd
|
||||
Reference in New Issue
Block a user