I have the following attempt in ansible:
---
- name: Replace string nulls with php nulls in config
ansible.builtin.replace:
path: "{{ app_root_path }}/config/autoload.local.php"
regexp: "\'''null\'''"
replace: 'null'
backup: yes
To implement this regex:
in order to change:
'host' => 'null',
'user' => 'null',
'password' => 'null',
to:
'host' => null,
'user' => null,
'password' => null,
I've tried:
-
regexp: "\''null\''" -
regexp: "\'null\'" -
regexp: "''null''"
None of these, nor anything else I've found so far, has worked.
What is the correct way of implementing this in the confines of YAML?
