Skip to content

Commit

Permalink
Fix php override task errors
Browse files Browse the repository at this point in the history
  • Loading branch information
medanthelinium committed Aug 17, 2023
1 parent 077e19c commit 97096fb
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions tasks/php.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
---
- name: Make sure that the configuration folder exists
ansible.builtin.file:
path: "{{ php.prefix.config }}/php"
owner: root
mode: "0755"
state: directory

- name: Template the overrides file
community.general.ini_file:
path: "{{ php.prefix.config }}/php/AAA-01-proserver.ini"
create: no
section: ''
option: "{{ key }}"
value: "{{ value }}"
state: "{{ 'absent' if key is in php['php.ini'] else 'present' }}"
option: "{{ item.key }}"
value: "{{ item.value }}"
state: "{{ 'absent' if item.key is in php['php.ini'] else 'present' }}"
mode: "0644"
owner: root
loop_control:
label: "{{ item.key }}={{ item.value }}"
loop: "{{ php_proserver_overrides | dict2items() }}"
Expand All @@ -16,11 +24,12 @@
- name: Update PHP configuration
community.general.ini_file:
path: "{{ php_ini }}"
create: no
section: PHP
option: "{{ key }}"
value: "{{ value }}"
state: "{{ 'absent' if value is none else 'present' }}"
owner: root
mode: "0644"
loop_control:
label: "{{ php_ini }} {{ key }}={{ value }}"
vars:
Expand Down

0 comments on commit 97096fb

Please sign in to comment.