modif role nfs-server again
This commit is contained in:
parent
4cb8aa49b9
commit
9bcfcc6305
@ -1,77 +1,70 @@
|
||||
- name: 00 - cree repertoire wordpress pour export nfs
|
||||
file:
|
||||
path: /exports/wordpress
|
||||
state: directory
|
||||
- name: 00 - cree repertoire wordpress pour export nfs
|
||||
file:
|
||||
path: /home/wordpress
|
||||
state: directory
|
||||
|
||||
- name: 05 - Install nfs-server
|
||||
apt:
|
||||
name: nfs-server
|
||||
state: present
|
||||
- name: 05 - Install nfs-server
|
||||
apt:
|
||||
name: nfs-server
|
||||
state: present
|
||||
|
||||
- name: 10 - creation fichier exports nfs
|
||||
ansible.builtin.blockinfile:
|
||||
path: /etc/exports
|
||||
block: |
|
||||
/exports/wordpress 192.168.56.0/255.255.255.0 (rw,no_root_squash,subtree_check)
|
||||
- name: 10 - creation fichier exports nfs
|
||||
ansible.builtin.blockinfile:
|
||||
path: /etc/exports
|
||||
block: |
|
||||
/home/wordpress 192.168.102.0/255.255.255.0(rw,no_root_squash,subtree_check)
|
||||
|
||||
- name: 20 - decompresse wordpress
|
||||
unarchive:
|
||||
src: https://fr.wordpress.org/latest-fr_FR.tar.gz
|
||||
dest: /home/
|
||||
remote_src: yes
|
||||
|
||||
- name: 22 - change owner et group pour repertoire wordpress
|
||||
file:
|
||||
path: /home/wordpress
|
||||
state: directory
|
||||
recurse: yes
|
||||
owner: www-data
|
||||
group: www-data
|
||||
|
||||
- name: 30 - genere fichier de config wordpress
|
||||
copy:
|
||||
src: /home/wordpress/wp-config-sample.php
|
||||
dest: /home/wordpress/wp-config.php
|
||||
remote_src: yes
|
||||
|
||||
- name: 35 - ajuste variable dbname dans fichier de config wp-config.php
|
||||
replace:
|
||||
path: /home/wordpress/wp-config.php
|
||||
regexp: "votre_nom_de_bdd"
|
||||
replace: "wordpressdb"
|
||||
backup: yes
|
||||
|
||||
|
||||
- name: 15 - Recupere wordpress.tar.gz
|
||||
get_url:
|
||||
url: "https://fr.wordpress.org/latest-fr_FR.tar.gz"
|
||||
dest: /tmp/wordpress-6.1.1-fr_FR.tar.gz
|
||||
- name: 40 ajuste variable dbusername dans fichier de config wp-config.php
|
||||
replace:
|
||||
path: /exports/wordpress/wp-config.php
|
||||
regexp: "votre_utilisateur_de_bdd"
|
||||
replace: "wordpressuser"
|
||||
backup: yes
|
||||
|
||||
- name: 20 - decompresse wordpress
|
||||
unarchive:
|
||||
src: /tmp/wordpress-6.1.1-fr_FR.tar.gz
|
||||
dest: /exports/
|
||||
remote_src: yes
|
||||
|
||||
- name: 22 - change owner et group pour repertoire wordpress
|
||||
file:
|
||||
path: /exports/wordpress
|
||||
state: directory
|
||||
recurse: yes
|
||||
owner: www-data
|
||||
group: www-data
|
||||
- name: 45 - ajuste variable mdp dans fichier de config wp-config.php
|
||||
replace:
|
||||
path: /home/wordpress/wp-config.php
|
||||
regexp: "votre_mdp_de_bdd"
|
||||
replace: "wordpresspasswd"
|
||||
backup: yes
|
||||
|
||||
- name: 30 - genere fichier de config wordpress
|
||||
copy:
|
||||
src: /exports/wordpress/wp-config-sample.php
|
||||
dest: /exports/wordpress/wp-config.php
|
||||
remote_src: yes
|
||||
|
||||
- name: 35 - ajuste variable dbname dans fichier de config wp-config.php
|
||||
replace:
|
||||
path: /exports/wordpress/wp-config.php
|
||||
regexp: "votre_nom_de_bdd"
|
||||
replace: "wordpressdb"
|
||||
backup: yes
|
||||
|
||||
|
||||
- name: 40 ajuste variable dbusername dans fichier de config wp-config.php
|
||||
replace:
|
||||
path: /exports/wordpress/wp-config.php
|
||||
regexp: "votre_utilisateur_de_bdd"
|
||||
replace: "wordpressuser"
|
||||
backup: yes
|
||||
|
||||
- name: 45 - ajuste variable mdp dans fichier de config wp-config.php
|
||||
replace:
|
||||
path: /exports/wordpress/wp-config.php
|
||||
regexp: "votre_mdp_de_bdd"
|
||||
replace: "wordpresspasswd"
|
||||
backup: yes
|
||||
|
||||
- name: 50 - ajuste hostname fichier wp-config.php
|
||||
replace:
|
||||
path: /exports/wordpress/wp-config.php
|
||||
regexp: "localhost"
|
||||
replace: "192.168.102.253"
|
||||
backup: yes
|
||||
|
||||
- name: 55 - relance nfs
|
||||
service:
|
||||
name: nfs-server
|
||||
state: restarted
|
||||
enabled: yes
|
||||
- name: 50 - ajuste hostname fichier wp-config.php
|
||||
replace:
|
||||
path: /home/wordpress/wp-config.php
|
||||
regexp: "localhost"
|
||||
replace: "192.168.102.253"
|
||||
backup: yes
|
||||
|
||||
- name: 55 - relance nfs
|
||||
service:
|
||||
name: nfs-server
|
||||
state: restarted
|
||||
enabled: yes
|
||||
|
Loading…
x
Reference in New Issue
Block a user