- 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 }}"
推薦閱讀
- 計(jì)算機(jī)應(yīng)用
- 大數(shù)據(jù)技術(shù)基礎(chǔ)
- 火格局的時(shí)空變異及其在電網(wǎng)防火中的應(yīng)用
- VMware Performance and Capacity Management(Second Edition)
- Associations and Correlations
- 統(tǒng)計(jì)策略搜索強(qiáng)化學(xué)習(xí)方法及應(yīng)用
- 控制系統(tǒng)計(jì)算機(jī)仿真
- 中國戰(zhàn)略性新興產(chǎn)業(yè)研究與發(fā)展·工業(yè)機(jī)器人
- 大數(shù)據(jù)驅(qū)動(dòng)的機(jī)械裝備智能運(yùn)維理論及應(yīng)用
- 從零開始學(xué)PHP
- Learning Apache Apex
- 電腦故障排除與維護(hù)終極技巧金典
- 計(jì)算智能算法及其生產(chǎn)調(diào)度應(yīng)用
- 網(wǎng)管員世界2009超值精華本
- Cloud Native Development Patterns and Best Practices