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