Compare commits

...

17 Commits

Author SHA1 Message Date
36c0d92c9f recup sur s-adm de wordpress 2021-01-25 08:56:13 +01:00
64f43dfb53 rectification version wordpress 2021-01-20 10:22:24 +01:00
e0d25e598a ajout de la machine s-itil 2021-01-19 15:11:46 +01:00
693d088dab Ajout de README.md pour postfix 2021-01-18 11:25:11 +01:00
b6919b1e30 Ajout de README.md pour postfix 2021-01-18 11:21:38 +01:00
dd77793bda Ajout de README.md pour postfix 2021-01-18 11:15:39 +01:00
3a5ef6c05d Ajout de README.md pour postfix 2021-01-18 11:13:00 +01:00
tl
e8ed8cf37d correction bug 2021-01-18 11:08:24 +01:00
tl
f366b0c566 adapt bug 2021-01-18 10:53:11 +01:00
tl
9b287db7a5 ajout mariadb-server 2021-01-18 10:34:34 +01:00
tl
ccd153fbb6 adapt s-lb-web2 2021-01-18 10:23:06 +01:00
tl
105b85cc53 adaptation wordpress et mysql 2021-01-18 09:55:14 +01:00
ea24a4bda8 modif backup.sh 2021-01-18 09:36:22 +01:00
db1252d3b6 modif backup.sh 2021-01-18 09:18:52 +01:00
7383918973 modif backup.sh 2021-01-18 09:14:33 +01:00
8f7ad1e13a modif s-mon 2021-01-18 09:12:49 +01:00
3b178d0a52 modif du nom icinga-fk en icinga 2021-01-18 09:10:10 +01:00
35 changed files with 72 additions and 13 deletions

View File

@ -6,7 +6,7 @@
apt: name={{ item }} state=present
with_items:
- apache2
- mysql-server
- mariadb-server
- php-mysql
- php
- libapache2-mod-php

View File

@ -15,13 +15,13 @@ define hostgroup {
define hostgroup {
hostgroup_name debian-servers
alias Serveurs distant
members s-infra, s-proxy, r-int, r-ext, s-adm, s-test
members s-infra, s-proxy, r-int, r-ext, s-adm, s-test, s-itil
}
define hostgroup { 
hostgroup_name ssh-servers
alias acces SSH
members s-adm, s-infra, s-proxy, r-int, r-ext, localhost, s-test, gwsio2
members s-adm, s-infra, s-proxy, r-int, r-ext, localhost, s-test, gwsio2, s-itil
}
define hostgroup { 
@ -39,7 +39,7 @@ define hostgroup { 
define hostgroup {
hostgroup_name http-servers
alias serveurs-web
members localhost
members localhost, s-itil
}
#define hostgroup {
@ -69,6 +69,6 @@ define hostgroup{
define hostgroup{
hostgroup_name uptimegrp
alias uptimegrp
members s-infra, s-proxy, r-int, r-ext, s-adm, s-test
members s-infra, s-proxy, r-int, r-ext, s-adm, s-test, s-itil
}

View File

@ -0,0 +1,14 @@
# A simple configuration file for monitoring the local host
# This can serve as an example for configuring other servers;
# Custom services specific to this host are added here, but services
# defined in nagios2-common_services.cfg may also apply.
#
define host{
use generic-host ; Name of host template to use
host_name s-itil
alias debian-servers
address 172.16.0.9
parents r-int
}

40
roles/postfix/README.md Normal file
View File

@ -0,0 +1,40 @@
# Post-installation 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 moins sécurisé des applications** depuis son compte google
Désactiver un service puis vérifier ses mails (attendre 5 minutes entre chaque test)
```
tail -f /var/log/icinga/icinga.log pour vérifier l'envoi de l'email
```

12
roles/s-backup/files/backup.sh Normal file → Executable file
View File

@ -6,22 +6,22 @@ SWIN=/tmp/s-win
[ -d "${BDIR}" ] || mkdir "${BDIR}/s-win"
[ -d "${SWIN}" ] || mkdir "${SWIN}"
mount -t cifs -o ro,vers3.0,username=u-backup,password=Azerty1+ //s-win/commun "{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"
echo "$0 : erreur montage ${SWIN}"
exit 1
fi
rsync -av "${SWIN}"/ /home/backup/s-win/commun
rsync -av "${SWIN}/" "${BDIR}/s-win/commun"
umount "${SWIN}"
mount -t cifs -o ro,vers3.0,username=u-backup,password=Azerty1+ //s-win/public "${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}"/ /home/backup/s-win/public
umount "{SWIN}"
rsync -av "${SWIN}/" "${BDIR}/s-win/public"
umount "${SWIN}"
exit 0

View File

@ -0,0 +1,2 @@
depl_url: "http://s-adm.gsb.adm/gsbstore/"
depl_wordpress: "wordpress-5.6-fr_FR.tar.gz"

View File

@ -5,9 +5,11 @@
state: directory
- name: download and extract wordpress
unarchive:
src: http://depl/gsbstore/wordpress-5.3.2-fr_FR.tar.gz
src: "{{ depl_url }}/{{ depl_wordpress }}"
dest: /home/
remote_src: yes
owner: www-data
group: www-data
- name: Copy sample config file
command: mv /home/wordpress/wp-config-sample.php /home/wordpress/wp-config.php creates=/home/wordpress/wp-config.php

View File

@ -5,7 +5,7 @@
roles:
- base
- goss
- icinga-fk
- icinga
- postfix
- ssh-cli
- syslog

1
s-nas.retry Normal file
View File

@ -0,0 +1 @@
localhost