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

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 }}"
主站蜘蛛池模板: 勃利县| 柳江县| 出国| 福安市| 鄄城县| 富源县| 阿拉尔市| 合水县| 德令哈市| 锡林郭勒盟| 莱州市| 凤庆县| 松溪县| 德庆县| 阜新| 旌德县| 泗阳县| 绍兴县| 濉溪县| 博野县| 兴隆县| 丹棱县| 平江县| 礼泉县| 金溪县| 商城县| 巩留县| 朔州市| 遂溪县| 新绛县| 台山市| 黔江区| 新宾| 镇巴县| 子洲县| 叶城县| 都匀市| 偏关县| 黔东| 来安县| 富阳市|