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

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 }}"
主站蜘蛛池模板: 藁城市| 炎陵县| 洱源县| 青河县| 常山县| 开封市| 鄂州市| 长治县| 台南县| 夏津县| 奎屯市| 姜堰市| 通道| 老河口市| 荔浦县| 广丰县| 太康县| 道真| 无极县| 新竹县| 普安县| 苏尼特右旗| 敦煌市| 皋兰县| 土默特右旗| 丰原市| 博客| 大港区| 宁强县| 福鼎市| 六盘水市| 高陵县| 甘肃省| 横峰县| 长白| 武乡县| 互助| 琼中| 南投县| 类乌齐县| 黔西县|