modif role fog & routeur

This commit is contained in:
root
2024-01-12 14:07:00 +01:00
parent cbcefb5fbd
commit 008731f456
2 changed files with 59 additions and 30 deletions

View File

@@ -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/"