- Security Automation with Ansible 2
- Madhu Akula Akash Mahajan
- 108字
- 2021-07-02 22:00:01
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 }}"
推薦閱讀
- 構建高質量的C#代碼
- ABB工業機器人編程全集
- Spark編程基礎(Scala版)
- ROS機器人編程與SLAM算法解析指南
- 自動化控制工程設計
- 數據挖掘方法及天體光譜挖掘技術
- Ceph:Designing and Implementing Scalable Storage Systems
- 具比例時滯遞歸神經網絡的穩定性及其仿真與應用
- 工業控制系統測試與評價技術
- LMMS:A Complete Guide to Dance Music Production Beginner's Guide
- Windows安全指南
- Learn QGIS
- PowerMill 2020五軸數控加工編程應用實例
- 大數據素質讀本
- 歐姆龍PLC應用系統設計實例精解