mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
replaced 'ansible_os_platform' to 'ansible_os_family' (#44676)
replaced 'ansible_os_platform' to 'ansible_os_family' as 'ansible_os_platform' variable is no longer available.
This commit is contained in:
parent
0b7a37c67b
commit
ff654ccfe8
1 changed files with 2 additions and 2 deletions
|
@ -46,9 +46,9 @@ Other YAML files may be included in certain directories. For example, it is comm
|
|||
# roles/example/tasks/main.yml
|
||||
- name: added in 2.4, previously you used 'include'
|
||||
import_tasks: redhat.yml
|
||||
when: ansible_os_platform|lower == 'redhat'
|
||||
when: ansible_os_family|lower == 'redhat'
|
||||
- import_tasks: debian.yml
|
||||
when: ansible_os_platform|lower == 'debian'
|
||||
when: ansible_os_family|lower == 'debian'
|
||||
|
||||
# roles/example/tasks/redhat.yml
|
||||
- yum:
|
||||
|
|
Loading…
Reference in a new issue