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

Installing PHP for WordPress setup

The following code snippet uses different modules to perform the installation of PHP and other required packages. Then it updates the PHP-FPM configuration using the replace module. Finally, it also updates the nginx configuration to update the PHP-FPM processing using the template module, and restarts the service to apply the changes:

- name: installing php  apt:    name: "{{ item }}"    state: present    update_cache: yes    with_items:    - php    - php-curl    - php-fpm    - php-mysql    - php-xmlrpc - name: configuring php.ini for php processor  replace:    path: /etc/php5/fpm/php.ini    regex: ';cgi.fix_pathinfo=1'    replace: 'cgi.fix_pathinfo=0'    backup: yes- name: enable and restart the php fpm service  service:    name: php7.0-fpm enabled: ...
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