wordpress: configure site before update it

This commit is contained in:
Victor LABORIE 2017-10-17 11:00:44 +02:00
parent 71cd04029c
commit 35f1ec91d8

View file

@ -46,6 +46,9 @@
args:
creates: "{{ ansible_env.HOME }}/www/wp-config.php"
- name: Configure site
shell: 'php {{ ansible_env.HOME }}/bin/wp-cli.phar core install --url={{ wordpress_host | quote }} --title={{ wordpress_title | quote }} --admin_user=admin --admin_password={{ admin_pwd | quote }} --admin_email={{ wordpress_email }} --path={{ ansible_env.HOME }}/www'
- name: Check if Wordpress is up to date
shell: 'php {{ ansible_env.HOME }}/bin/wp-cli.phar core check-update --path={{ ansible_env.HOME }}/www | grep -q Success'
register: check_version
@ -59,9 +62,6 @@
removes: "{{ ansible_env.HOME }}/www/index.php"
when: check_version.rc
- name: Configure site
shell: 'php {{ ansible_env.HOME }}/bin/wp-cli.phar core install --url={{ wordpress_host | quote }} --title={{ wordpress_title | quote }} --admin_user=admin --admin_password={{ admin_pwd | quote }} --admin_email={{ wordpress_email }} --path={{ ansible_env.HOME }}/www'
- name: Send a summary mail
mail:
host: 'localhost'