Detect PHP configuration directory
This commit is contained in:
parent
ca861dcc8f
commit
4941c56254
@ -1,9 +1,9 @@
|
||||
#!/usr/bin/ansible-playbook
|
||||
# vim:ft=ansible:
|
||||
---
|
||||
- name: Install, configure, and start Apache
|
||||
- name: Install, configure, and start Apache and PHP
|
||||
block:
|
||||
- name: Install Apache packages
|
||||
- name: Install Apache and PHP packages
|
||||
apt:
|
||||
name: "{{ packages }}"
|
||||
vars:
|
||||
@ -21,14 +21,23 @@
|
||||
- php-zip
|
||||
- php-cgi
|
||||
- php-cli
|
||||
- name: Find PHP config directory
|
||||
find:
|
||||
paths: /etc/php
|
||||
patterns: '*'
|
||||
file_type: directory
|
||||
register: phpdirs
|
||||
- name: Debug
|
||||
debug:
|
||||
var: phpdirs.files.0.path
|
||||
- name: Copy configuration
|
||||
copy:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
dest: "{{ phpdirs.files.0.path }}/{{ item.dest }}"
|
||||
mode: "{{ item.mode }}"
|
||||
loop:
|
||||
- { src: "php-apache2.ini", dest: "/etc/php/7.2/apache2/php.ini", mode: "0644" }
|
||||
- { src: "php-cgi.ini", dest: "/etc/php/7.2/cgi/php.ini", mode: "0644" }
|
||||
- { src: "php-apache2.ini", dest: "apache2/php.ini", mode: "0644" }
|
||||
- { src: "php-cgi.ini", dest: "cgi/php.ini", mode: "0644" }
|
||||
- name: Disable default website
|
||||
file:
|
||||
# This is a symlink so who cares
|
||||
|
Loading…
Reference in New Issue
Block a user