James Tombleson
d14c2aaa2c
* docker tests are looking good and nfs is able to connect and containers can talk to each other. * Added pihole support for a new vm * pihole is not working yet via docker. Installed it by hand without ansible for now. * added some docker related tasks and working on collins now to see how to use it. * forgot to push some changes... kube didnt work out as it adds too much overhead for what I need. * added two roles to help working with backup and restore of docker volume data. * did some cleanup on old roles. * pushing for axw testing * moving to requirements.yml. adding cron jobs for maint. * roles are being moved out of this repo. Roles are handled by requirements.yml going forward. Dev roles are still in the repo but if they stick around a new repo will be made for it. * Made a bunch of changes * fixed a problem * Added a playbook to deploy grafana and added prometheus role to monitor things. * Updated cron to test * Updated cron to test * Updated cron * updated discord_webhook and now testing if cron will pick up the changes. * Fixed plex backup for now. * docker updates and working on nginx * pushing pending changes that need to go live for cron testing * fixed debug roles and updated discord test * fixed debug roles and updated discord test * Disabling test cron * its been awhile... I am not sure what I have done anymore but time to push my changes. * added newsbot configs, added to jenkins, starting to migrate to collections. * Updated inventory to support the network changes * jenkinsfile is now working in my local setup. * node2 is unhealthy and is removed from inv. I was doing something to this box months ago, but now i dont remember what it was." * updated images and adding them to jenkins for testing * removed the old image files and moved to my public image * Jenkins will now inform discord of jobs. Added post tasks. Added mediaserver common. * updated the backend update job and adding a jenkins pipeline to handle it for me. * updated the backup job again * Updated all the jekins jobs. Added a jenkins newsbot backup job. Adjusted newsbot plays to add backup and redeploy jobs. * updated newsbot backup playbook to make older backup files as needed. * Added debug message to report in CI what version is getting deployed. * I did something stupid and this device is not letting me login for now. * removing twitter source for now as I found a bandwidth related bug that wont get pushed for a bit * Adding a bunch of changes, some is cleanup and some are adds * updated the images * updated the kube common playbook * Started to work on ceph, stopped due to hardware resources, updated common, added monit, and starting to work on a playbook to handle my ssh access. * Added a role to deploy monit to my servers. Still needs some more updates before its ready * Here is my work on ceph, it might go away but I am not sure yet. * Starting to migrate my common playbook to a role, not done yet. * updated kube and inventory * updated gitignore
121 lines
3.0 KiB
YAML
121 lines
3.0 KiB
YAML
---
|
|
|
|
- name: Deploy NextCloud
|
|
hosts: localhost
|
|
vars:
|
|
dockerRoot: '~/docker/nextcloud'
|
|
image: nextcloud
|
|
c_name: nextcloud
|
|
|
|
# Notes:
|
|
# NextCloud has a command line tool that can be used from within docker.
|
|
# docker exec --user www-data nextcloud php occ
|
|
# This is good to know when changes need to be made
|
|
# - This playbook is made for testing on a personal device, not for production.
|
|
|
|
tasks:
|
|
- name: Make NextCloud Network
|
|
docker_network:
|
|
name: nc
|
|
force: true
|
|
ipam_config:
|
|
- subnet: 172.19.10.0/24
|
|
gateway: 172.19.10.1
|
|
iprange: 172.19.10.0/26
|
|
|
|
- name: stop postgres if present
|
|
docker_container:
|
|
name: nextcloudsql
|
|
state: stopped
|
|
ignore_errors: true
|
|
|
|
- name: Pull postgres image
|
|
docker_image:
|
|
name: postgres:alpine
|
|
source: pull
|
|
|
|
- name: deploy postgres
|
|
docker_container:
|
|
name: nextcloudsql
|
|
image: postgres:alpine
|
|
state: started
|
|
env:
|
|
POSTGRES_PASSWORD: demo
|
|
POSTGRES_DB: nextcloud
|
|
POSTGRES_USER: nextcloud
|
|
ports:
|
|
- 5432:5432
|
|
volumes:
|
|
- "{{ dockerRoot }}/sql:/var/lib/postgresql/data"
|
|
networks:
|
|
- name: nc
|
|
ipv4_address: 172.19.10.11
|
|
|
|
- name: Stop Redis if present
|
|
docker_container:
|
|
name: nextcloudredis
|
|
state: stopped
|
|
ignore_errors: true
|
|
|
|
- name: Pull redis image
|
|
docker_image:
|
|
name: redis:alpine
|
|
source: pull
|
|
|
|
- name: Deploy Redis
|
|
docker_container:
|
|
name: nextcloudredis
|
|
image: redis:alpine
|
|
state: started
|
|
ports:
|
|
- 6379:6379
|
|
networks:
|
|
- name: nc
|
|
ipv4_address: 172.19.10.13
|
|
|
|
- name: stop container if present
|
|
docker_container:
|
|
name: nextcloud
|
|
state: stopped
|
|
ignore_errors: true
|
|
|
|
- name: Pull image
|
|
docker_image:
|
|
name: nextcloud
|
|
source: pull
|
|
|
|
- name: deploy NextCloud
|
|
docker_container:
|
|
name: nextcloud
|
|
image: nextcloud
|
|
state: started
|
|
links:
|
|
- "nextcloudsql:postgres"
|
|
env:
|
|
POSTGRES_DB=nextcloud
|
|
POSTGRES_USER=nextcloud
|
|
POSTGRES_PASSWORD=demo
|
|
POSTGRES_HOST=172.19.10.11:5432
|
|
REDIS_HOST=172.19.10.13
|
|
NEXTCLOUD_ADMIN_USER=admin
|
|
NEXTCLOUD_ADMIN_PASSWORD=admin
|
|
ports:
|
|
- 8080:80
|
|
volumes:
|
|
- "{{ dockerRoot }}/config:/var/www/html/config"
|
|
- "{{ dockerRoot }}/data:/var/www/html/data"
|
|
- "{{ dockerRoot }}/apps:/var/www/html/custom_apps"
|
|
networks:
|
|
- name: nc
|
|
ipv4_address: 172.19.10.12
|
|
|
|
- name: wait for nextcloud to start
|
|
wait_for:
|
|
timeout: 30
|
|
|
|
- name: Run db:add-missing-indices
|
|
shell: docker exec --user www-data nextcloud php occ db:add-missing-indices
|
|
|
|
- name: Run convert-filecache-bigint
|
|
shell: docker exec --user www-data nextcloud php occ db:convert-filecache-bigint
|