forked from evolix/ansible-roles
wordpress: configure site before update it
This commit is contained in:
parent
71cd04029c
commit
35f1ec91d8
|
@ -46,6 +46,9 @@
|
||||||
args:
|
args:
|
||||||
creates: "{{ ansible_env.HOME }}/www/wp-config.php"
|
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
|
- 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'
|
shell: 'php {{ ansible_env.HOME }}/bin/wp-cli.phar core check-update --path={{ ansible_env.HOME }}/www | grep -q Success'
|
||||||
register: check_version
|
register: check_version
|
||||||
|
@ -59,9 +62,6 @@
|
||||||
removes: "{{ ansible_env.HOME }}/www/index.php"
|
removes: "{{ ansible_env.HOME }}/www/index.php"
|
||||||
when: check_version.rc
|
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
|
- name: Send a summary mail
|
||||||
mail:
|
mail:
|
||||||
host: 'localhost'
|
host: 'localhost'
|
||||||
|
|
Loading…
Reference in a new issue