diff --git a/roles/fog/files/fogsettings b/roles/fog/files/fogsettings index 7afe97a..4772990 100644 --- a/roles/fog/files/fogsettings +++ b/roles/fog/files/fogsettings @@ -3,14 +3,18 @@ ## Find more information about this file in the FOG Project wiki: ## https://wiki.fogproject.org/wiki/index.php?title=.fogsettings ## Version: 1.5.10 +<<<<<<< HEAD +## Install time: jeu. 11 janv. 2024 +======= ## Install time: jeu. 11 janv. 2024 11:41:05 +>>>>>>> cbcefb5fbd5abe52a1704026505ff174752c7c11 ipaddress='172.16.64.16' copybackold='0' interface='enp0s9' submask='255.255.255.0' hostname='s-fog.gsb.lan' -routeraddress='192.168.99.99' -plainrouter='192.168.99.99' +routeraddress='172.16.64.254' +plainrouter='172.16.64.254' dnsaddress='172.16.0.1' username='fogproject' password='/7ElC1OHrP47EN2w59xl' @@ -25,22 +29,24 @@ snmysqluser='fogmaster' snmysqlpass='HHO5vSGqFiHE_9d2lja3' snmysqlhost='localhost' mysqldbname='fog' -installlang='0' +installlang='1' storageLocation='/images' fogupdateloaded=1 -docroot='/var/www/html/' +docroot='/var/www/' webroot='/fog/' caCreated='yes' -httpproto='http' +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 git gzip htmldoc isc-dhcp-server isolinux lftp libapache2-mod-php7.4 libc6 libcurl4 li> +#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' +php_ver='8.2' +#php_verAdds='-7.4' sslprivkey='/opt/fog/snapins/ssl//.srvprivate.key' +sendreports='Y' ## End of FOG Settings diff --git a/roles/fog/tasks/main.yml b/roles/fog/tasks/main.yml index 13c8cd0..06de558 100644 --- a/roles/fog/tasks/main.yml +++ b/roles/fog/tasks/main.yml @@ -1,26 +1,49 @@ --- -- name: creation d'un repertoire fog - file: - path: /root/tools/fog - state: directory - -- name: recuperation de l'archive d'installation fog sur git - git: - repo: https://gitea.lyc-lecastel.fr/gadmin/fog.git - dest: /root/tools/fog/ - clone: yes - update: yes - -- name: Modification fichier bash (desac UDPCast) - ansible.builtin.lineinfile: - path: /root/tools/fog/lib/common/functions.sh - regexp: '^configureUDPCast\(\).*' - line: "configureUDPCast() {\nreturn" - backup: yes +- name: Installation des paquets de base + apt: + state: present + name: + - apache2 + - curl + - git + - gzip + - isc-dhcp-server + - mariadb-client + - mariadb-server + - net-tools + - openssh-server + - php + - php-cli + - php-curl + - php-fpm + - php-gd + - php-intl + - php-json + - php-ldap + - php-mbstring + - php-mysql + - tar + - unzip + - vsftpd + - wget - 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 - command: "mv /opt/fog/fogsettings /opt/fog/.fogsettings" +- name: Récupération archive d'installation Fog + 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 Fog + ansible.builtin.shell: sudo bash /tmp/fogproject-1.5.10/bin/installfog.sh --recreate-keys -f /tmp/fogsettings -y + args: + chdir: "/tmp/fogproject-1.5.10/"