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

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 }}"
主站蜘蛛池模板: 吐鲁番市| 屏东县| 八宿县| 合山市| 安徽省| 如皋市| 枣阳市| 睢宁县| 和静县| 扎赉特旗| 独山县| 南郑县| 长治县| 汾阳市| 长乐市| 抚松县| 枣庄市| 淅川县| 班玛县| 织金县| 浦城县| 白玉县| 泰和县| 太保市| 南阳市| 达日县| 元阳县| 抚顺市| 当雄县| 黎城县| 方山县| 仙桃市| 轮台县| 杭锦后旗| 南岸区| 叶城县| 金山区| 中方县| 南充市| 凉山| 龙泉市|