mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-05-14 17:24:57 +02:00
Added rebuild procedure and solved condition bug
This commit is contained in:
parent
13e98beed2
commit
4ebe7ee918
@ -3,42 +3,46 @@
|
|||||||
name: pkgmgr-install
|
name: pkgmgr-install
|
||||||
vars:
|
vars:
|
||||||
package_name: checkcsp
|
package_name: checkcsp
|
||||||
when: run_once_backup_docker_to_local is not defined
|
when: run_once_health_csp is not defined
|
||||||
|
|
||||||
|
- name: rebuild checkcsp docker image
|
||||||
|
shell: checkcsp build
|
||||||
|
# Todo this could be optimized in the future
|
||||||
|
|
||||||
- name: "create {{ health_csp_crawler_folder }}"
|
- name: "create {{ health_csp_crawler_folder }}"
|
||||||
file:
|
file:
|
||||||
path: "{{ health_csp_crawler_folder }}"
|
path: "{{ health_csp_crawler_folder }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: run_once_backup_docker_to_local is not defined
|
when: run_once_health_csp is not defined
|
||||||
|
|
||||||
- name: copy health-csp.py
|
- name: copy health-csp.py
|
||||||
copy:
|
copy:
|
||||||
src: health-csp.py
|
src: health-csp.py
|
||||||
dest: "{{ health_csp_crawler_script }}"
|
dest: "{{ health_csp_crawler_script }}"
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: run_once_backup_docker_to_local is not defined
|
when: run_once_health_csp is not defined
|
||||||
|
|
||||||
- name: create health-csp.cymais.service
|
- name: create health-csp.cymais.service
|
||||||
template:
|
template:
|
||||||
src: health-csp.service.j2
|
src: health-csp.service.j2
|
||||||
dest: /etc/systemd/system/health-csp.cymais.service
|
dest: /etc/systemd/system/health-csp.cymais.service
|
||||||
notify: reload health-csp.cymais.service
|
notify: reload health-csp.cymais.service
|
||||||
when: run_once_backup_docker_to_local is not defined
|
when: run_once_health_csp is not defined
|
||||||
|
|
||||||
- name: set service_name to role_name
|
- name: set service_name to role_name
|
||||||
set_fact:
|
set_fact:
|
||||||
service_name: "{{ role_name }}"
|
service_name: "{{ role_name }}"
|
||||||
when: run_once_backup_docker_to_local is not defined
|
when: run_once_health_csp is not defined
|
||||||
|
|
||||||
- name: include systemd timer role
|
- name: include systemd timer role
|
||||||
include_role:
|
include_role:
|
||||||
name: systemd-timer
|
name: systemd-timer
|
||||||
vars:
|
vars:
|
||||||
on_calendar: "{{ on_calendar_health_csp_crawler }}"
|
on_calendar: "{{ on_calendar_health_csp_crawler }}"
|
||||||
when: run_once_backup_docker_to_local is not defined
|
when: run_once_health_csp is not defined
|
||||||
|
|
||||||
- name: run the backup_docker_to_local tasks once
|
- name: run the health_csp tasks once
|
||||||
set_fact:
|
set_fact:
|
||||||
run_once_backup_docker_to_local: true
|
run_once_health_csp: true
|
||||||
when: run_once_backup_docker_to_local is not defined
|
when: run_once_health_csp is not defined
|
||||||
|
Loading…
x
Reference in New Issue
Block a user