Compare commits
6 Commits
v0.0.3f-ps
...
v0.0.3k-fr
Author | SHA1 | Date | |
---|---|---|---|
045af9bea2 | |||
6b10b981f4 | |||
3811e2df5c | |||
27aad0dcb5 | |||
c03c066d41 | |||
beca7dbdcc |
@ -90,8 +90,8 @@ bash chname <nouveau_nom_de_machine>` , puis redémarrer
|
||||
cd gsb2024/pre
|
||||
bash inst-depl
|
||||
cd /root/tools/ansible/gsb2024/pre
|
||||
bash gsbboot
|
||||
cd .. ; bash pull-config
|
||||
DEPL=192.168.99.99 bash gsbboot
|
||||
cd ../.. ; bash pull-config
|
||||
```
|
||||
- redémarrer
|
||||
- la machine **s-adm** doit etre opérationnelle
|
||||
@ -121,8 +121,7 @@ mkdir -p tools/ansible ; cd tools/ansible
|
||||
git clone https://gitea.lyc-lecastel.fr/gsb/gsb2024.git
|
||||
cd gsb2024/pre
|
||||
DEPL=192.168.99.99 bash gsbboot
|
||||
cd ../..
|
||||
bash pull-config
|
||||
cd ../.. ; bash pull-config
|
||||
```
|
||||
|
||||
#### Etape 3
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
Ce role a pour objectif d'installer et d'éditer les fichiers de configuration de systemd journal remote afin que les machines lançant ce rôle puissent recevoir les logs des autres machine du parc.
|
||||
|
||||
## Opérations réaliser par le role:
|
||||
## Opérations réalisées par le role:
|
||||
Le role réalise les opération suivante:
|
||||
* installation du paquet **systemd-journal-remote**.
|
||||
* Démarrage et activation (au démarrage) du service **systemd-journal-remote.socket.
|
||||
|
@ -18,25 +18,19 @@
|
||||
state: present
|
||||
|
||||
- name: Enable Zabbix agent service
|
||||
systemd:
|
||||
service:
|
||||
name: zabbix-agent
|
||||
state: restarted
|
||||
enabled: yes
|
||||
|
||||
- name: Rm package
|
||||
file:
|
||||
path: "/tmp/zabbix-release_6.4-1+debian12_all.deb"
|
||||
state: absent
|
||||
|
||||
- name: config
|
||||
template:
|
||||
src: zabbix_agentd.conf.temp
|
||||
dest: /etc/zabbix/zabbix_agentd.conf
|
||||
vars:
|
||||
PidFile: "/run/zabbix/zabbix_agentd.pid"
|
||||
LogFile: "/var/log/zabbix/zabbix_agentd.log"
|
||||
LogFileSize: "0"
|
||||
Server: "127.0.0.1"
|
||||
ServerActive: "192.168.99.8"
|
||||
Hostname: "{{ ansible_hostname }}"
|
||||
Include: "/etc/zabbix/zabbix_agentd.d/*.conf"
|
||||
- name: Replace Zabbix agent config
|
||||
replace:
|
||||
path: /etc/zabbix/zabbix_agentd.conf
|
||||
regexp: '{{ item.regexp }}'
|
||||
replace: '{{ item.replace }}'
|
||||
backup: true
|
||||
loop:
|
||||
- { regexp: '^(Server\s*=\s*).*$', replace: 'Server = 127.0.0.1' }
|
||||
- { regexp: '^(ServerActive\s*=\s*).*$', replace: 'ServerActive = 192.168.99.8' }
|
||||
- { regexp: '^(Hostname\s*=\s*).*$', replace: 'Hostname = {{ ansible_hostname }}' }
|
||||
- { regexp: '^(Include\s*=\s*).*$', replace: 'Include = /etc/zabbix/zabbix_agentd.d/*.conf' }
|
||||
|
@ -1,7 +0,0 @@
|
||||
PidFile={{ PidFile }}
|
||||
LogFile={{ LogFile }}
|
||||
LogFileSize={{ LogFileSize }}
|
||||
Server={{ Server }}
|
||||
ServerActive={{ ServerActive }}
|
||||
Hostname={{ Hostname }}
|
||||
Include={{ Include }}
|
@ -8,7 +8,7 @@
|
||||
- dnsmasq
|
||||
- squid
|
||||
# - local-store
|
||||
# - zabbix-cli
|
||||
# #- zabbix-cli
|
||||
## - syslog-cli
|
||||
- post
|
||||
# - goss
|
||||
|
@ -8,7 +8,7 @@
|
||||
- appli
|
||||
- ssh-cli
|
||||
# - syslog-cli
|
||||
- zabbix-cli
|
||||
#- zabbix-cli
|
||||
- ssl-apache
|
||||
- post
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
- base
|
||||
- goss
|
||||
# - proxy3
|
||||
- zabbix-cli
|
||||
#- zabbix-cli
|
||||
# - ssh-cli
|
||||
# - syslog-cli
|
||||
- smb-backup
|
||||
|
@ -4,7 +4,7 @@
|
||||
# include: config.yml
|
||||
roles:
|
||||
- base
|
||||
- zabbix-cli
|
||||
#- zabbix-cli
|
||||
- goss
|
||||
- dns-master
|
||||
- webautoconf
|
||||
|
@ -6,7 +6,7 @@
|
||||
- base
|
||||
- goss
|
||||
- squid
|
||||
- zabbix-cli
|
||||
#- zabbix-cli
|
||||
- ssh-cli
|
||||
# - syslog-cli
|
||||
- post
|
||||
|
30
scripts/mkvm
30
scripts/mkvm
@ -1,19 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkvmrelease="v1.3.1"
|
||||
mkvmrelease="v1.3.2"
|
||||
|
||||
ovarelease="2023c"
|
||||
ovafogrelease="2024a"
|
||||
#ovafile="$HOME/Téléchargements/debian-bullseye-gsb-${ovarelease}.ova"
|
||||
ovafile="$HOME/Téléchargements/debian-bookworm-gsb-${ovarelease}.ova"
|
||||
ovafilefog="$HOME/Téléchargements/debian-bullseye-gsb-${ovafogrelease}.ova"
|
||||
startmode=0
|
||||
deletemode=0
|
||||
|
||||
usage () {
|
||||
echo "$0 - version ${mkvmrelease} - Ova version ${ovarelease}"
|
||||
echo "$0 : creation VM et parametrage interfaces"
|
||||
echo "usage : $0 [-r] <s-adm|s-infra|r-int|r-ext|s-proxy|s-mon|s-appli|s-backup|s-itil|s-ncx|s-fog>"
|
||||
echo " option -r : efface vm existante avant creation nouvelle"
|
||||
echo "usage : $0 [-r] [-s] <s-adm|s-infra|r-int|r-ext|s-proxy|s-mon|s-appli|s-backup|s-itil|s-ncx|s-fog>"
|
||||
echo " option -r : efface VM existante avant creation nouvelle"
|
||||
echo " option -s : start VM apres creation"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@ -59,12 +61,19 @@ fi
|
||||
if [[ $1 == "--help" ]] || [[ $1 == "-h" ]] || [[ $1 == "-V" ]] ; then
|
||||
usage
|
||||
fi
|
||||
if [[ $1 == "-r" ]] ; then
|
||||
deletemode=1
|
||||
shift
|
||||
fi
|
||||
vm="$1"
|
||||
|
||||
while [[ -n "$1" ]] ; do
|
||||
if [[ "$1" == "-s" ]] ; then
|
||||
startmode=1
|
||||
shift
|
||||
elif [[ "$1" == "-r" ]] ; then
|
||||
deletemode=1
|
||||
shift
|
||||
else
|
||||
parm=$1
|
||||
shift
|
||||
fi
|
||||
done
|
||||
vm="${parm}"
|
||||
create_vm "${vm}"
|
||||
if [[ "${vm}" == "s-adm" ]] ; then
|
||||
bash addint.s-adm
|
||||
@ -123,3 +132,6 @@ else
|
||||
echo "$0 : vm ${vm} non prevue "
|
||||
exit 2
|
||||
fi
|
||||
if [[ $startmode == 1 ]] ; then
|
||||
vboxmanage startvm "${vm}" --type headless
|
||||
fi
|
||||
|
Reference in New Issue
Block a user