absent
This commit is contained in:
parent
2216a29af8
commit
e32a51b1ab
1 changed files with 56 additions and 19 deletions
|
@ -55,34 +55,71 @@
|
|||
group: "{{ sanoid_user_group }}"
|
||||
mode: 0644
|
||||
|
||||
|
||||
|
||||
- name: template cv4pve.service
|
||||
become: yes
|
||||
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: yes
|
||||
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: yes
|
||||
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: yes
|
||||
ansible.builtin.systemd:
|
||||
name: cv4pve.timer
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
|
||||
|
||||
|
||||
# remove old!!!
|
||||
|
||||
- name: Create Sanoid Log
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: "{{ sanoid_log_file }}"
|
||||
state: touch
|
||||
owner: "{{ sanoid_user }}"
|
||||
group: "{{ sanoid_user_group }}"
|
||||
mode: 0644
|
||||
access_time: preserve
|
||||
modification_time: preserve
|
||||
state: absent
|
||||
|
||||
- name: copy logrotate config
|
||||
become: yes
|
||||
ansible.builtin.template:
|
||||
src: logrotate_sanoid
|
||||
dest: /etc/logrotate.d/sanoid
|
||||
owner: root
|
||||
group: "{{ sanoid_user_group }}"
|
||||
mode: 0644
|
||||
ansible.builtin.file:
|
||||
state: absent
|
||||
path: /etc/logrotate.d/sanoid
|
||||
|
||||
- name: Generate Sanoid Cron Scripts
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
src: sanoid-cron.sh
|
||||
dest: /usr/local/bin/sanoid-cron.sh
|
||||
owner: "{{ sanoid_user }}"
|
||||
group: "{{ sanoid_user_group }}"
|
||||
mode: 0755
|
||||
ansible.builtin.file:
|
||||
state: absent
|
||||
path: /usr/local/bin/sanoid-cron.sh
|
||||
|
||||
- name: Configure Sanoid Cron Job
|
||||
become: true
|
||||
|
@ -92,4 +129,4 @@
|
|||
minute: "{{ sanoid_cron_minutes }}"
|
||||
hour: "{{ sanoid_cron_hours }}"
|
||||
user: "{{ sanoid_user }}"
|
||||
state: present
|
||||
state: absent
|
||||
|
|
Loading…
Reference in a new issue