commit a5b37deec15c15f0b8dd664d8743ebdfce90aaec Author: Patrick Neff Date: Mon Jan 24 22:16:09 2022 +0100 initial commit diff --git a/handlers/main.yml b/handlers/main.yml new file mode 100644 index 0000000..4f13665 --- /dev/null +++ b/handlers/main.yml @@ -0,0 +1,4 @@ +- name: restart php-fpm + ansible.builtin.service: + name: "php{{ php_version }}-fpm" + state: restarted diff --git a/meta/main.yml b/meta/main.yml new file mode 100644 index 0000000..32cf5dd --- /dev/null +++ b/meta/main.yml @@ -0,0 +1 @@ +dependencies: [] diff --git a/tasks/main.yml b/tasks/main.yml new file mode 100644 index 0000000..6a789e4 --- /dev/null +++ b/tasks/main.yml @@ -0,0 +1,17 @@ +- name: Install packages. + ansible.builtin.package: + name: + - "php{{ php_version }}" + - "php{{ php_version }}-fpm" + +- name: Configure php + ansible.builtin.lineinfile: + path: "/etc/php/{{ php_version }}/fpm/php.ini" + regexp: "{{ item.regexp }}" + line: "{{ item.line }}" + with_items: + - regexp: ";?date\\.timezone" + line: date.timezone = Europe/Berlin + - regexp: ";?cgi\\.fix_pathinfo" + line: cgi.fix_pathinfo = 1 + notify: restart php-fpm diff --git a/vars/main.yml b/vars/main.yml new file mode 100644 index 0000000..ed2ddc8 --- /dev/null +++ b/vars/main.yml @@ -0,0 +1 @@ +php_version: 7.4