mirror of
https://github.com/dredx/prole.git
synced 2026-09-23 10:13:58 +00:00
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
---
|
|
|
|
- name: Install dashboard dependencies (Debian)
|
|
ansible.builtin.apt:
|
|
name: "{{ dashboard_packages | default(dashboard_packages_debian) }}"
|
|
state: present
|
|
update_cache: true
|
|
when: ansible_facts.os_family == 'Debian'
|
|
|
|
- name: Fail on unsupported OS family
|
|
ansible.builtin.fail:
|
|
msg: "dashboard role currently supports Debian-family hosts only (got os_family={{ ansible_facts.os_family }})."
|
|
when: ansible_facts.os_family != 'Debian'
|
|
|
|
- name: Deploy dashboard script
|
|
ansible.builtin.copy:
|
|
src: "{{ playbook_dir }}/../../tools/dashboard.sh"
|
|
dest: "{{ dashboard_script_dest }}"
|
|
owner: root
|
|
group: root
|
|
mode: '0755'
|
|
|
|
- name: Deploy systemd unit
|
|
ansible.builtin.template:
|
|
src: dashboard.service.j2
|
|
dest: /etc/systemd/system/dashboard.service
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
notify: reload systemd
|
|
|
|
- name: Enable dashboard service
|
|
ansible.builtin.systemd:
|
|
name: dashboard
|
|
enabled: "{{ dashboard_enable | bool }}"
|
|
|
|
- name: Start dashboard service (optional)
|
|
ansible.builtin.systemd:
|
|
name: dashboard
|
|
state: started
|
|
when: dashboard_start | bool
|