From 038e41dd4034f9c027ddedf7d11c734d3943e932 Mon Sep 17 00:00:00 2001 From: Elam Monnot Date: Mon, 30 Jan 2023 11:43:48 +0100 Subject: [PATCH] marche stp --- roles/lb-web/tasks/main.yml | 34 +++++++++++++++++++++++++--------- s-lb-web1.yml | 1 - s-lb-web2.yml | 1 - 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/roles/lb-web/tasks/main.yml b/roles/lb-web/tasks/main.yml index cec5a55..eef017f 100644 --- a/roles/lb-web/tasks/main.yml +++ b/roles/lb-web/tasks/main.yml @@ -1,10 +1,26 @@ --- -- name: installation php et apache ... - apt: - name: - - apache2 - - php - - php-mbstring - - php-mysql - - mariadb-client - state: present +- name: + - apache2 + - php + - php-mbstring + - php-mysql + - mariadb-client + state: present + + - name: install nfs-common + apt: + name: nfs-common + state: present + + - name: montage nfs pour word press + blockinfile: + path: /etc/fstab + block: | + 192.168.56.6:/exports/wordpress /var/www/html nfs soft,timeo=5,intr,rsize=8192,wsize=8192,wsize=8192 0 0 + + - name: monte export wordpress + ansible.posix.mount: + path: /var/www/html + state: mounted + fstype: nfs + src: 192.168.56.6:/exports/wordpress diff --git a/s-lb-web1.yml b/s-lb-web1.yml index 7a7d540..438bfeb 100644 --- a/s-lb-web1.yml +++ b/s-lb-web1.yml @@ -6,5 +6,4 @@ - base - lb-web - snmp-agent - - lb-nfs-client - post diff --git a/s-lb-web2.yml b/s-lb-web2.yml index 7a7d540..438bfeb 100644 --- a/s-lb-web2.yml +++ b/s-lb-web2.yml @@ -6,5 +6,4 @@ - base - lb-web - snmp-agent - - lb-nfs-client - post