官术网_书友最值得收藏!

Secure automated the WordPress updates

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
ignore_errors: yes

- name: wp plugins update output
debug:
msg: "{{ wp_plugin_update_output.stdout }}"
主站蜘蛛池模板: 绍兴市| 濮阳市| 柞水县| 麦盖提县| 彭水| 文山县| 延长县| 沈丘县| 上高县| 江永县| 即墨市| 吉林省| 马尔康县| 岢岚县| 确山县| 西充县| 河东区| 永州市| 从化市| 紫金县| 西和县| 方正县| 新乡市| 云安县| 商南县| 疏附县| 汉沽区| 阳泉市| 东海县| 灌南县| 隆化县| 济南市| 桓台县| 榆中县| 泸西县| 昭通市| 宜章县| 青海省| 潮安县| 高密市| 大名县|