Compare commits
9 Commits
v0.0.3v-ps
...
v0.0.4d-ps
Author | SHA1 | Date | |
---|---|---|---|
5acca816af | |||
394a8d8cd8 | |||
ff03ee66a5 | |||
1e30fd87a9 | |||
924a11f843 | |||
83a3942900 | |||
0d2968b2c8 | |||
86afa7c616 | |||
00071b1c67 |
131
goss/s-fog.yaml
131
goss/s-fog.yaml
@ -1,68 +1,77 @@
|
|||||||
file:
|
file:
|
||||||
/tftpboot/default.ipxe:
|
/tftpboot/default.ipxe:
|
||||||
exists: true
|
exists: true
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
filetype: file
|
filetype: file
|
||||||
contains: []
|
contains: []
|
||||||
|
contents: null
|
||||||
package:
|
package:
|
||||||
apache2:
|
apache2:
|
||||||
installed: true
|
installed: true
|
||||||
versions:
|
versions:
|
||||||
- 2.4.57-2
|
- 2.4.56-1~deb11u2
|
||||||
isc-dhcp-server:
|
isc-dhcp-server:
|
||||||
installed: true
|
installed: true
|
||||||
versions:
|
versions:
|
||||||
- 4.4.3-P1-2
|
- 4.4.1-2.3+deb11u2
|
||||||
mariadb-server:
|
mariadb-server:
|
||||||
installed: true
|
installed: true
|
||||||
versions:
|
versions:
|
||||||
- 1:10.11.4-1~deb12u1
|
- 1:10.5.21-0+deb11u1
|
||||||
tftpd-hpa:
|
tftpd-hpa:
|
||||||
installed: true
|
installed: true
|
||||||
versions:
|
versions:
|
||||||
- 5.2+20150808-1.4
|
- 5.2+20150808-1.2
|
||||||
port:
|
port:
|
||||||
tcp:80:
|
tcp:80:
|
||||||
listening: true
|
listening: true
|
||||||
ip:
|
ip:
|
||||||
- 0.0.0.0
|
- 0.0.0.0
|
||||||
tcp:443:
|
tcp:443:
|
||||||
listening: true
|
listening: true
|
||||||
ip:
|
ip:
|
||||||
- 0.0.0.0
|
- 0.0.0.0
|
||||||
|
udp:67:
|
||||||
|
listening: true
|
||||||
|
ip:
|
||||||
|
- 0.0.0.0
|
||||||
|
udp:69:
|
||||||
|
listening: true
|
||||||
|
ip:
|
||||||
|
- 0.0.0.0
|
||||||
service:
|
service:
|
||||||
apache2:
|
apache2:
|
||||||
enabled: true
|
enabled: true
|
||||||
running: true
|
running: true
|
||||||
isc-dhcp-server:
|
isc-dhcp-server:
|
||||||
enabled: true
|
enabled: true
|
||||||
running: true
|
running: true
|
||||||
nfs-server:
|
nfs-server:
|
||||||
enabled: true
|
enabled: true
|
||||||
running: true
|
running: true
|
||||||
tftpd-hpa:
|
tftpd-hpa:
|
||||||
enabled: true
|
enabled: true
|
||||||
running: true
|
running: true
|
||||||
command:
|
command:
|
||||||
ping -c 4 192.168.99.99:
|
ping -c 4 192.168.99.99:
|
||||||
exit-status: 0
|
exit-status: 0
|
||||||
stdout:
|
stdout:
|
||||||
- 0% packet loss
|
- 0% packet loss
|
||||||
stderr: []
|
stderr: []
|
||||||
timeout: 10000
|
timeout: 10000
|
||||||
ping -c 4 google.fr:
|
ping -c 4 google.fr:
|
||||||
exit-status: 0
|
exit-status: 0
|
||||||
stdout:
|
stdout:
|
||||||
- 0% packet loss
|
- 0% packet loss
|
||||||
stderr: []
|
stderr: []
|
||||||
timeout: 10000
|
timeout: 10000
|
||||||
process:
|
process:
|
||||||
apache2:
|
apache2:
|
||||||
running: true
|
running: true
|
||||||
interface:
|
interface:
|
||||||
enp0s9:
|
enp0s9:
|
||||||
exists: true
|
exists: true
|
||||||
addrs:
|
addrs:
|
||||||
- 172.16.64.16/24
|
- 172.16.64.16/24
|
||||||
|
83
localhost,
83
localhost,
@ -1,83 +0,0 @@
|
|||||||
# Ce fichier viminfo a été généré par Vim 9.0.
|
|
||||||
# Vous pouvez l'éditer, mais soyez prudent.
|
|
||||||
|
|
||||||
# Viminfo version
|
|
||||||
|1,4
|
|
||||||
|
|
||||||
# 'encoding' dans lequel ce fichier a été écrit
|
|
||||||
*encoding=utf-8
|
|
||||||
|
|
||||||
|
|
||||||
# hlsearch on (H) or off (h):
|
|
||||||
~h
|
|
||||||
# Historique ligne de commande (chronologie décroissante) :
|
|
||||||
:q!
|
|
||||||
|2,0,1703236388,,"q!"
|
|
||||||
:x
|
|
||||||
|2,0,1703236381,,"x"
|
|
||||||
:x!
|
|
||||||
|2,0,1703236221,,"x!"
|
|
||||||
|
|
||||||
# Historique chaîne de recherche (chronologie décroissante) :
|
|
||||||
|
|
||||||
# Historique expression (chronologie décroissante) :
|
|
||||||
|
|
||||||
# Historique ligne de saisie (chronologie décroissante) :
|
|
||||||
|
|
||||||
# Historique Ligne de débogage (chronologie décroissante) :
|
|
||||||
|
|
||||||
# Registres :
|
|
||||||
""1 LINE 0
|
|
||||||
connection: local
|
|
||||||
|3,1,1,1,1,0,1703236374," connection: local"
|
|
||||||
"2 LINE 0
|
|
||||||
hosts: localhost
|
|
||||||
|3,0,2,1,1,0,1703236374," hosts: localhost"
|
|
||||||
|
|
||||||
# Marques dans le fichier :
|
|
||||||
'0 1 2 ~/tools/ansible/gsb2024/s-mon.yml
|
|
||||||
|4,48,1,2,1703236388,"~/tools/ansible/gsb2024/s-mon.yml"
|
|
||||||
'1 1 9 ~/tools/ansible/gsb2024/s-mon.yml
|
|
||||||
|4,49,1,9,1703236339,"~/tools/ansible/gsb2024/s-mon.yml"
|
|
||||||
'2 9 9 ~/tools/ansible/gsb2024/s-mon.yml
|
|
||||||
|4,50,9,9,1703236221,"~/tools/ansible/gsb2024/s-mon.yml"
|
|
||||||
'3 9 9 ~/tools/ansible/gsb2024/s-mon.yml
|
|
||||||
|4,51,9,9,1703236221,"~/tools/ansible/gsb2024/s-mon.yml"
|
|
||||||
'4 11 9 ~/tools/ansible/gsb2024/s-mon.yml
|
|
||||||
|4,52,11,9,1703236221,"~/tools/ansible/gsb2024/s-mon.yml"
|
|
||||||
'5 11 9 ~/tools/ansible/gsb2024/s-mon.yml
|
|
||||||
|4,53,11,9,1703236221,"~/tools/ansible/gsb2024/s-mon.yml"
|
|
||||||
'6 1 13 ~/tools/ansible/gsb2024/s-mon.yml
|
|
||||||
|4,54,1,13,1703236013,"~/tools/ansible/gsb2024/s-mon.yml"
|
|
||||||
'7 1 13 ~/tools/ansible/gsb2024/s-mon.yml
|
|
||||||
|4,55,1,13,1703236013,"~/tools/ansible/gsb2024/s-mon.yml"
|
|
||||||
'8 1 13 ~/tools/ansible/gsb2024/s-mon.yml
|
|
||||||
|4,56,1,13,1703236013,"~/tools/ansible/gsb2024/s-mon.yml"
|
|
||||||
'9 1 13 ~/tools/ansible/gsb2024/s-mon.yml
|
|
||||||
|4,57,1,13,1703236013,"~/tools/ansible/gsb2024/s-mon.yml"
|
|
||||||
|
|
||||||
# Liste de sauts (le plus récent en premier) :
|
|
||||||
-' 1 2 ~/tools/ansible/gsb2024/s-mon.yml
|
|
||||||
|4,39,1,2,1703236388,"~/tools/ansible/gsb2024/s-mon.yml"
|
|
||||||
-' 1 9 ~/tools/ansible/gsb2024/s-mon.yml
|
|
||||||
|4,39,1,9,1703236339,"~/tools/ansible/gsb2024/s-mon.yml"
|
|
||||||
-' 9 9 ~/tools/ansible/gsb2024/s-mon.yml
|
|
||||||
|4,39,9,9,1703236318,"~/tools/ansible/gsb2024/s-mon.yml"
|
|
||||||
-' 11 9 ~/tools/ansible/gsb2024/s-mon.yml
|
|
||||||
|4,39,11,9,1703236318,"~/tools/ansible/gsb2024/s-mon.yml"
|
|
||||||
-' 11 9 ~/tools/ansible/gsb2024/s-mon.yml
|
|
||||||
|4,39,11,9,1703236221,"~/tools/ansible/gsb2024/s-mon.yml"
|
|
||||||
-' 1 13 ~/tools/ansible/gsb2024/s-mon.yml
|
|
||||||
|4,39,1,13,1703236018,"~/tools/ansible/gsb2024/s-mon.yml"
|
|
||||||
-' 1 13 ~/tools/ansible/gsb2024/s-mon.yml
|
|
||||||
|4,39,1,13,1703236013,"~/tools/ansible/gsb2024/s-mon.yml"
|
|
||||||
|
|
||||||
# Historique des marques dans les fichiers (les plus récentes en premier) :
|
|
||||||
|
|
||||||
> ~/tools/ansible/gsb2024/s-mon.yml
|
|
||||||
* 1703236386 0
|
|
||||||
" 1 2
|
|
||||||
^ 9 10
|
|
||||||
. 2 0
|
|
||||||
+ 10 0
|
|
||||||
+ 2 0
|
|
@ -1,77 +0,0 @@
|
|||||||
# -*- mode: ruby -*-
|
|
||||||
# vi: set ft=ruby :
|
|
||||||
|
|
||||||
# All Vagrant configuration is done below. The "2" in Vagrant.configure
|
|
||||||
# configures the configuration version (we support older styles for
|
|
||||||
# backwards compatibility). Please don't change it unless you know what
|
|
||||||
# you're doing.
|
|
||||||
Vagrant.configure("2") do |config|
|
|
||||||
# The most common configuration options are documented and commented below.
|
|
||||||
# For a complete reference, please see the online documentation at
|
|
||||||
# https://docs.vagrantup.com.
|
|
||||||
|
|
||||||
# Every Vagrant development environment requires a box. You can search for
|
|
||||||
# boxes at https://vagrantcloud.com/search.
|
|
||||||
config.vm.box = "debian/buster64"
|
|
||||||
config.vm.hostname = "s-adm"
|
|
||||||
config.vm.define "s-adm"
|
|
||||||
config.vm.provider :virtualbox do |vb|
|
|
||||||
vb.name = "s-adm"
|
|
||||||
end
|
|
||||||
# Disable automatic box update checking. If you disable this, then
|
|
||||||
# boxes will only be checked for updates when the user runs
|
|
||||||
# `vagrant box outdated`. This is not recommended.
|
|
||||||
# config.vm.box_check_update = false
|
|
||||||
|
|
||||||
# Create a forwarded port mapping which allows access to a specific port
|
|
||||||
# within the machine from a port on the host machine. In the example below,
|
|
||||||
# accessing "localhost:8080" will access port 80 on the guest machine.
|
|
||||||
# NOTE: This will enable public access to the opened port
|
|
||||||
# config.vm.network "forwarded_port", guest: 80, host: 8080
|
|
||||||
|
|
||||||
# Create a forwarded port mapping which allows access to a specific port
|
|
||||||
# within the machine from a port on the host machine and only allow access
|
|
||||||
# via 127.0.0.1 to disable public access
|
|
||||||
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
|
|
||||||
|
|
||||||
# Create a private network, which allows host-only access to the machine
|
|
||||||
# using a specific IP.
|
|
||||||
config.vm.network "public_network", ip: "192.168.1.91"
|
|
||||||
config.vm.network "private_network", ip: "192.168.99.99"
|
|
||||||
|
|
||||||
# Create a public network, which generally matched to bridged network.
|
|
||||||
# Bridged networks make the machine appear as another physical device on
|
|
||||||
# your network.
|
|
||||||
# config.vm.network "public_network"
|
|
||||||
|
|
||||||
# Share an additional folder to the guest VM. The first argument is
|
|
||||||
# the path on the host to the actual folder. The second argument is
|
|
||||||
# the path on the guest to mount the folder. And the optional third
|
|
||||||
# argument is a set of non-required options.
|
|
||||||
# config.vm.synced_folder "../data", "/vagrant_data"
|
|
||||||
|
|
||||||
# Provider-specific configuration so you can fine-tune various
|
|
||||||
# backing providers for Vagrant. These expose provider-specific options.
|
|
||||||
# Example for VirtualBox:
|
|
||||||
#
|
|
||||||
# config.vm.provider "virtualbox" do |vb|
|
|
||||||
# # Display the VirtualBox GUI when booting the machine
|
|
||||||
# vb.gui = true
|
|
||||||
#
|
|
||||||
# # Customize the amount of memory on the VM:
|
|
||||||
# vb.memory = "1024"
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
# View the documentation for the provider you are using for more
|
|
||||||
# information on available options.
|
|
||||||
|
|
||||||
# Enable provisioning with a shell script. Additional provisioners such as
|
|
||||||
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
|
|
||||||
# documentation for more information about their specific syntax and use.
|
|
||||||
config.vm.provision "shell", inline: <<-SHELL
|
|
||||||
apt-get update
|
|
||||||
apt-get upgrade
|
|
||||||
apt-get install -y vim wget curl
|
|
||||||
# apt-get install -y apache2
|
|
||||||
SHELL
|
|
||||||
end
|
|
0
pre/gsbboot
Normal file → Executable file
0
pre/gsbboot
Normal file → Executable file
38
pre/inst-depl
Normal file → Executable file
38
pre/inst-depl
Normal file → Executable file
@ -29,12 +29,12 @@ WPREL=6.4.2
|
|||||||
#v6.1.1 le 17/01/2023
|
#v6.1.1 le 17/01/2023
|
||||||
str5="wget -nc -4 https://fr.wordpress.org/latest-fr_FR.tar.gz -O wordpress-6.4.2-fr_FR.tar.gz"
|
str5="wget -nc -4 https://fr.wordpress.org/latest-fr_FR.tar.gz -O wordpress-6.4.2-fr_FR.tar.gz"
|
||||||
|
|
||||||
str6="curl -L https://github.com/goss-org/goss/releases/latest/download/goss-linux-amd64 -o goss"
|
str6="wget -nc -4 https://github.com/goss-org/goss/releases/latest/download/goss-linux-amd64 -O goss"
|
||||||
|
|
||||||
str7="curl -L https://github.com/goss-org/goss/releases/latest/download/dgoss -o dgoss"
|
str7="wget -nc -4 https://github.com/goss-org/goss/releases/latest/download/dgoss -O dgoss"
|
||||||
|
|
||||||
#GESTSUPREL=3.2.30
|
#GESTSUPREL=3.2.30
|
||||||
#str8="wget -nc 'https://gestsup.fr/index.php?page=download&channel=stable&version=${GESTSUPREL}&type=gestsup' -O gestsup_${GESTSUPREL}.zip"
|
#str8="wget -nc -4 'https://gestsup.fr/index.php?page=download&channel=stable&version=${GESTSUPREL}&type=gestsup' -O gestsup_${GESTSUPREL}.zip"
|
||||||
str8="wget -nc -4 'https://gestsup.fr/index.php?page=download&channel=stable&version=3.2.30&type=gestsup' -O gestsup_3.2.30.zip"
|
str8="wget -nc -4 'https://gestsup.fr/index.php?page=download&channel=stable&version=3.2.30&type=gestsup' -O gestsup_3.2.30.zip"
|
||||||
|
|
||||||
#METRICBEAT ET FILEBEAT
|
#METRICBEAT ET FILEBEAT
|
||||||
@ -59,7 +59,7 @@ ${str7}
|
|||||||
|
|
||||||
chmod +x ./goss ./dgoss
|
chmod +x ./goss ./dgoss
|
||||||
|
|
||||||
curl -L https://get.docker.com -o getdocker.sh
|
wget -nc -4 https://get.docker.com -O getdocker.sh
|
||||||
chmod +x ./getdocker.sh
|
chmod +x ./getdocker.sh
|
||||||
|
|
||||||
wget -nc -4 https://github.com/FiloSottile/mkcert/releases/download/v1.4.4/mkcert-v1.4.4-linux-amd64 -O mkcert
|
wget -nc -4 https://github.com/FiloSottile/mkcert/releases/download/v1.4.4/mkcert-v1.4.4-linux-amd64 -O mkcert
|
||||||
@ -77,8 +77,36 @@ EOT
|
|||||||
|
|
||||||
cat "${STOREREP}/getall"
|
cat "${STOREREP}/getall"
|
||||||
|
|
||||||
cd "${STOREREP}" || exit 2
|
cd "${STOREREP}" || exit 2
|
||||||
bash getall
|
bash getall
|
||||||
cp goss /usr/local/bin
|
cp goss /usr/local/bin
|
||||||
|
|
||||||
|
(cat <<'EOT' > "${STOREREP}/inst1"
|
||||||
|
#!/bin/bash
|
||||||
|
if [[ -z ${HOST+x} ]]; then
|
||||||
|
echo "erreur : variable HOST indefinie"
|
||||||
|
echo " HOST : adresse serveur deploiement"
|
||||||
|
echo "export HOST=s-xyzt ; ./$0"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
hostname=$(hostname)
|
||||||
|
echo "${HOST}" > /etc/hostname
|
||||||
|
hostnamectl set-hostname "${HOST}"
|
||||||
|
sed -i "s/${hostname}/${HOST}/g" /etc/hosts
|
||||||
|
echo "vous pouvez redemarrer ..."
|
||||||
|
EOT
|
||||||
|
)
|
||||||
|
|
||||||
|
(cat <<'EOT' > "${STOREREP}/inst2"
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
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
|
||||||
|
EOT
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -o errexit
|
|
||||||
set -o pipefail
|
|
||||||
GITUSR=gitgsb
|
|
||||||
GITPRJ=gsb
|
|
||||||
apt update && apt upgrade
|
|
||||||
apt install -y apache2 git
|
|
||||||
getent passwd "${GITUSR}" >> /dev/null
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
echo "creation utilisateur "${GITUSR}" ..."
|
|
||||||
/sbin/useradd -m -d /home/"${GITUSR}" -s /bin/bash "${GITUSR}"
|
|
||||||
echo "${GITUSR}:${GITUSR}" | /sbin/chpasswd
|
|
||||||
else
|
|
||||||
echo "utilisateur "${GITUSR}" existant..."
|
|
||||||
fi
|
|
||||||
su -c "git init --share --bare /home/${GITUSR}/${GITPRJ}.git" "${GITUSR}"
|
|
||||||
su -c "cd ${GITPRJ}.git/.git/hooks && mv post-update.sample post-update" "${GITUSR}"
|
|
||||||
[[ -h /var/www/html/"${GITPRJ}".git ]]|| ln -s /home/"${GITUSR}"/"${GITPRJ}".git /var/www/html/"${GITPRJ}".git
|
|
||||||
[[ -d /var/www/html/gsbstore ]]|| mkdir /var/www/html/gsbstore
|
|
||||||
|
|
||||||
(cat <<EOT > /var/www/html/gsbstore/getall
|
|
||||||
|
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o pipefail
|
|
||||||
|
|
||||||
GLPIREL=9.4.5
|
|
||||||
wget -nc https://github.com/glpi-project/glpi/releases/download/\${GLPIREL}/glpi-\${GLPIREL}.tgz
|
|
||||||
|
|
||||||
FIREL=9.4+2.4
|
|
||||||
wget -nc -O fusioninventory-glpi\${FIREL}.tag.gz https://github.com/fusioninventory/fusioninventory-for-glpi/archive/glpi\${FIREL}.tar.gz
|
|
||||||
#https://github.com/fusioninventory/fusioninventory-for-glpi/archive/glpi9.4+2.4.tar.g
|
|
||||||
|
|
||||||
FIAGREL=2.5.2
|
|
||||||
wget -nc https://github.com/fusioninventory/fusioninventory-agent/releases/download/\${FIAGREL}/fusioninventory-agent_windows-x64_\${FIAGREL}.exe
|
|
||||||
|
|
||||||
wget -nc https://github.com/fusioninventory/fusioninventory-agent/releases/download/\$FIAGREL/fusioninventory-agent_windows-x86_\${FIAGREL}.exe
|
|
||||||
|
|
||||||
FOGREL=1.5.7
|
|
||||||
wget -nc https://github.com/FOGProject/fogproject/archive/\${FOGREL}.tar.gz -O fogproject-\${FOGREL}.tar.gz
|
|
||||||
|
|
||||||
wget -nc https://fr.wordpress.org/wordpress-5.3.2-fr_FR.tar.gz
|
|
||||||
|
|
||||||
EOT
|
|
||||||
)
|
|
||||||
cat /var/www/html/gsbstore/getall
|
|
||||||
|
|
8
pre/pull-config
Normal file → Executable file
8
pre/pull-config
Normal file → Executable file
@ -14,15 +14,15 @@ dir=/root/tools/ansible
|
|||||||
|
|
||||||
cd "${dir}" || exit 1
|
cd "${dir}" || exit 1
|
||||||
|
|
||||||
hostname > hosts
|
|
||||||
if [[ $# == 1 ]] ; then
|
if [[ $# == 1 ]] ; then
|
||||||
opt=$1
|
opt=$1
|
||||||
fi
|
fi
|
||||||
if [[ "${opt}" == '-l' ]] ; then
|
if [[ "${opt}" == '-l' ]] ; then
|
||||||
cd "${dir}/${prj}" || exit 2
|
cd "${dir}/${prj}" || exit 2
|
||||||
ansible-playbook -i localhost, -c local "$(hostname).yml"
|
echo "Execution locale ...."
|
||||||
|
ansible-playbook -i localhost, -c local "$(hostname).yml"
|
||||||
else
|
else
|
||||||
ansible-pull -i "${dir}/hosts" -C main -U "${UREP}"
|
ansible-pull -i "$(hostname)," -U "${UREP}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
18
pull-config
18
pull-config
@ -1,7 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
dir=/root/tools/ansible
|
||||||
|
prj=gsb2024
|
||||||
|
opt=""
|
||||||
|
|
||||||
if [ -z ${UREP+x} ]; then
|
if [ -z ${UREP+x} ]; then
|
||||||
UREP=https://gitea.lyc-lecastel.fr/gsb/gsb2024.git
|
UREP=https://gitea.lyc-lecastel.fr/gsb/gsb2024.git
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dir=/root/tools/ansible
|
dir=/root/tools/ansible
|
||||||
@ -10,7 +14,15 @@ dir=/root/tools/ansible
|
|||||||
|
|
||||||
cd "${dir}" || exit 1
|
cd "${dir}" || exit 1
|
||||||
|
|
||||||
hostname > hosts
|
if [[ $# == 1 ]] ; then
|
||||||
ansible-pull -i "${dir}/hosts" -C main -U "${UREP}"
|
opt=$1
|
||||||
|
fi
|
||||||
|
if [[ "${opt}" == '-l' ]] ; then
|
||||||
|
cd "${dir}/${prj}" || exit 2
|
||||||
|
echo "Execution locale ...."
|
||||||
|
ansible-playbook -i localhost, -c local "$(hostname).yml"
|
||||||
|
else
|
||||||
|
ansible-pull -i "$(hostname)," -U "${UREP}"
|
||||||
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -120,7 +120,7 @@ subnet 172.16.65.0 netmask 255.255.255.0 {
|
|||||||
#DHCP pour le réseau USER
|
#DHCP pour le réseau USER
|
||||||
|
|
||||||
subnet 172.16.64.0 netmask 255.255.255.0 {
|
subnet 172.16.64.0 netmask 255.255.255.0 {
|
||||||
range 172.16.64.20 172.16.64.120;
|
range 172.16.64.100 172.16.64.150;
|
||||||
option domain-name-servers 172.16.0.1 ;
|
option domain-name-servers 172.16.0.1 ;
|
||||||
option routers 172.16.64.254;
|
option routers 172.16.64.254;
|
||||||
option broadcast-address 172.16.64.255;
|
option broadcast-address 172.16.64.255;
|
||||||
|
@ -3,18 +3,17 @@
|
|||||||
## Find more information about this file in the FOG Project wiki:
|
## Find more information about this file in the FOG Project wiki:
|
||||||
## https://wiki.fogproject.org/wiki/index.php?title=.fogsettings
|
## https://wiki.fogproject.org/wiki/index.php?title=.fogsettings
|
||||||
## Version: 1.5.10
|
## Version: 1.5.10
|
||||||
## Install time: jeu. 11 janv. 2024
|
## Install time: Mon Jan 15 23:16:31 2024
|
||||||
## Install time: jeu. 11 janv. 2024 11:41:05
|
ipaddress='172.16.0.16'
|
||||||
ipaddress='172.16.64.16'
|
|
||||||
copybackold='0'
|
copybackold='0'
|
||||||
interface='enp0s9'
|
interface='enp0s9'
|
||||||
submask='255.255.255.0'
|
submask='255.255.255.0'
|
||||||
hostname='s-fog.gsb.lan'
|
hostname='s-fog'
|
||||||
routeraddress='172.16.64.254'
|
routeraddress='172.16.64.254'
|
||||||
plainrouter='172.16.64.254'
|
plainrouter='172.16.64.254'
|
||||||
dnsaddress='172.16.0.1'
|
dnsaddress='172.16.0.1'
|
||||||
username='fogproject'
|
username='fogproject'
|
||||||
password='/7ElC1OHrP47EN2w59xl'
|
password='0lEyBKxcrQxseHLB#Cbg'
|
||||||
osid='2'
|
osid='2'
|
||||||
osname='Debian'
|
osname='Debian'
|
||||||
dodhcp='y'
|
dodhcp='y'
|
||||||
@ -23,27 +22,27 @@ dhcpd='isc-dhcp-server'
|
|||||||
blexports='1'
|
blexports='1'
|
||||||
installtype='N'
|
installtype='N'
|
||||||
snmysqluser='fogmaster'
|
snmysqluser='fogmaster'
|
||||||
snmysqlpass='HHO5vSGqFiHE_9d2lja3'
|
snmysqlpass='DQG@4PU31F9vOE4bX6V2'
|
||||||
snmysqlhost='localhost'
|
snmysqlhost='localhost'
|
||||||
mysqldbname='fog'
|
mysqldbname='fog'
|
||||||
installlang='1'
|
installlang='1'
|
||||||
storageLocation='/images'
|
storageLocation='/images'
|
||||||
fogupdateloaded=1
|
fogupdateloaded=1
|
||||||
docroot='/var/www/'
|
docroot='/var/www/html/'
|
||||||
webroot='/fog/'
|
webroot='/fog/'
|
||||||
caCreated='yes'
|
caCreated='yes'
|
||||||
httpproto='https'
|
httpproto='https'
|
||||||
startrange='172.16.64.10'
|
startrange='172.16.64.120'
|
||||||
endrange='172.16.64.254'
|
endrange='172.16.64.140'
|
||||||
#bootfilename='undionly.kpxe'
|
bootfilename='undionly.kpxe'
|
||||||
packages='apache2 bc build-essential cpp curl g++ gawk gcc genisoimage gettext git gzip htmldoc isc-dhcp-server isolinux lftp libapache2-mod-php libc6 libcurl4 liblzma-dev m4 mariadb-client mariadb-server net-tools nfs-kernel-server openssh-server php php-bcmath php-cli php-curl php-fpm php-gd php-intl php-json php-ldap php-mbstring php-mysql tar tftpd-hpa tftp-hpa unzip vsftpd wget zlib1g'
|
packages='apache2 bc build-essential cpp curl g++ gawk gcc genisoimage gettext git gzip htmldoc isc-dhcp-server isolinux lftp libapache2-mod-php libc6 libcurl4 liblzma-dev m4 mariadb-client mariadb-server net-tools nfs-kernel-server openssh-server php php-bcmath php-cli php-curl php-fpm php-gd php-intl php-json php-ldap php-mbstring php-mysql tar tftp-hpa tftpd-hpa unzip vsftpd wget zlib1g'
|
||||||
noTftpBuild=''
|
noTftpBuild=''
|
||||||
tftpAdvOpts=''
|
tftpAdvOpts=''
|
||||||
sslpath='/opt/fog/snapins/ssl/'
|
sslpath='/opt/fog/snapins/ssl/'
|
||||||
backupPath='/home/'
|
#backupPath='/home/'
|
||||||
armsupport='0'
|
armsupport='0'
|
||||||
php_ver='7.4'
|
php_ver='7.4'
|
||||||
#php_verAdds='-7.4'
|
|
||||||
sslprivkey='/opt/fog/snapins/ssl//.srvprivate.key'
|
sslprivkey='/opt/fog/snapins/ssl//.srvprivate.key'
|
||||||
sendreports='Y'
|
sendreports='N'
|
||||||
## End of FOG Settings
|
## End of FOG Settings
|
||||||
|
|
||||||
|
49
roles/fog/files/fogsettings.old
Normal file
49
roles/fog/files/fogsettings.old
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
## Start of FOG Settings
|
||||||
|
## Created by the FOG Installer
|
||||||
|
## Find more information about this file in the FOG Project wiki:
|
||||||
|
## https://wiki.fogproject.org/wiki/index.php?title=.fogsettings
|
||||||
|
## Version: 1.5.10
|
||||||
|
## Install time: jeu. 11 janv. 2024
|
||||||
|
## Install time: jeu. 11 janv. 2024 11:41:05
|
||||||
|
ipaddress='172.16.64.16'
|
||||||
|
copybackold='0'
|
||||||
|
interface='enp0s9'
|
||||||
|
submask='255.255.255.0'
|
||||||
|
hostname='s-fog.gsb.lan'
|
||||||
|
routeraddress='172.16.64.254'
|
||||||
|
plainrouter='172.16.64.254'
|
||||||
|
dnsaddress='172.16.0.1'
|
||||||
|
username='fogproject'
|
||||||
|
password='/7ElC1OHrP47EN2w59xl'
|
||||||
|
osid='2'
|
||||||
|
osname='Debian'
|
||||||
|
dodhcp='y'
|
||||||
|
bldhcp='1'
|
||||||
|
dhcpd='isc-dhcp-server'
|
||||||
|
blexports='1'
|
||||||
|
installtype='N'
|
||||||
|
snmysqluser='fogmaster'
|
||||||
|
snmysqlpass='HHO5vSGqFiHE_9d2lja3'
|
||||||
|
snmysqlhost='localhost'
|
||||||
|
mysqldbname='fog'
|
||||||
|
installlang='1'
|
||||||
|
storageLocation='/images'
|
||||||
|
fogupdateloaded=1
|
||||||
|
docroot='/var/www/'
|
||||||
|
webroot='/fog/'
|
||||||
|
caCreated='yes'
|
||||||
|
httpproto='https'
|
||||||
|
startrange='172.16.64.10'
|
||||||
|
endrange='172.16.64.254'
|
||||||
|
#bootfilename='undionly.kpxe'
|
||||||
|
packages='apache2 bc build-essential cpp curl g++ gawk gcc genisoimage gettext git gzip htmldoc isc-dhcp-server isolinux lftp libapache2-mod-php libc6 libcurl4 liblzma-dev m4 mariadb-client mariadb-server net-tools nfs-kernel-server openssh-server php php-bcmath php-cli php-curl php-fpm php-gd php-intl php-json php-ldap php-mbstring php-mysql tar tftpd-hpa tftp-hpa unzip vsftpd wget zlib1g'
|
||||||
|
noTftpBuild=''
|
||||||
|
tftpAdvOpts=''
|
||||||
|
sslpath='/opt/fog/snapins/ssl/'
|
||||||
|
backupPath='/home/'
|
||||||
|
armsupport='0'
|
||||||
|
php_ver='7.4'
|
||||||
|
#php_verAdds='-7.4'
|
||||||
|
sslprivkey='/opt/fog/snapins/ssl//.srvprivate.key'
|
||||||
|
sendreports='Y'
|
||||||
|
## End of FOG Settings
|
51
roles/fog/files/fogsettings1
Normal file
51
roles/fog/files/fogsettings1
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
## Start of FOG Settings
|
||||||
|
## Created by the FOG Installer
|
||||||
|
## Find more information about this file in the FOG Project wiki:
|
||||||
|
## https://wiki.fogproject.org/wiki/index.php?title=.fogsettings
|
||||||
|
## Version: 1.5.10
|
||||||
|
## Install time: Mon Jan 15 23:16:31 2024
|
||||||
|
ipaddress='192.168.56.10'
|
||||||
|
copybackold='0'
|
||||||
|
interface='eth2'
|
||||||
|
submask='255.255.255.0'
|
||||||
|
hostname='fog'
|
||||||
|
routeraddress='192.168.1.1'
|
||||||
|
plainrouter='192.168.1.1'
|
||||||
|
dnsaddress='192.168.1.1'
|
||||||
|
username='fogproject'
|
||||||
|
password='0lEyBKxcrQxseHLB#Cbg'
|
||||||
|
osid='2'
|
||||||
|
osname='Debian'
|
||||||
|
dodhcp='y'
|
||||||
|
bldhcp='1'
|
||||||
|
dhcpd='isc-dhcp-server'
|
||||||
|
blexports='1'
|
||||||
|
installtype='N'
|
||||||
|
snmysqluser='fogmaster'
|
||||||
|
snmysqlpass='DQG@4PU31F9vOE4bX6V2'
|
||||||
|
snmysqlhost='localhost'
|
||||||
|
mysqldbname='fog'
|
||||||
|
installlang='1'
|
||||||
|
storageLocation='/images'
|
||||||
|
fogupdateloaded=1
|
||||||
|
docroot='/var/www/html/'
|
||||||
|
webroot='/fog/'
|
||||||
|
caCreated='yes'
|
||||||
|
httpproto='https'
|
||||||
|
startrange='192.168.56.10'
|
||||||
|
endrange='192.168.56.254'
|
||||||
|
packages='apache2 bc build-essential cpp curl g++ gawk gcc genisoimage gettext git gzip htmldoc i
|
||||||
|
sc-dhcp-server isolinux lftp libapache2-mod-php libc6 libcurl4 liblzma-dev m4 mariadb-client mari
|
||||||
|
adb-server net-tools nfs-kernel-server openssh-server php php-bcmath php-cli php-curl php-fpm php
|
||||||
|
-gd php-intl php-json php-ldap php-mbstring php-mysql tar tftp-hpa tftpd-hpa unzip vsftpd wget zl
|
||||||
|
ib1g '
|
||||||
|
noTftpBuild=''
|
||||||
|
tftpAdvOpts=''
|
||||||
|
sslpath='/opt/fog/snapins/ssl/'
|
||||||
|
backupPath='/home/'
|
||||||
|
armsupport='0'
|
||||||
|
php_ver='7.4'
|
||||||
|
sslprivkey='/opt/fog/snapins/ssl//.srvprivate.key'
|
||||||
|
sendreports='N'
|
||||||
|
## End of FOG Settings
|
||||||
|
|
@ -27,23 +27,28 @@
|
|||||||
- vsftpd
|
- vsftpd
|
||||||
- wget
|
- wget
|
||||||
|
|
||||||
|
- name: creation /root/tmp
|
||||||
|
file:
|
||||||
|
path: /root/tmp
|
||||||
|
state: directory
|
||||||
|
|
||||||
- name: fichier config fogsettings
|
- name: fichier config fogsettings
|
||||||
copy:
|
copy:
|
||||||
src: fogsettings
|
src: fogsettings
|
||||||
dest: /tmp/
|
dest: /root/tmp/
|
||||||
|
|
||||||
- name: Récupération archive d'installation Fog
|
- name: Récupération archive d'installation Fog
|
||||||
get_url:
|
get_url:
|
||||||
url: "{{ depl_url }}/{{ depl_fog }}"
|
url: "{{ depl_url }}/{{ depl_fog }}"
|
||||||
dest: "/tmp/"
|
dest: "/root/tmp/"
|
||||||
|
|
||||||
- name: Décompression de l'archive
|
- name: Décompression de l'archive
|
||||||
ansible.builtin.unarchive:
|
ansible.builtin.unarchive:
|
||||||
src: "/tmp/{{ depl_fog }}"
|
src: "/root/tmp/{{ depl_fog }}"
|
||||||
dest: "/tmp/"
|
dest: "/root/tmp/"
|
||||||
|
|
||||||
#- name: Exécution du script d'installation Fog
|
- name: Exécution du script d'installation Fog
|
||||||
# ansible.builtin.shell: sudo bash /tmp/fogproject-1.5.10/bin/installfog.sh --recreate-keys -f /tmp/fogsettings -y
|
ansible.builtin.shell: sudo bash /root/tmp/fogproject-1.5.10/bin/installfog.sh --recreate-keys -f /root/tmp/fogsettings -y
|
||||||
# args:
|
args:
|
||||||
# chdir: "/tmp/fogproject-1.5.10/"
|
chdir: "/root/tmp/fogproject-1.5.10/"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user