File tree Expand file tree Collapse file tree 6 files changed +13
-13
lines changed
Expand file tree Collapse file tree 6 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ The PHP version to be installed. Any [currently-supported PHP major version](htt
3535
3636 roles:
3737 - name: geerlingguy.repo-remi
38- when: ansible_os_family == 'RedHat'
38+ when: ansible_facts.os_family == 'RedHat'
3939 - geerlingguy.php-versions
4040 - geerlingguy.php
4141
Original file line number Diff line number Diff line change 1010 pre_tasks :
1111 - name : Update apt cache.
1212 apt : update_cache=true cache_valid_time=600
13- when : ansible_os_family == 'Debian'
13+ when : ansible_facts.os_family == 'Debian'
1414
1515 roles :
1616 - role : geerlingguy.repo-remi
17- when : ansible_os_family == 'RedHat'
17+ when : ansible_facts.os_family == 'RedHat'
1818 - role : geerlingguy.php-versions
1919 - role : geerlingguy.php
2020
Original file line number Diff line number Diff line change 99 pre_tasks :
1010 - name : Update apt cache.
1111 apt : update_cache=true cache_valid_time=600
12- when : ansible_os_family == 'Debian'
12+ when : ansible_facts.os_family == 'Debian'
1313
1414 roles :
1515 - role : geerlingguy.repo-remi
16- when : ansible_os_family == 'RedHat'
16+ when : ansible_facts.os_family == 'RedHat'
1717 - role : geerlingguy.php-versions
1818 - role : geerlingguy.php
1919
Original file line number Diff line number Diff line change 22- name : Include OS-specific variables.
33 include_vars : " {{ item }}"
44 with_fileglob :
5- - " {{ role_path }}/vars/{{ ansible_os_family }}.yml"
6- - " {{ role_path }}/vars/{{ ansible_os_family }}-php{{ php_version }}.yml"
5+ - " {{ role_path }}/vars/{{ ansible_facts.os_family }}.yml"
6+ - " {{ role_path }}/vars/{{ ansible_facts.os_family }}-php{{ php_version }}.yml"
77
88- name : Remove missing JSON extension for PHP 8.0 (included by default)
99 set_fact :
3838 php_install_recommends : " {{ php_versions_install_recommends }}"
3939
4040# Setup tasks.
41- - include_tasks : " setup-{{ ansible_os_family }}.yml"
41+ - include_tasks : " setup-{{ ansible_facts.os_family }}.yml"
Original file line number Diff line number Diff line change 4040 # Remove 'Comment' because response can be out of order.
4141 # See: https://github.com/geerlingguy/ansible-role-php-versions/issues/94
4242 ondrej_repo_signed_by : " {{ keyserver_response.content | regex_replace('\n Comment.+\n ','\n ') }}"
43- when : ansible_distribution == "Ubuntu"
43+ when : ansible_facts.distribution == "Ubuntu"
4444
4545- debug : var=ondrej_repo_signed_by
4646
4747- name : Set data for Ondrej's repo (Debian).
4848 ansible.builtin.set_fact :
4949 ondrej_repo_uri : " https://packages.sury.org/php"
5050 ondrej_repo_signed_by : " https://packages.sury.org/php/apt.gpg"
51- when : ansible_distribution == "Debian"
51+ when : ansible_facts.distribution == "Debian"
5252
5353- name : Add Ondrej's PHP repo.
5454 become : true
6666 apt : update_cache=true
6767 when :
6868 - php_ondrej_debian_repo.changed
69- - ansible_os_family == "Debian"
69+ - ansible_facts.os_family == "Debian"
7070 tags : ['skip_ansible_lint']
7171
7272- name : Purge PHP version packages (besides the currently chosen php_version).
Original file line number Diff line number Diff line change 3131 changed_when : " 'Nothing to do' not in dnf_module_enable.stdout"
3232
3333 when :
34- - ansible_os_family == 'RedHat'
35- - ansible_distribution_major_version | int >= 8
34+ - ansible_facts.os_family == 'RedHat'
35+ - ansible_facts.distribution_major_version | int >= 8
You can’t perform that action at this time.
0 commit comments