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

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 }}"
主站蜘蛛池模板: 许昌市| 砀山县| 大庆市| 铜鼓县| 盖州市| 宜君县| 长春市| 广南县| 铜鼓县| 綦江县| 平原县| 西乡县| 长岭县| 贡觉县| 正蓝旗| 清远市| 喀什市| 安达市| 安陆市| 普安县| 清苑县| 缙云县| 会昌县| 武冈市| 循化| 汉中市| 辛集市| 和林格尔县| 通城县| 黄梅县| 来凤县| 淮阳县| 凤凰县| 阳信县| 上林县| 吉水县| 伊金霍洛旗| 灵石县| 柞水县| 佛教| 花莲县|