mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-02 15:39:57 +00:00
Removed block from main.yml and moved run_once logic to 01_core.yml
This commit is contained in:
@@ -46,4 +46,6 @@
|
|||||||
|
|
||||||
- name: "Update all repositories with pkgmgr"
|
- name: "Update all repositories with pkgmgr"
|
||||||
command: "pkgmgr pull --all"
|
command: "pkgmgr pull --all"
|
||||||
when: MODE_UPDATE | bool
|
when: MODE_UPDATE | bool
|
||||||
|
|
||||||
|
- include_tasks: utils/run_once.yml
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
---
|
---
|
||||||
- block:
|
- include_tasks: 01_core.yml
|
||||||
- include_tasks: 01_core.yml
|
|
||||||
- include_tasks: utils/run_once.yml
|
|
||||||
when: run_once_pkgmgr is not defined
|
when: run_once_pkgmgr is not defined
|
||||||
@@ -46,3 +46,5 @@
|
|||||||
when:
|
when:
|
||||||
- setup_mariadb_container_result is defined
|
- setup_mariadb_container_result is defined
|
||||||
- setup_mariadb_container_result.changed
|
- setup_mariadb_container_result.changed
|
||||||
|
|
||||||
|
- include_tasks: utils/run_once.yml
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
- block:
|
- include_tasks: 01_core.yml
|
||||||
- include_tasks: 01_core.yml
|
|
||||||
- include_tasks: utils/run_once.yml
|
|
||||||
when: run_once_svc_db_mariadb is not defined
|
when: run_once_svc_db_mariadb is not defined
|
||||||
|
|
||||||
- name: "Initialize database for '{{ database_name }}'"
|
- name: "Initialize database for '{{ database_name }}'"
|
||||||
|
|||||||
@@ -39,3 +39,5 @@
|
|||||||
name: "{{ system_service_id | get_service_name(SOFTWARE_NAME, False) ~ escaped_name.stdout }}.service"
|
name: "{{ system_service_id | get_service_name(SOFTWARE_NAME, False) ~ escaped_name.stdout }}.service"
|
||||||
state: started
|
state: started
|
||||||
when: MODE_ASSERT | bool
|
when: MODE_ASSERT | bool
|
||||||
|
|
||||||
|
- include_tasks: utils/run_once.yml
|
||||||
@@ -1,4 +1,2 @@
|
|||||||
- block:
|
- include_tasks: 01_core.yml
|
||||||
- include_tasks: 01_core.yml
|
|
||||||
- include_tasks: utils/run_once.yml
|
|
||||||
when: run_once_sys_ctl_alm_compose is not defined
|
when: run_once_sys_ctl_alm_compose is not defined
|
||||||
|
|||||||
@@ -9,3 +9,5 @@
|
|||||||
# If the email notifier fails, trigger the Telegram notifier,
|
# If the email notifier fails, trigger the Telegram notifier,
|
||||||
# passing the failing unit's name as the instance text.
|
# passing the failing unit's name as the instance text.
|
||||||
system_service_tpl_on_failure: "{{ ('sys-ctl-alm-telegram@') | get_service_name(SOFTWARE_NAME, False) }}%n.service"
|
system_service_tpl_on_failure: "{{ ('sys-ctl-alm-telegram@') | get_service_name(SOFTWARE_NAME, False) }}%n.service"
|
||||||
|
|
||||||
|
- include_tasks: utils/run_once.yml
|
||||||
|
|||||||
@@ -1,4 +1,2 @@
|
|||||||
- block:
|
- include_tasks: 01_core.yml
|
||||||
- include_tasks: 01_core.yml
|
|
||||||
- include_tasks: utils/run_once.yml
|
|
||||||
when: run_once_sys_ctl_alm_email is not defined
|
when: run_once_sys_ctl_alm_email is not defined
|
||||||
@@ -21,3 +21,5 @@
|
|||||||
community.general.pacman:
|
community.general.pacman:
|
||||||
name: curl
|
name: curl
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
- include_tasks: utils/run_once.yml
|
||||||
@@ -1,4 +1,2 @@
|
|||||||
- block:
|
- include_tasks: 01_core.yml
|
||||||
- include_tasks: 01_core.yml
|
|
||||||
- include_tasks: utils/run_once.yml
|
|
||||||
when: run_once_sys_ctl_alm_telegram is not defined
|
when: run_once_sys_ctl_alm_telegram is not defined
|
||||||
@@ -17,4 +17,6 @@
|
|||||||
system_service_timer_enabled: true
|
system_service_timer_enabled: true
|
||||||
system_service_on_calendar: "{{ SYS_SCHEDULE_CLEANUP_CERTS }}"
|
system_service_on_calendar: "{{ SYS_SCHEDULE_CLEANUP_CERTS }}"
|
||||||
system_service_copy_files: false
|
system_service_copy_files: false
|
||||||
system_service_force_linear_sync: false
|
system_service_force_linear_sync: false
|
||||||
|
|
||||||
|
- include_tasks: utils/run_once.yml
|
||||||
|
|||||||
@@ -1,4 +1,2 @@
|
|||||||
- block:
|
- include_tasks: 01_core.yml
|
||||||
- include_tasks: 01_core.yml
|
|
||||||
- include_tasks: utils/run_once.yml
|
|
||||||
when: run_once_sys_ctl_cln_certs is not defined
|
when: run_once_sys_ctl_cln_certs is not defined
|
||||||
@@ -8,4 +8,6 @@
|
|||||||
vars:
|
vars:
|
||||||
system_service_on_calendar: "{{SYS_SCHEDULE_HEALTH_BTRFS}}"
|
system_service_on_calendar: "{{SYS_SCHEDULE_HEALTH_BTRFS}}"
|
||||||
system_service_timer_enabled: true
|
system_service_timer_enabled: true
|
||||||
system_service_tpl_on_failure: "{{ SYS_SERVICE_ON_FAILURE_COMPOSE }}"
|
system_service_tpl_on_failure: "{{ SYS_SERVICE_ON_FAILURE_COMPOSE }}"
|
||||||
|
|
||||||
|
- include_tasks: utils/run_once.yml
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
- block:
|
- include_tasks: 01_core.yml
|
||||||
- include_tasks: 01_core.yml
|
|
||||||
- include_tasks: utils/run_once.yml
|
|
||||||
when: run_once_sys_ctl_hlth_btrfs is not defined
|
when: run_once_sys_ctl_hlth_btrfs is not defined
|
||||||
|
|
||||||
|
|||||||
@@ -9,4 +9,6 @@
|
|||||||
system_service_on_calendar: "{{ SYS_SCHEDULE_HEALTH_DISC_SPACE }}"
|
system_service_on_calendar: "{{ SYS_SCHEDULE_HEALTH_DISC_SPACE }}"
|
||||||
system_service_timer_enabled: true
|
system_service_timer_enabled: true
|
||||||
system_service_tpl_exec_start: "{{ system_service_script_exec }} {{ SIZE_PERCENT_CLEANUP_DISC_SPACE }}"
|
system_service_tpl_exec_start: "{{ system_service_script_exec }} {{ SIZE_PERCENT_CLEANUP_DISC_SPACE }}"
|
||||||
system_service_tpl_on_failure: "{{ SYS_SERVICE_ON_FAILURE_COMPOSE }} {{ SYS_SERVICE_CLEANUP_DISC_SPACE }}"
|
system_service_tpl_on_failure: "{{ SYS_SERVICE_ON_FAILURE_COMPOSE }} {{ SYS_SERVICE_CLEANUP_DISC_SPACE }}"
|
||||||
|
|
||||||
|
- include_tasks: utils/run_once.yml
|
||||||
|
|||||||
@@ -1,4 +1,2 @@
|
|||||||
- block:
|
- include_tasks: 01_core.yml
|
||||||
- include_tasks: 01_core.yml
|
|
||||||
- include_tasks: utils/run_once.yml
|
|
||||||
when: run_once_sys_ctl_hlth_disc_space is not defined
|
when: run_once_sys_ctl_hlth_disc_space is not defined
|
||||||
@@ -14,3 +14,5 @@
|
|||||||
system_service_timer_enabled: true
|
system_service_timer_enabled: true
|
||||||
system_service_on_calendar: "{{ SYS_SCHEDULE_HEALTH_DOCKER_CONTAINER }}"
|
system_service_on_calendar: "{{ SYS_SCHEDULE_HEALTH_DOCKER_CONTAINER }}"
|
||||||
system_service_tpl_on_failure: "{{ SYS_SERVICE_ON_FAILURE_COMPOSE }} {{ SYS_SERVICE_REPAIR_DOCKER_SOFT }}"
|
system_service_tpl_on_failure: "{{ SYS_SERVICE_ON_FAILURE_COMPOSE }} {{ SYS_SERVICE_REPAIR_DOCKER_SOFT }}"
|
||||||
|
|
||||||
|
- include_tasks: utils/run_once.yml
|
||||||
@@ -1,4 +1,2 @@
|
|||||||
- block:
|
- include_tasks: 01_core.yml
|
||||||
- include_tasks: 01_core.yml
|
|
||||||
- include_tasks: utils/run_once.yml
|
|
||||||
when: run_once_sys_ctl_hlth_docker_container is not defined
|
when: run_once_sys_ctl_hlth_docker_container is not defined
|
||||||
|
|||||||
@@ -10,3 +10,5 @@
|
|||||||
system_service_timer_enabled: true
|
system_service_timer_enabled: true
|
||||||
system_service_tpl_on_failure: "{{ SYS_SERVICE_ON_FAILURE_COMPOSE }} {{ SYS_SERVICE_CLEANUP_ANONYMOUS_VOLUMES }}"
|
system_service_tpl_on_failure: "{{ SYS_SERVICE_ON_FAILURE_COMPOSE }} {{ SYS_SERVICE_CLEANUP_ANONYMOUS_VOLUMES }}"
|
||||||
system_service_tpl_exec_start: '{{ system_service_script_exec }} "{{ DOCKER_WHITELISTET_ANON_VOLUMES | join(" ") }}"'
|
system_service_tpl_exec_start: '{{ system_service_script_exec }} "{{ DOCKER_WHITELISTET_ANON_VOLUMES | join(" ") }}"'
|
||||||
|
|
||||||
|
- include_tasks: utils/run_once.yml
|
||||||
@@ -1,4 +1,2 @@
|
|||||||
- block:
|
- include_tasks: 01_core.yml
|
||||||
- include_tasks: 01_core.yml
|
|
||||||
- include_tasks: utils/run_once.yml
|
|
||||||
when: run_once_sys_ctl_hlth_docker_volumes is not defined
|
when: run_once_sys_ctl_hlth_docker_volumes is not defined
|
||||||
|
|||||||
@@ -10,3 +10,5 @@
|
|||||||
system_service_timer_enabled: true
|
system_service_timer_enabled: true
|
||||||
system_service_tpl_on_failure: "{{ SYS_SERVICE_ON_FAILURE_COMPOSE }}"
|
system_service_tpl_on_failure: "{{ SYS_SERVICE_ON_FAILURE_COMPOSE }}"
|
||||||
system_service_suppress_flush: true # There are almost allways errors in the journalctl logs so suppression is neccessary to let playbook run
|
system_service_suppress_flush: true # There are almost allways errors in the journalctl logs so suppression is neccessary to let playbook run
|
||||||
|
|
||||||
|
- include_tasks: utils/run_once.yml
|
||||||
@@ -1,4 +1,2 @@
|
|||||||
- block:
|
- include_tasks: 01_core.yml
|
||||||
- include_tasks: 01_core.yml
|
|
||||||
- include_tasks: utils/run_once.yml
|
|
||||||
when: run_once_sys_ctl_hlth_journalctl is not defined
|
when: run_once_sys_ctl_hlth_journalctl is not defined
|
||||||
@@ -21,3 +21,5 @@
|
|||||||
system_service_timer_enabled: true
|
system_service_timer_enabled: true
|
||||||
system_service_tpl_on_failure: "{{ SYS_SERVICE_ON_FAILURE_COMPOSE }}"
|
system_service_tpl_on_failure: "{{ SYS_SERVICE_ON_FAILURE_COMPOSE }}"
|
||||||
system_service_force_linear_sync: false
|
system_service_force_linear_sync: false
|
||||||
|
|
||||||
|
- include_tasks: utils/run_once.yml
|
||||||
@@ -1,4 +1,2 @@
|
|||||||
- block:
|
- include_tasks: 01_core.yml
|
||||||
- include_tasks: 01_core.yml
|
|
||||||
- include_tasks: utils/run_once.yml
|
|
||||||
when: run_once_sys_ctl_mtn_cert_renew is not defined
|
when: run_once_sys_ctl_mtn_cert_renew is not defined
|
||||||
|
|||||||
@@ -18,4 +18,6 @@
|
|||||||
system_service_timer_enabled: true
|
system_service_timer_enabled: true
|
||||||
system_service_tpl_on_failure: "{{ SYS_SERVICE_ON_FAILURE_COMPOSE }}"
|
system_service_tpl_on_failure: "{{ SYS_SERVICE_ON_FAILURE_COMPOSE }}"
|
||||||
system_service_tpl_exec_start: "/bin/sh -c 'btrfs-auto-balancer 90 10'"
|
system_service_tpl_exec_start: "/bin/sh -c 'btrfs-auto-balancer 90 10'"
|
||||||
system_service_force_linear_sync: true
|
system_service_force_linear_sync: true
|
||||||
|
|
||||||
|
- include_tasks: utils/run_once.yml
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
- block:
|
- block:
|
||||||
- include_tasks: 01_core.yml
|
- include_tasks: 01_core.yml
|
||||||
- include_tasks: utils/run_once.yml
|
|
||||||
when: run_once_sys_ctl_rpr_btrfs_balancer is not defined
|
when: run_once_sys_ctl_rpr_btrfs_balancer is not defined
|
||||||
|
|||||||
@@ -5,3 +5,5 @@
|
|||||||
owner: "{{ NGINX.USER }}"
|
owner: "{{ NGINX.USER }}"
|
||||||
group: "{{ NGINX.USER }}"
|
group: "{{ NGINX.USER }}"
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
|
||||||
|
- include_tasks: utils/run_once.yml
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
- block:
|
- include_tasks: 01_core.yml
|
||||||
- include_tasks: 01_deploy.yml
|
|
||||||
- include_tasks: utils/run_once.yml
|
|
||||||
when: run_once_sys_front_inj_desktop is not defined
|
when: run_once_sys_front_inj_desktop is not defined
|
||||||
|
|
||||||
# --- Build tiny inline initializer (CSP-hashed) ---
|
# --- Build tiny inline initializer (CSP-hashed) ---
|
||||||
|
|||||||
@@ -6,3 +6,5 @@
|
|||||||
- name: "reset (if enabled)"
|
- name: "reset (if enabled)"
|
||||||
include_tasks: 02_reset.yml
|
include_tasks: 02_reset.yml
|
||||||
when: MODE_RESET | bool
|
when: MODE_RESET | bool
|
||||||
|
|
||||||
|
- include_tasks: utils/run_once.yml
|
||||||
@@ -4,9 +4,7 @@
|
|||||||
handler_role_name: "sys-daemon"
|
handler_role_name: "sys-daemon"
|
||||||
when: run_once_sys_service is defined
|
when: run_once_sys_service is defined
|
||||||
|
|
||||||
- block:
|
- include_tasks: 01_core.yml
|
||||||
- include_tasks: 01_core.yml
|
|
||||||
- include_tasks: utils/run_once.yml
|
|
||||||
when: run_once_sys_service is not defined
|
when: run_once_sys_service is not defined
|
||||||
|
|
||||||
- name: "Execute service routines for '{{ system_service_id }}'"
|
- name: "Execute service routines for '{{ system_service_id }}'"
|
||||||
|
|||||||
@@ -5,4 +5,6 @@
|
|||||||
|
|
||||||
- name: "Include tasks for 'No-Webroot-ACME-CHALLENGE-METHOD'"
|
- name: "Include tasks for 'No-Webroot-ACME-CHALLENGE-METHOD'"
|
||||||
include_tasks: 02_no_webroot.yml
|
include_tasks: 02_no_webroot.yml
|
||||||
when: CERTBOT_ACME_CHALLENGE_METHOD != 'webroot'
|
when: CERTBOT_ACME_CHALLENGE_METHOD != 'webroot'
|
||||||
|
|
||||||
|
- include_tasks: utils/run_once.yml
|
||||||
@@ -1,4 +1,2 @@
|
|||||||
- block:
|
- include_tasks: 01_core.yml
|
||||||
- include_tasks: 01_core.yml
|
|
||||||
- include_tasks: utils/run_once.yml
|
|
||||||
when: run_once_sys_svc_certbot is not defined
|
when: run_once_sys_svc_certbot is not defined
|
||||||
|
|||||||
@@ -25,4 +25,6 @@
|
|||||||
- sys-ctl-hlth-docker-container
|
- sys-ctl-hlth-docker-container
|
||||||
- sys-ctl-hlth-docker-volumes
|
- sys-ctl-hlth-docker-volumes
|
||||||
- sys-ctl-rpr-docker-hard
|
- sys-ctl-rpr-docker-hard
|
||||||
when: SYS_SVC_DOCKER_LOAD_SERVICES | bool
|
when: SYS_SVC_DOCKER_LOAD_SERVICES | bool
|
||||||
|
|
||||||
|
- include_tasks: utils/run_once.yml
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
---
|
---
|
||||||
- block:
|
- include_tasks: 01_core.yml
|
||||||
- include_tasks: 01_core.yml
|
|
||||||
- include_tasks: utils/run_once.yml
|
|
||||||
when: run_once_sys_svc_docker is not defined
|
when: run_once_sys_svc_docker is not defined
|
||||||
|
|||||||
@@ -13,3 +13,5 @@
|
|||||||
include_role:
|
include_role:
|
||||||
name: update-apt
|
name: update-apt
|
||||||
when: ansible_distribution == "Debian"
|
when: ansible_distribution == "Debian"
|
||||||
|
|
||||||
|
- include_tasks: utils/run_once.yml
|
||||||
@@ -1,4 +1,2 @@
|
|||||||
- block:
|
- include_tasks: 01_core.yml
|
||||||
- include_tasks: 01_core.yml
|
|
||||||
- include_tasks: utils/run_once.yml
|
|
||||||
when: run_once_update_compose is not defined
|
when: run_once_update_compose is not defined
|
||||||
@@ -52,3 +52,5 @@
|
|||||||
name: user
|
name: user
|
||||||
vars:
|
vars:
|
||||||
user_name: "administrator"
|
user_name: "administrator"
|
||||||
|
|
||||||
|
- include_tasks: utils/run_once.yml
|
||||||
@@ -1,4 +1,2 @@
|
|||||||
- block:
|
- include_tasks: 01_core.yml
|
||||||
- include_tasks: 01_core.yml
|
|
||||||
- include_tasks: utils/run_once.yml
|
|
||||||
when: run_once_user_administrator is not defined
|
when: run_once_user_administrator is not defined
|
||||||
@@ -3,4 +3,6 @@
|
|||||||
name: sys-stk-semi-stateless
|
name: sys-stk-semi-stateless
|
||||||
vars:
|
vars:
|
||||||
docker_compose_file_creation_enabled: true
|
docker_compose_file_creation_enabled: true
|
||||||
docker_pull_git_repository: false
|
docker_pull_git_repository: false
|
||||||
|
|
||||||
|
- include_tasks: utils/run_once.yml
|
||||||
@@ -1,6 +1,3 @@
|
|||||||
---
|
---
|
||||||
- block:
|
- include_tasks: 01_core.yml
|
||||||
- name: "Load core functions for '{{ application_id }}'"
|
|
||||||
include_tasks: 01_core.yml
|
|
||||||
- include_tasks: utils/run_once.yml
|
|
||||||
when: run_once_web_svc_coturn is not defined
|
when: run_once_web_svc_coturn is not defined
|
||||||
Reference in New Issue
Block a user