summaryrefslogtreecommitdiffstats
path: root/update.yml
blob: 6c5c29c9a9e6533b727d47367fc210b30074bc39 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
- hosts:
    - update
  remote_user: root
  tasks:
    - include_vars: .jabbersecrets

    - 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"

    - jabber:
        user: "{{ jabberuserid }}"
        password: "{{ jabberuserpwd }}"
        to: "{{ jabberroom }}"
        msg: Casper, TASK [Mise à jour système programmée dans 5 min] ******


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

    - jabber:
        user: "{{ jabberuserid }}"
        password: "{{ jabberuserpwd }}"
        to: "{{ jabberroom }}"
        msg: Casper, TASK [Reboot système programmé dans 1 heure] ******
      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"

    - jabber:
        user: "{{ jabberuserid }}"
        password: "{{ jabberuserpwd }}"
        to: "{{ jabberroom }}"
        msg: Casper, TASK [Mise à jour rkhunter programmée dans 50 min] ******
      when: ansible_virtualization_role == "NA" or ansible_virtualization_role == "host"