mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 02:10:05 +00:00 
			
		
		
		
	Merge branch 'master' of github.com:kevinveenbirkenbach/cymais
This commit is contained in:
		| @@ -4,6 +4,7 @@ Wants={{systemctl_mount_service_name}} | ||||
| OnFailure=systemd-notifier.cymais@%n.service | ||||
|  | ||||
| [Service] | ||||
| Type=oneshot | ||||
| ExecStart=/bin/python {{ backup_to_usb_script_path }} {{backup_to_usb_source}} {{backup_to_usb_destination}} | ||||
| ExecStartPost=/bin/systemctl start cleanup-backups.cymais.service | ||||
|  | ||||
|   | ||||
							
								
								
									
										12
									
								
								roles/backup-directory-validator/tasks/main.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								roles/backup-directory-validator/tasks/main.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| - name: pull directory-validator.git | ||||
|   git: | ||||
|     repo: "https://github.com/kevinveenbirkenbach/directory-validator.git" | ||||
|     dest: "{{backup_directory_validator_folder}}" | ||||
|     update: yes | ||||
|   ignore_errors: true | ||||
|   when: run_once_backup_directory_validator is not defined | ||||
|  | ||||
| - name: run the backup_directory_validator tasks once | ||||
|   set_fact: | ||||
|     run_once_backup_directory_validator: true | ||||
|   when: run_once_backup_directory_validator is not defined | ||||
							
								
								
									
										1
									
								
								roles/backup-directory-validator/vars/main.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								roles/backup-directory-validator/vars/main.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| backup_directory_validator_folder: "{{path_administrator_scripts}}directory-validator/" | ||||
| @@ -1,3 +1,8 @@ | ||||
| - name: "reload backup-docker-to-local-everything.cymais.service" | ||||
|   systemd: | ||||
|     name: backup-docker-to-local-everything.cymais.service | ||||
|     daemon_reload: yes | ||||
|  | ||||
| - name: "reload backup-docker-to-local.cymais.service" | ||||
|   systemd: | ||||
|     name: backup-docker-to-local.cymais.service | ||||
|   | ||||
| @@ -3,4 +3,5 @@ dependencies: | ||||
|   - backups-provider | ||||
|   - systemd-notifier | ||||
|   - cleanup-failed-docker-backups | ||||
|   - system-maintenance-lock | ||||
|   - system-maintenance-lock | ||||
|   - backup-directory-validator | ||||
| @@ -5,4 +5,5 @@ OnFailure=systemd-notifier.cymais@%n.service cleanup-failed-docker-backups.cymai | ||||
| [Service] | ||||
| Type=oneshot | ||||
| ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ')  }} --ignore {{ system_maintenance_backup_services | reject('equalto', 'backup-docker-to-local') | join(' ') }} --timeout "{{sytem_maintenance_lock_timeout_backup_services}}"' | ||||
| ExecStart=/bin/sh -c '/usr/bin/python {{backup_docker_to_local_folder}}backup-docker-to-local.py --everything' | ||||
| ExecStart=/bin/sh -c '/usr/bin/python {{backup_docker_to_local_folder}}backup-docker-to-local.py --everything' | ||||
| ExecStartPost=/bin/sh -c '/bin/systemctl start heal-docker.cymais.service &' | ||||
| @@ -5,4 +5,5 @@ OnFailure=systemd-notifier.cymais@%n.service cleanup-failed-docker-backups.cymai | ||||
| [Service] | ||||
| Type=oneshot | ||||
| ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ')  }} --ignore {{ system_maintenance_backup_services | reject('equalto', 'backup-docker-to-local-everything') | join(' ') }} --timeout "{{sytem_maintenance_lock_timeout_backup_services}}"' | ||||
| ExecStart=/bin/sh -c '/usr/bin/python {{backup_docker_to_local_folder}}backup-docker-to-local.py' | ||||
| ExecStart=/bin/sh -c '/usr/bin/python {{backup_docker_to_local_folder}}backup-docker-to-local.py' | ||||
| ExecStartPost=/bin/sh -c '/bin/systemctl start heal-docker.cymais.service &' | ||||
| @@ -2,3 +2,4 @@ dependencies: | ||||
|   - git | ||||
|   - systemd-notifier | ||||
|   - system-maintenance-lock | ||||
|   - backup-directory-validator | ||||
|   | ||||
| @@ -87,7 +87,7 @@ Detailed steps for backing up your Akaunting instance, including setting manual | ||||
| Variables are crucial in configuring your Akaunting setup. Ensure you set the following variables correctly in your environment: | ||||
|  | ||||
| - `docker_compose_instance_directory`: Set this variable to the path where your Docker Compose files for Akaunting are located. | ||||
| - `akaunting_db_password`, `version_akaunting`, `akaunting_company_name`, `akaunting_company_email`, `akaunting_setup_admin_email`, and `akaunting_setup_admin_password`: These should be set in your `.env` files as per your requirements. | ||||
| - `akaunting_db_password`, `akaunting_version`, `akaunting_company_name`, `akaunting_company_email`, `akaunting_setup_admin_email`, and `akaunting_setup_admin_password`: These should be set in your `.env` files as per your requirements. | ||||
|  | ||||
| ### Additional Configuration | ||||
| - **SSL Certificate**: The guide includes steps to receive a certificate for your domain. | ||||
|   | ||||
| @@ -5,7 +5,7 @@ services: | ||||
| {% include 'templates/docker/services/' + database_type + '.yml.j2' %} | ||||
|  | ||||
|   application: | ||||
|     image: docker.io/akaunting/akaunting:{{version_akaunting}} | ||||
|     image: docker.io/akaunting/akaunting:{{akaunting_version}} | ||||
|     build: | ||||
|       context: . | ||||
|     ports: | ||||
|   | ||||
| @@ -8,7 +8,7 @@ services: | ||||
|  | ||||
|   # Core services | ||||
|   resolver: | ||||
|     image: ghcr.io/mailu/unbound:{{version_mailu}} | ||||
|     image: ghcr.io/mailu/unbound:{{mailu_version}} | ||||
|     env_file: mailu.env | ||||
|     restart: {{docker_restart_policy}} | ||||
| {% include 'templates/docker/container/networks.yml.j2' %} | ||||
| @@ -17,7 +17,7 @@ services: | ||||
|       driver: journald | ||||
|  | ||||
|   front: | ||||
|     image: ghcr.io/mailu/nginx:{{version_mailu}} | ||||
|     image: ghcr.io/mailu/nginx:{{mailu_version}} | ||||
|     restart: {{docker_restart_policy}} | ||||
|     env_file: mailu.env | ||||
|     logging: | ||||
| @@ -44,7 +44,7 @@ services: | ||||
|       - 192.168.203.254 | ||||
|        | ||||
|   admin: | ||||
|     image: ghcr.io/mailu/admin:{{version_mailu}} | ||||
|     image: ghcr.io/mailu/admin:{{mailu_version}} | ||||
|     restart: {{docker_restart_policy}} | ||||
|     env_file: mailu.env | ||||
|     volumes: | ||||
| @@ -62,7 +62,7 @@ services: | ||||
| {% include 'templates/docker/container/networks.yml.j2' %} | ||||
|  | ||||
|   imap: | ||||
|     image: ghcr.io/mailu/dovecot:{{version_mailu}} | ||||
|     image: ghcr.io/mailu/dovecot:{{mailu_version}} | ||||
|     restart: {{docker_restart_policy}} | ||||
|     env_file: mailu.env | ||||
|     volumes: | ||||
| @@ -78,7 +78,7 @@ services: | ||||
| {% include 'templates/docker/container/networks.yml.j2' %} | ||||
|  | ||||
|   smtp: | ||||
|     image: ghcr.io/mailu/postfix:{{version_mailu}} | ||||
|     image: ghcr.io/mailu/postfix:{{mailu_version}} | ||||
|     restart: {{docker_restart_policy}} | ||||
|     env_file: mailu.env | ||||
|     volumes: | ||||
| @@ -94,7 +94,7 @@ services: | ||||
| {% include 'templates/docker/container/networks.yml.j2' %} | ||||
|  | ||||
|   oletools: | ||||
|     image: ghcr.io/mailu/oletools:{{version_mailu}} | ||||
|     image: ghcr.io/mailu/oletools:{{mailu_version}} | ||||
|     hostname: oletools | ||||
|     restart: {{docker_restart_policy}} | ||||
|     depends_on: | ||||
| @@ -105,7 +105,7 @@ services: | ||||
|       noinet: | ||||
|  | ||||
|   antispam: | ||||
|     image: ghcr.io/mailu/rspamd:{{version_mailu}} | ||||
|     image: ghcr.io/mailu/rspamd:{{mailu_version}} | ||||
|     restart: {{docker_restart_policy}} | ||||
|     env_file: mailu.env | ||||
|     volumes: | ||||
| @@ -127,7 +127,7 @@ services: | ||||
|  | ||||
|   # Optional services | ||||
|   antivirus: | ||||
|     image: ghcr.io/mailu/clamav:{{version_mailu}} | ||||
|     image: ghcr.io/mailu/clamav:{{mailu_version}} | ||||
|     restart: {{docker_restart_policy}} | ||||
|     env_file: mailu.env | ||||
|     volumes: | ||||
| @@ -141,7 +141,7 @@ services: | ||||
| {% include 'templates/docker/container/networks.yml.j2' %} | ||||
|  | ||||
|   webdav: | ||||
|     image: ghcr.io/mailu/radicale:{{version_mailu}} | ||||
|     image: ghcr.io/mailu/radicale:{{mailu_version}} | ||||
|     restart: {{docker_restart_policy}} | ||||
|     env_file: mailu.env | ||||
|     volumes: | ||||
| @@ -156,7 +156,7 @@ services: | ||||
|       radicale: | ||||
|  | ||||
|   fetchmail: | ||||
|     image: ghcr.io/mailu/fetchmail:{{version_mailu}} | ||||
|     image: ghcr.io/mailu/fetchmail:{{mailu_version}} | ||||
|     volumes: | ||||
|       - "admin_data:/data" | ||||
|     restart: {{docker_restart_policy}} | ||||
| @@ -173,7 +173,7 @@ services: | ||||
| {% include 'templates/docker/container/networks.yml.j2' %} | ||||
|  | ||||
|   webmail: | ||||
|     image: ghcr.io/mailu/webmail:{{version_mailu}} | ||||
|     image: ghcr.io/mailu/webmail:{{mailu_version}} | ||||
|     restart: {{docker_restart_policy}} | ||||
|     env_file: mailu.env | ||||
|     volumes: | ||||
|   | ||||
| @@ -6,7 +6,7 @@ services: | ||||
| {% include 'templates/docker/services/' + database_type + '.yml.j2' %} | ||||
|  | ||||
|   web: | ||||
|     image: ghcr.io/mastodon/mastodon:{{version_mastodon}} | ||||
|     image: ghcr.io/mastodon/mastodon:{{mastodon_version}} | ||||
|     restart: {{docker_restart_policy}} | ||||
|     env_file: .env.production | ||||
|     command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000" | ||||
| @@ -22,7 +22,7 @@ services: | ||||
| {% include 'templates/docker/container/networks.yml.j2' %} | ||||
|  | ||||
|   streaming: | ||||
|     image: ghcr.io/mastodon/mastodon:{{version_mastodon}} | ||||
|     image: ghcr.io/mastodon/mastodon:{{mastodon_version}} | ||||
|     restart: {{docker_restart_policy}} | ||||
|     env_file: .env.production | ||||
|     command: node ./streaming | ||||
| @@ -36,7 +36,7 @@ services: | ||||
| {% include 'templates/docker/container/networks.yml.j2' %} | ||||
|  | ||||
|   sidekiq: | ||||
|     image: ghcr.io/mastodon/mastodon:{{version_mastodon}} | ||||
|     image: ghcr.io/mastodon/mastodon:{{mastodon_version}} | ||||
|     restart: {{docker_restart_policy}} | ||||
|     env_file: .env.production | ||||
|     command: bundle exec sidekiq | ||||
|   | ||||
| @@ -68,7 +68,7 @@ | ||||
| - name: show variable information | ||||
|   debug: | ||||
|     msg: "hosts_path: {{hosts_path}}\nmatrix_inventory_tmp_dir:{{ matrix_inventory_tmp_dir }}" | ||||
|   when: mode_verbose | bool | ||||
|   when: mode_debug | bool | ||||
|  | ||||
| - name: install requirements | ||||
|   local_action: command just roles | ||||
|   | ||||
| @@ -90,7 +90,7 @@ services: | ||||
|       KEYV_URL: '' | ||||
|       KEYV_BOT_ENCRYPTION: 'false' | ||||
|       KEYV_BOT_STORAGE: 'true' | ||||
|       MATRIX_HOMESERVER_URL: 'http://synapse' | ||||
|       MATRIX_HOMESERVER_URL: 'https://{{synapse_domain}}' | ||||
|       MATRIX_BOT_USERNAME: '@chatgptbot:{{matrix_server_name}}' | ||||
|       MATRIX_ACCESS_TOKEN: '{{ matrix_chatgpt_bridge_access_token | default('') }}' | ||||
|       MATRIX_BOT_PASSWORD: '{{matrix_chatgpt_bridge_user_password}}' | ||||
|   | ||||
							
								
								
									
										4
									
								
								roles/docker-moodle/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								roles/docker-moodle/README.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| # role docker-moodle | ||||
|  | ||||
| ## further information | ||||
| - https://github.com/bitnami/containers/tree/main/bitnami/moodle | ||||
| @@ -4,14 +4,21 @@ services: | ||||
|   moodle: | ||||
|     image: docker.io/bitnami/moodle:latest | ||||
|     ports: | ||||
|       - '80:8080' | ||||
|       - '443:8443' | ||||
|       - 127.0.0.1:{{http_port}}:8080 | ||||
|     environment: | ||||
|       - MOODLE_DATABASE_HOST={{database_host}} | ||||
|       - MOODLE_DATABASE_PORT_NUMBER=3306 | ||||
|       - MOODLE_DATABASE_USER={{database_username}} | ||||
|       - MOODLE_DATABASE_NAME={{database_name}} | ||||
|       - MOODLE_DATABASE_PASSWORD={{database_password}} | ||||
|       - ALLOW_EMPTY_PASSWORD=no | ||||
|       - MOODLE_SITE_NAME="{{moodle_site_name}}" | ||||
|       - MOODLE_SSLPROXY=yes | ||||
|       - MOODLE_REVERSE_PROXY=yes | ||||
|       - MOODLE_USERNAME={{moodle_user_name}} | ||||
|       - MOODLE_PASSWORD={{moodle_user_password}} | ||||
|       - MOODLE_EMAIL={{moodle_user_email}} | ||||
|       - BITNAMI_DEBUG={% if mode_debug | bool %}true{% else %}false{% endif %}  | ||||
|     volumes: | ||||
|       - 'moodle:/bitnami/moodle' | ||||
|       - 'data:/bitnami/moodledata' | ||||
|   | ||||
| @@ -21,7 +21,7 @@ To update the nextcloud container execute the following commands on the server: | ||||
|   docker-compose down | ||||
| ``` | ||||
|  | ||||
| Afterwards update the ***version_nextcloud*** variable to the next version and run the this repository with this ansible role. | ||||
| Afterwards update the ***nextcloud_version*** variable to the next version and run the this repository with this ansible role. | ||||
|  | ||||
| It is only possible to update from one to the next major version at a time | ||||
|  | ||||
|   | ||||
| @@ -7,7 +7,7 @@ services: | ||||
| {% include 'templates/docker/services/' + database_type + '.yml.j2' %} | ||||
|  | ||||
|   application: | ||||
|     image: "nextcloud:{{version_nextcloud}}-fpm-alpine" | ||||
|     image: "nextcloud:{{nextcloud_version}}-fpm-alpine" | ||||
|     container_name: nextcloud-application | ||||
|     restart: {{docker_restart_policy}} | ||||
|     logging: | ||||
| @@ -43,7 +43,7 @@ services: | ||||
|  | ||||
|   cron: | ||||
|     container_name: nextcloud-cron | ||||
|     image: "nextcloud:{{version_nextcloud}}-fpm-alpine" | ||||
|     image: "nextcloud:{{nextcloud_version}}-fpm-alpine" | ||||
|     restart: {{docker_restart_policy}} | ||||
|     logging: | ||||
|       driver: journald | ||||
|   | ||||
| @@ -11,7 +11,7 @@ | ||||
|  | ||||
| - name: add env | ||||
|   template:  | ||||
|     src: env.j2  | ||||
|     src: env.j2 | ||||
|     dest: "{{docker_compose_instance_directory}}env" | ||||
|     mode: '770' | ||||
|     force: yes | ||||
|   | ||||
		Reference in New Issue
	
	Block a user