From a5b37deec15c15f0b8dd664d8743ebdfce90aaec Mon Sep 17 00:00:00 2001 From: Patrick Neff Date: Mon, 24 Jan 2022 22:16:09 +0100 Subject: [PATCH] initial commit --- handlers/main.yml | 4 ++++ meta/main.yml | 1 + tasks/main.yml | 17 +++++++++++++++++ vars/main.yml | 1 + 4 files changed, 23 insertions(+) create mode 100644 handlers/main.yml create mode 100644 meta/main.yml create mode 100644 tasks/main.yml create mode 100644 vars/main.yml 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