mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-07-18 14:34:24 +02:00
Optimized mastodon and network integration. added options for mig build to make
This commit is contained in:
parent
409e659143
commit
d1982af63d
9
Makefile
9
Makefile
@ -25,10 +25,17 @@ clean:
|
|||||||
@echo "Removing ignored git files"
|
@echo "Removing ignored git files"
|
||||||
git clean -fdX
|
git clean -fdX
|
||||||
|
|
||||||
|
list:
|
||||||
|
@echo Generating the roles list
|
||||||
|
python3 main.py build roles_list
|
||||||
|
|
||||||
tree:
|
tree:
|
||||||
@echo Generating Tree
|
@echo Generating Tree
|
||||||
python3 main.py build tree -D 2 --no-signal
|
python3 main.py build tree -D 2 --no-signal
|
||||||
|
|
||||||
|
mig: list tree
|
||||||
|
@echo Creating meta data for meta infinity graph
|
||||||
|
|
||||||
dockerignore:
|
dockerignore:
|
||||||
@echo Create dockerignore
|
@echo Create dockerignore
|
||||||
cat .gitignore > .dockerignore
|
cat .gitignore > .dockerignore
|
||||||
@ -61,7 +68,7 @@ build: clean dockerignore
|
|||||||
install: build
|
install: build
|
||||||
@echo "⚙️ Install complete."
|
@echo "⚙️ Install complete."
|
||||||
|
|
||||||
partial-test:
|
messy-test:
|
||||||
@echo "🧪 Running Python tests…"
|
@echo "🧪 Running Python tests…"
|
||||||
PYTHONPATH=. python -m unittest discover -s tests
|
PYTHONPATH=. python -m unittest discover -s tests
|
||||||
@echo "📑 Checking Ansible syntax…"
|
@echo "📑 Checking Ansible syntax…"
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
- docker compose restart
|
- docker compose restart
|
||||||
|
|
||||||
- name: docker compose up
|
- name: docker compose up
|
||||||
shell: docker-compose -p {{ application_id }} up -d --force-recreate --remove-orphans --build
|
shell: docker-compose -p {{ application_id | get_entity_name }} up -d --force-recreate --remove-orphans --build
|
||||||
args:
|
args:
|
||||||
chdir: "{{ docker_compose.directories.instance }}"
|
chdir: "{{ docker_compose.directories.instance }}"
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
|
@ -18,7 +18,7 @@ networks:
|
|||||||
application_id in networks.local and
|
application_id in networks.local and
|
||||||
networks.local[application_id].subnet is defined
|
networks.local[application_id].subnet is defined
|
||||||
%}
|
%}
|
||||||
name: {{ application_id }}
|
name: {{ application_id | get_entity_name }}
|
||||||
driver: bridge
|
driver: bridge
|
||||||
ipam:
|
ipam:
|
||||||
driver: default
|
driver: default
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
single_user_mode: false # Set true for initial setup
|
single_user_mode: false # Set true for initial setup
|
||||||
setup: false # Set true in inventory file to execute the setup and initializing procedures, don't know if this is still necessary @todo test it
|
setup: true # Set true in inventory file to execute the setup and initializing procedures, don't know if this is still necessary @todo test it
|
||||||
features:
|
features:
|
||||||
matomo: true
|
matomo: true
|
||||||
css: true
|
css: true
|
||||||
|
10
roles/web-app-mastodon/tasks/01_setup.yml
Normal file
10
roles/web-app-mastodon/tasks/01_setup.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
- name: flush docker service
|
||||||
|
meta: flush_handlers
|
||||||
|
|
||||||
|
- name: "Execute migration for '{{ application_id }}'"
|
||||||
|
command:
|
||||||
|
cmd: "docker-compose run --rm web bundle exec rails db:migrate"
|
||||||
|
chdir: "{{docker_compose.directories.instance}}"
|
||||||
|
|
||||||
|
- name: "Include administrator routines for '{{ application_id }}'"
|
||||||
|
include_tasks: 02_administrator.yml
|
@ -16,15 +16,6 @@
|
|||||||
client_max_body_size: "80m"
|
client_max_body_size: "80m"
|
||||||
vhost_flavour: "ws_generic"
|
vhost_flavour: "ws_generic"
|
||||||
|
|
||||||
- name: flush docker service
|
- name: "start setup procedures for mastodon"
|
||||||
meta: flush_handlers
|
include_tasks: 01_setup.yml
|
||||||
when: mastodon_setup |bool
|
when: mastodon_setup |bool
|
||||||
|
|
||||||
- name: setup routine for mastodon
|
|
||||||
command:
|
|
||||||
cmd: "docker-compose run --rm web bundle exec rails db:migrate"
|
|
||||||
chdir: "{{docker_compose.directories.instance}}"
|
|
||||||
when: mastodon_setup |bool
|
|
||||||
|
|
||||||
- name: "include create-administrator.yml for mastodon"
|
|
||||||
include_tasks: create-administrator.yml
|
|
@ -1,6 +1,6 @@
|
|||||||
- name: "Transfering oauth2-proxy-keycloak.cfg.j2 to {{(path_docker_compose_instances | get_docker_paths(application_id)).directories.volumes}}"
|
- name: "Transfering oauth2-proxy-keycloak.cfg.j2 to {{( path_docker_compose_instances | get_docker_paths(application_id)).directories.volumes }}"
|
||||||
template:
|
template:
|
||||||
src: "{{ playbook_dir }}/roles/web-app-oauth2-proxy/templates/oauth2-proxy-keycloak.cfg.j2"
|
src: "{{ playbook_dir }}/roles/web-app-oauth2-proxy/templates/oauth2-proxy-keycloak.cfg.j2"
|
||||||
dest: "{{(path_docker_compose_instances | get_docker_paths(application_id)).directories.volumes}}{{applications | get_app_conf('oauth2-proxy','configuration_file')}}"
|
dest: "{{( path_docker_compose_instances | get_docker_paths(application_id)).directories.volumes }}{{applications | get_app_conf('oauth2-proxy','configuration_file')}}"
|
||||||
notify:
|
notify:
|
||||||
- docker compose up
|
- docker compose up
|
Loading…
x
Reference in New Issue
Block a user