Compare commits
20 Commits
v0.5.1-bb
...
v0.5.c-tvi
Author | SHA1 | Date | |
---|---|---|---|
dd77793bda | |||
3a5ef6c05d | |||
e8ed8cf37d | |||
f366b0c566 | |||
9b287db7a5 | |||
ccd153fbb6 | |||
105b85cc53 | |||
ea24a4bda8 | |||
db1252d3b6 | |||
7383918973 | |||
8f7ad1e13a | |||
3b178d0a52 | |||
be3cb4ecca | |||
678858e4b1 | |||
4ee5264660 | |||
9ea66d55be | |||
b659652480 | |||
250bbff7f5 | |||
155421f2c6 | |||
0ef79d9bf9 |
@ -6,7 +6,7 @@
|
||||
apt: name={{ item }} state=present
|
||||
with_items:
|
||||
- apache2
|
||||
- mysql-server
|
||||
- mariadb-server
|
||||
- php-mysql
|
||||
- php
|
||||
- libapache2-mod-php
|
||||
|
@ -84,10 +84,10 @@
|
||||
- restart icinga
|
||||
|
||||
- name: reconfiguration des droits avec dpkg statoverride
|
||||
shell: dpkg-statoverride --update --add nagios www-data 2710 /var/lib/icinga/rw
|
||||
shell: dpkg-statoverride --update --force-all --add nagios www-data 2710 /var/lib/icinga/rw
|
||||
|
||||
- name: reconfiguration des droits avec dpkg statoverride
|
||||
shell: dpkg-statoverride --update --add nagios nagios 751 /var/lib/icinga
|
||||
shell: dpkg-statoverride --update --force-all --add nagios nagios 751 /var/lib/icinga
|
||||
|
||||
- name: suppression de checkresults
|
||||
file:
|
40
roles/postfix/README.md
Normal file
40
roles/postfix/README.md
Normal file
@ -0,0 +1,40 @@
|
||||
# Mise en place manuelle de Postfix
|
||||
|
||||
Entrer votre adresse mail et votre mot de passe dans le fichier /etc/postfix/sasl_passwd
|
||||
|
||||
```
|
||||
|
||||
nano /etc/postfix/sasl_passwd
|
||||
|
||||
[smpt.gmail.com]:587 votreadresse@domaine.fr:motdepasse
|
||||
|
||||
```
|
||||
|
||||
Entrer votre addresse mail dans le fichier /etc/icinga/objects/contacts_icinga.cfg
|
||||
|
||||
```
|
||||
|
||||
nano /etc/icinga/objects/contacts_icinga.cfg
|
||||
|
||||
define contact...
|
||||
|
||||
email votreadresse@domaine.fr
|
||||
|
||||
```
|
||||
Lancer la commande suivante pour prendre en compte la modification:
|
||||
|
||||
```
|
||||
|
||||
/usr/sbin/postmap /etc/postfix/sasl_passwd
|
||||
|
||||
```
|
||||
|
||||
Activer l'accès aux applications moins sécurisé depuis son compte google
|
||||
|
||||
Désactiver un service puis vérifier ses mails (attendre quelques minutes)
|
||||
|
||||
```
|
||||
|
||||
tail -f /var/log/icinga/icinga.log pour vérifier l'envoi de l'email
|
||||
|
||||
```
|
@ -24,7 +24,7 @@
|
||||
shell: chmod 400 /etc/postfix/sasl_passwd
|
||||
|
||||
- name: postmap
|
||||
shell: postmap /etc/postfix/sasl_passwd
|
||||
shell: /usr/sbin/postmap /etc/postfix/sasl_passwd
|
||||
|
||||
- name: Copie thawte_Premium_Server_CA.pem
|
||||
copy: src=thawte_Premium_Server_CA.pem dest=/etc/ssl/certs/
|
||||
@ -34,3 +34,8 @@
|
||||
notify:
|
||||
- restart postfix
|
||||
|
||||
- name: Changement des droits icinga.log
|
||||
file:
|
||||
path: /var/log/icinga/icinga.log
|
||||
state: touch
|
||||
mode: u=rw,g=w
|
||||
|
27
roles/s-backup/files/backup.sh
Executable file
27
roles/s-backup/files/backup.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
BDIR=/home/backup
|
||||
SWIN=/tmp/s-win
|
||||
|
||||
[ -d "${BDIR}" ] || mkdir "${BDIR}"
|
||||
[ -d "${BDIR}" ] || mkdir "${BDIR}/s-win"
|
||||
[ -d "${SWIN}" ] || mkdir "${SWIN}"
|
||||
|
||||
mount -t cifs -o ro,vers=3.0,username=u-backup,password=Azerty1+ //s-win/commun "${SWIN}"
|
||||
if [ $? != 0 ] ; then
|
||||
echo "$0 : erreur montage ${SWIN}"
|
||||
exit 1
|
||||
fi
|
||||
rsync -av "${SWIN}/" "${BDIR}/s-win/commun"
|
||||
umount "${SWIN}"
|
||||
|
||||
|
||||
mount -t cifs -o ro,vers=3.0,username=u-backup,password=Azerty1+ //s-win/public "${SWIN}"
|
||||
if [ $? != 0 ] ; then
|
||||
echo "$0 : erreur montage"
|
||||
exit 2
|
||||
fi
|
||||
rsync -av "${SWIN}/" "${BDIR}/s-win/public"
|
||||
umount "${SWIN}"
|
||||
|
||||
exit 0
|
||||
|
@ -4,5 +4,6 @@
|
||||
name:
|
||||
- rsync
|
||||
- smbclient
|
||||
- cifs-utils
|
||||
state: present
|
||||
|
||||
|
Reference in New Issue
Block a user