2023-10-25 22:26:17 +02:00
|
|
|
---
|
|
|
|
- name: include user tasks
|
|
|
|
ansible.builtin.include_tasks: user.yml
|
|
|
|
|
|
|
|
- name: create directories
|
|
|
|
become: true
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ cv4pve_user }}"
|
|
|
|
group: "{{ cv4pve_user_group }}"
|
|
|
|
mode: "0644"
|
|
|
|
loop:
|
|
|
|
- '/tmp/cv4pve'
|
|
|
|
- '/usr/local/bin/cv4pve'
|
|
|
|
|
|
|
|
- name: download archives
|
|
|
|
become: true
|
2024-04-14 20:54:34 +02:00
|
|
|
ansible.builtin.unarchive:
|
|
|
|
src: "{{ cv4pve_dl_link }}"
|
2024-04-14 20:56:53 +02:00
|
|
|
dest: /tmp/cv4pve/cv4pve-autosnap-linux-x64-{{ cv4pve_version }}
|
2023-10-25 22:26:17 +02:00
|
|
|
mode: '0775'
|
|
|
|
owner: "{{ cv4pve_user }}"
|
|
|
|
group: "{{ cv4pve_user_group }}"
|
2024-04-14 20:54:34 +02:00
|
|
|
remote_src: yes
|
2023-10-25 22:26:17 +02:00
|
|
|
|
|
|
|
- name: template cv4pve.service
|
|
|
|
become: true
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: cv4pve.service.j2
|
|
|
|
dest: /etc/systemd/system/cv4pve.service
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: "0644"
|
|
|
|
notify:
|
|
|
|
- systemctl daemon-reload
|
|
|
|
|
|
|
|
- name: template cv4pve_mail.service
|
|
|
|
become: true
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: cv4pve_mail.service.j2
|
|
|
|
dest: /etc/systemd/system/cv4pve_mail.service
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: "0644"
|
|
|
|
notify:
|
|
|
|
- systemctl daemon-reload
|
|
|
|
|
|
|
|
- name: template cv4pve.timer
|
|
|
|
become: true
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: cv4pve.timer.j2
|
|
|
|
dest: /etc/systemd/system/cv4pve.timer
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: "0644"
|
|
|
|
notify:
|
|
|
|
- systemctl daemon-reload
|
|
|
|
|
|
|
|
- name: systemctl start cv4pve.timer
|
|
|
|
become: true
|
|
|
|
ansible.builtin.systemd:
|
|
|
|
name: cv4pve.timer
|
|
|
|
state: started
|
|
|
|
enabled: true
|