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

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 }}"
主站蜘蛛池模板: 建始县| 禄丰县| 广丰县| 建始县| 安远县| 湘阴县| 来凤县| 望江县| 桦甸市| 巴林左旗| 寻乌县| 屏边| 梁山县| 晋州市| 民权县| 宁晋县| 璧山县| 虎林市| 普安县| 邯郸县| 台安县| 长顺县| 连南| 洛宁县| 永胜县| 龙胜| 静海县| 双江| 钟山县| 牟定县| 房山区| 台北县| 河曲县| 内乡县| 河源市| 榆中县| 安顺市| 长顺县| 乐业县| 黑河市| 台南县|