summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthieu Saulnier <fantom@fedoraproject.org>2018-09-15 21:26:01 +0200
committerMatthieu Saulnier <fantom@fedoraproject.org>2018-09-15 21:26:01 +0200
commit446f6e803f9068b03e80d97b7f3270b260db10bc (patch)
tree874e1771363690b07d3d659be757997b2fe7b681
parent735702aad7a7f86aaa2f85a07d9bdf44ba49fc6b (diff)
downloadplaybooks-ansible-446f6e803f9068b03e80d97b7f3270b260db10bc.tar.gz
playbooks-ansible-446f6e803f9068b03e80d97b7f3270b260db10bc.tar.xz
playbooks-ansible-446f6e803f9068b03e80d97b7f3270b260db10bc.zip
Add jabber tasks in update playbook for updates notification
-rw-r--r--.gitignore1
-rw-r--r--update.yml24
2 files changed, 25 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 2a59c16..4c2957f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ roles/dnsserver/templates/keys.j2
roles/torrelay/templates/keys.j2
roles/mtaserver/files/virtual
roles/mtaserver/files/credentials
+.jabbersecrets
diff --git a/update.yml b/update.yml
index 31510d2..6c5c29c 100644
--- a/update.yml
+++ b/update.yml
@@ -3,6 +3,8 @@
- update
remote_user: root
tasks:
+ - include_vars: .jabbersecrets
+
- name: Mise à jour système avec yum
at:
command: /usr/bin/yum -y update
@@ -19,6 +21,13 @@
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
@@ -27,6 +36,14 @@
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
@@ -34,3 +51,10 @@
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"