|
@@ -7,15 +7,20 @@
|
|
|
# Si /var/www/wordpress n'existe pas, alors télécharger WordPress
|
|
# Si /var/www/wordpress n'existe pas, alors télécharger WordPress
|
|
|
- name: Télécharger l'archive WordPress en utilisant curl
|
|
- name: Télécharger l'archive WordPress en utilisant curl
|
|
|
# command: curl -o /tmp/wordpress.tar.gz https://wordpress.org/latest.tar.gz
|
|
# command: curl -o /tmp/wordpress.tar.gz https://wordpress.org/latest.tar.gz
|
|
|
- command: curl -o /tmp/wordpress.tar.gz https://wordpress.org/wordpress-6.0.tar.gz
|
|
|
|
|
|
|
+ command: curl -o /tmp/wordpress-5.8.6.tar.gz https://wordpress.org/wordpress-5.8.6.tar.gz
|
|
|
args:
|
|
args:
|
|
|
- creates: /tmp/wordpress.tar.gz
|
|
|
|
|
|
|
+ creates: /tmp/wordpress-5.8.6.tar.gz
|
|
|
when: wordpress_dir.stat.exists == False
|
|
when: wordpress_dir.stat.exists == False
|
|
|
|
|
|
|
|
|
|
+# Débugger
|
|
|
|
|
+- name: Afficher le contenu de wordpress_dir
|
|
|
|
|
+ debug:
|
|
|
|
|
+ var: wordpress_dir
|
|
|
|
|
+
|
|
|
# Si /var/www/wordpress n'existe pas, alors décompresser WordPress
|
|
# Si /var/www/wordpress n'existe pas, alors décompresser WordPress
|
|
|
- name: Décompacter l'archive WordPress
|
|
- name: Décompacter l'archive WordPress
|
|
|
ansible.builtin.unarchive:
|
|
ansible.builtin.unarchive:
|
|
|
- src: /tmp/wordpress.tar.gz
|
|
|
|
|
|
|
+ src: /tmp/wordpress-5.8.6.tar.gz
|
|
|
dest: /var/www
|
|
dest: /var/www
|
|
|
remote_src: yes
|
|
remote_src: yes
|
|
|
owner: www-data
|
|
owner: www-data
|