Skip to content

Commit

Permalink
Use Ansible builtin dict2items in php task
Browse files Browse the repository at this point in the history
  • Loading branch information
pmhausen committed Aug 17, 2023
1 parent 3956c88 commit 077e19c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tasks/php.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
value: "{{ value }}"
state: "{{ 'absent' if key is in php['php.ini'] else 'present' }}"
loop_control:
label: "{{ key }}={{ value }}"
vars:
key: "{{ item.0 }}"
value: "{{ item.1 }}"
loop: "{{ php_proserver_overrides | items() }}"
label: "{{ item.key }}={{ item.value }}"
loop: "{{ php_proserver_overrides | dict2items() }}"
when: ansible_system == 'FreeBSD'
notify: Restart PHP-FPM

- name: Update PHP configuration
community.general.ini_file:
path: "{{ php_ini }}"
Expand Down

0 comments on commit 077e19c

Please sign in to comment.