modif role fog

This commit is contained in:
Cerena Hostains 2024-01-11 15:09:03 +01:00
parent 9deef13f8e
commit b03fedcc45
3 changed files with 65 additions and 32 deletions

View File

@ -1,3 +1,4 @@
depl_url: "http://s-adm.gsb.adm/gsbstore" depl_url: "http://s-adm.gsb.adm/gsbstore"
depl_fog: "fogproject-1.5.9.tar.gz" depl_fog: "fogproject-1.5.10.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

@ -2,8 +2,8 @@
## Created by the FOG Installer ## Created by the FOG Installer
## 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.9 ## Version: 1.5.10
## Install time: jeu. 26 janv. 2023 11:41:05 ## Install time: jeu. 11 janv. 2024
ipaddress='172.16.64.16' ipaddress='172.16.64.16'
copybackold='0' copybackold='0'
interface='enp0s9' interface='enp0s9'
@ -25,22 +25,25 @@ snmysqluser='fogmaster'
snmysqlpass='HHO5vSGqFiHE_9d2lja3' snmysqlpass='HHO5vSGqFiHE_9d2lja3'
snmysqlhost='localhost' snmysqlhost='localhost'
mysqldbname='fog' mysqldbname='fog'
installlang='0' installlang='1'
storageLocation='/images' storageLocation='/images'
fogupdateloaded=1 fogupdateloaded=1
docroot='/var/www/html/' docroot='/var/www/'
webroot='/fog/' webroot='/fog/'
caCreated='yes' caCreated='yes'
httpproto='http' httpproto='https'
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 git gzip htmldoc isc-dhcp-server isolinux lftp libapache2-mod-php7.4 libc6 libcurl4 li> 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='' noTftpBuild=''
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='8.2'
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,26 +1,55 @@
--- ---
- name: creation d'un repertoire fog - name: installation des paquets
file: apt:
path: /root/tools/fog state: present
state: directory name:
- apache2
- name: recuperation de l'archive d'installation fog sur git - curl
git: - git
repo: https://gitea.lyc-lecastel.fr/gadmin/fog.git - gzip
dest: /root/tools/fog/ - isc-dhcp-server
clone: yes - mariadb-client
update: yes - mariadb-server
- net-tools
- name: Modification fichier bash (desac UDPCast) - openssh-server
ansible.builtin.lineinfile: - php
path: /root/tools/fog/lib/common/functions.sh - php-cli
regexp: '^configureUDPCast\(\).*' - php-curl
line: "configureUDPCast() {\nreturn" - php-fpm
backup: yes - php-gd
- php-intl
- php-json
- php-ldap
- php-mbstring
- php-mysql
- tar
- unzip
- vsftpd
- wget
- name: fichier config fogsettings - name: fichier config fogsettings
command: "cp /root/tools/ansible/roles/fog/files/fogsettings /opt/fog/" copy:
src: fogsettings
dest: "/tmp"
- name: fichier fogsettings en .fogsettings - name: recuperation de l archive d'installation fog
command: "mv /opt/fog/fogsettings /opt/fog/.fogsettings" get_url:
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
#