modif fog

This commit is contained in:
Cerena Hostains 2024-01-11 15:22:20 +01:00
parent ae044169f6
commit 5ba5919b14
4 changed files with 44 additions and 64 deletions

13
install-fog.yml Normal file
View File

@ -0,0 +1,13 @@
---
- hosts: localhost
connection: local
roles:
# - base
# - goss
# - dhcp-fog
#- ssh-cli
#- snmp-agent
# - syslog-cli
- fog
#- post

View File

@ -1,4 +1,3 @@
depl_url: "http://s-adm.gsb.adm/gsbstore" depl_url: "http://s-adm.gsb.adm/gsbstore"
depl_fog: "fogproject-1.5.10.tar.gz" depl_fog: "fogproject-1.5.9.tar.gz"
instructions: "Pour lancer l'installateur Fog, faites : 'bash /root/tools/fog/bin/installfog.sh'. Suivez ensuite les instructions" instructions: "Pour lancer l'installateur Fog, faites : 'bash /root/tools/fog/bin/installfog.sh'. Suivez ensuite les instructions"

View File

@ -3,7 +3,7 @@
## 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: jeu. 11 janv. 2024 11:41:05
ipaddress='172.16.64.16' ipaddress='172.16.64.16'
copybackold='0' copybackold='0'
interface='enp0s9' interface='enp0s9'
@ -25,25 +25,22 @@ snmysqluser='fogmaster'
snmysqlpass='HHO5vSGqFiHE_9d2lja3' snmysqlpass='HHO5vSGqFiHE_9d2lja3'
snmysqlhost='localhost' snmysqlhost='localhost'
mysqldbname='fog' mysqldbname='fog'
installlang='1' installlang='0'
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='http'
startrange='172.16.64.10' startrange='172.16.64.10'
endrange='172.16.64.254' endrange='172.16.64.254'
#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 git gzip htmldoc isc-dhcp-server isolinux lftp libapache2-mod-php7.4 libc6 libcurl4 li>
noTftpBuild='' noTftpBuild=''
tftpAdvOpts=''
sslpath='/opt/fog/snapins/ssl/' sslpath='/opt/fog/snapins/ssl/'
backupPath='/home/' backupPath='/home/'
armsupport='0' armsupport='0'
php_ver='8.2' php_ver='7.4'
#php_verAdds='-7.4' php_verAdds='-7.4'
sslprivkey='/opt/fog/snapins/ssl//.srvprivate.key' sslprivkey='/opt/fog/snapins/ssl//.srvprivate.key'
sendreports='Y'
## End of FOG Settings ## End of FOG Settings
#

View File

@ -1,55 +1,26 @@
--- ---
- name: installation des paquets - name: creation d'un repertoire fog
apt: file:
state: present path: /root/tools/fog
name: state: directory
- apache2
- curl - name: recuperation de l'archive d'installation fog sur git
- git git:
- gzip repo: https://gitea.lyc-lecastel.fr/gadmin/fog.git
- isc-dhcp-server dest: /root/tools/fog/
- mariadb-client clone: yes
- mariadb-server update: yes
- net-tools
- openssh-server - name: Modification fichier bash (desac UDPCast)
- php ansible.builtin.lineinfile:
- php-cli path: /root/tools/fog/lib/common/functions.sh
- php-curl regexp: '^configureUDPCast\(\).*'
- php-fpm line: "configureUDPCast() {\nreturn"
- php-gd backup: yes
- php-intl
- php-json
- php-ldap
- php-mbstring
- php-mysql
- tar
- unzip
- vsftpd
- wget
- name: fichier config fogsettings - name: fichier config fogsettings
copy: command: "cp /root/tools/ansible/roles/fog/files/fogsettings /opt/fog/"
src: fogsettings
dest: "/tmp"
- name: recuperation de l archive d'installation fog - name: fichier fogsettings en .fogsettings
get_url: command: "mv /opt/fog/fogsettings /opt/fog/.fogsettings"
url: "{{ depl_url }}/{{ depl_fog }}"
dest: "/tmp/"
- name: Décompression de l'archive
ansible.builtin.unarchive:
src: "/tmp/{{ depl_fog }}"
dest: "/tmp/"
- name: exécution du script d'installation de fog
ansible.builtin.shell: sudo bash installfog.sh --recreate-keys -f /tmp/fogsettings -y
args:
chdir: /tmp/fogproject-1.5.10/bin/
#- name: exécution du script d'installation de fog
# ansible.builtin.shell: sudo bash /tmp/fogproject-1.5.10/bin/installfog.sh --recreate-keys -f /tmp/fogsettings
# args:
# chdir: /tmp/fogproject-1.5.10
#