Skip to content

Commit 3c0d5ed

Browse files
Use php version in the package name even if the 3rd party apt repo isn't enabled
1 parent 66e37ad commit 3c0d5ed

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

tasks/apt.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
state: absent
1212

1313
- name: Ensure the third-party PHP repository is {{ 'present' if php.repository.apt.enabled else 'absent' }}
14-
changed_when:
15-
- php_repository_added.changed
16-
- lookup('env','GITHUB_ACTIONS') | length) == 0
14+
changed_when: "'molecule-idempotence-notest' not in ansible_skip_tags"
1715
register: php_repository_added
1816
ansible.builtin.deb822_repository:
1917
name: php

tasks/install.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
ansible.builtin.user:
44
name: proserver
55

6-
- name: Install PHP {{ php.version }} and extensions
6+
- name: Install PHP and extensions
77
notify: Restart PHP-FPM
88
ansible.builtin.apt:
99
name: >-
1010
{{
11-
['php' + (php.version if php.repository.apt.enabled else '') + '-fpm'] + php.install_extensions.items() |
11+
['php' + php.version + '-fpm'] + php.install_extensions.items() |
1212
selectattr('1', 'eq', true)|map(attribute='0') |
13-
map('regex_replace', '^', 'php' + (php.version if php.repository.apt.enabled else '') + '-') |
13+
map('regex_replace', '^', 'php' + php.version + '-') |
1414
list + (['composer'] if php.install_composer else [])
1515
}}
1616

0 commit comments

Comments
 (0)