December 2017
Intermediate to advanced
364 pages
7h 30m
English
The following code snippet is to run the backups and update WordPress core, themes, and plugins. This can be scheduled via an Ansible Tower job for every day:
- name: running backup using duply command: /etc/cron.hourly/duply-backup- name: updating WordPress core command: wp core update register: wp_core_update_output ignore_errors: yes- name: wp core update output debug: msg: "{{ wp_core_update_output.stdout }}"- name: updating WordPress themes command: wp theme update --all register: wp_theme_update_output ignore_errors: yes- name: wp themes update output debug: msg: "{{ wp_theme_update_output.stdout }}"- name: updating WordPress plugins command: wp plugin update --all register: wp_plugin_update_output ...