ansible-roles/listupgrade/tasks/main.yml

74 lines
1.7 KiB
YAML
Raw Permalink Normal View History

---
2017-11-27 14:27:13 +01:00
- ansible.builtin.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
ansible.builtin.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
ansible.builtin.copy:
src: listupgrade.sh
2016-12-19 14:19:35 +01:00
dest: "/usr/share/scripts/listupgrade.sh"
mode: "0700"
owner: root
group: root
2023-06-28 13:22:59 +02:00
force: true
- name: Create /etc/evolinux
ansible.builtin.file:
path: /etc/evolinux
state: directory
owner: root
group: root
2017-10-17 18:08:18 +02:00
mode: "0700"
- name: Copy listupgrade config
ansible.builtin.template:
src: listupgrade.cnf.j2
dest: /etc/evolinux/listupgrade.cnf
mode: "0600"
owner: root
group: root
2023-06-28 13:22:59 +02:00
force: false
- name: Cron.d is present
ansible.builtin.file:
path: "/etc/cron.d"
state: directory
mode: "0755"
owner: root
group: root
2023-04-18 09:47:03 +02:00
- name: Remove old lisupgrade typo
ansible.builtin.cron:
name: "lisupgrade.sh"
cron_file: "listupgrade"
state: absent
- name: Enable listupgrade cron
ansible.builtin.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
2023-06-23 15:10:02 +02:00
job: "/usr/share/scripts/listupgrade.sh --cron{{ listupgrade_cron_force | bool | ternary(' --force','') }}"
2021-07-02 14:01:46 +02:00
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: old-kernel-autoremoval script is present
ansible.builtin.copy:
src: old-kernel-autoremoval.sh
dest: /usr/share/scripts/old-kernel-autoremoval.sh
mode: "0755"
owner: root
group: root