From 424f15c4d255e51404d6356c1e9e35e85dee63c1 Mon Sep 17 00:00:00 2001 From: cwivagg Date: Tue, 27 Dec 2022 15:56:14 -0500 Subject: [PATCH] Switch from lineinfile to ini_file lineinfile was really struggling to handle a k/v value with "=" in it. ini_file is built for precisely this file format and handles the issue effortlessly. --- roles/matomo/tasks/install.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/roles/matomo/tasks/install.yml b/roles/matomo/tasks/install.yml index 0ad386d86..49dc98dc7 100644 --- a/roles/matomo/tasks/install.yml +++ b/roles/matomo/tasks/install.yml @@ -212,10 +212,11 @@ group: "{{ apache_user }}" - name: Don't Check for Trusted Host - ansible.builtin.lineinfile: + ini_file: path: "{{ matomo_path }}/matomo/config/config.ini.php" - line: "enable_trusted_host_check\=0" - insertafter: "^\[General\]$" + section: General + option: enable_trusted_host_check + value: 0 # RECORD Matomo AS INSTALLED