summaryrefslogtreecommitdiffstats
path: root/update.yml
blob: 31510d2f9411506530cf721016996fc8aaad48b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
- hosts:
    - update
  remote_user: root
  tasks:
    - name: Mise à jour système avec yum
      at:
        command: /usr/bin/yum -y update
        count: 5
        units: minutes
        unique: yes
      when: ansible_pkg_mgr == "yum"

    - name: Mise à jour système avec dnf
      at:
        command: /usr/bin/dnf -y update
        count: 5
        units: minutes
        unique: yes
      when: ansible_pkg_mgr == "dnf"

    - name: reboot auto
      at:
        command: /usr/sbin/reboot
        count: 1
        units: hours
        unique: yes
      tags: reboot

    - name: rkhunter internal database update
      at:
        command: /usr/bin/rkhunter --propupd
        count: 50
        units: minutes
        unique: yes
      when: ansible_virtualization_role == "NA" or ansible_virtualization_role == "host"