Skip to Content
Security Automation with Ansible 2
book

Security Automation with Ansible 2

by Akash Mahajan, MADHU AKULA
December 2017
Intermediate to advanced
364 pages
7h 30m
English
Packt Publishing
Content preview from Security Automation with Ansible 2

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Implementing DevOps with Ansible 2

Implementing DevOps with Ansible 2

Jonathan McAllister
Practical Ansible 2

Practical Ansible 2

Daniel Oh, James Freeman, Fabio Alessandro Locati

Publisher Resources

ISBN: 9781788394512Supplemental Content