December 2017
Intermediate to advanced
364 pages
7h 30m
English
We have already seen this in our LEMP stack setup, and it's very similar. But here, we have to use the required modules for working with WordPress. The following code snippet shows how we can use templating to perform configuration updates in the server:
- name: installing apache2 server apt: name: "apache2" update_cache: yes state: present- name: updating customized templates for apache2 configuration template: src: "{{ item.src }}" dest: "{{ item.dst }}" mode: 0644 with_tems: - { src: apache2.conf.j2, dst: /etc/apache2/conf.d/apache2.conf } - { src: 000-default.conf.j2, dst: /etc/apache2/sites-available/000-default.conf } - { src: default-ssl.conf.j2, dst: /etc/apache2/sites-available/default-ssl.conf }- name: ...