ansible-roles/listupgrade/tasks/main.yml

74 lines
1.6 KiB
YAML
Raw Normal View History

---
2017-11-27 14:27:13 +01:00
- include_role:
2019-11-29 14:00:25 +01:00
name: evolix/remount-usr
2017-11-27 14:27:13 +01:00
- name: Scripts dir is present
file:
2016-12-19 14:19:35 +01:00
path: "/usr/share/scripts"
state: directory
owner: root
group: root
mode: "0700"
- name: Copy listupgrade script
copy:
src: listupgrade.sh
2016-12-19 14:19:35 +01:00
dest: "/usr/share/scripts/listupgrade.sh"
mode: "0700"
owner: root
group: root
force: yes
- name: Create /etc/evolinux
file:
path: /etc/evolinux
state: directory
owner: root
group: root
2017-10-17 18:08:18 +02:00
mode: "0700"
- name: Copy listupgrade config
template:
src: listupgrade.cnf.j2
dest: /etc/evolinux/listupgrade.cnf
mode: "0600"
owner: root
group: root
force: no
- name: Cron.d is present
file:
path: "/etc/cron.d"
state: directory
mode: "0755"
owner: root
group: root
- name: Enable listupgrade cron
2021-07-02 14:01:46 +02:00
cron:
2023-03-13 17:25:29 +01:00
name: "listupgrade.sh"
2021-07-02 14:01:46 +02:00
cron_file: "listupgrade"
user: root
job: "/usr/share/scripts/listupgrade.sh --cron {{ listupgrade_cron_force | bool | ternary('--force','') }}"
minute: "{{ listupgrade_cron_minute }}"
hour: "{{ listupgrade_cron_hour }}"
weekday: "{{ listupgrade_cron_weekday }}"
day: "{{ listupgrade_cron_day }}"
month: "{{ listupgrade_cron_month }}"
state: "{{ listupgrade_cron_enabled | bool | ternary('present','absent') }}"
- name: Remove old lisupgrade typo
cron:
name: "lisupgrade.sh"
cron_file: "listupgrade"
state: absent
- name: old-kernel-autoremoval script is present
copy:
src: old-kernel-autoremoval.sh
dest: /usr/share/scripts/old-kernel-autoremoval.sh
mode: "0755"
owner: root
group: root