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:
Ritesh Puj 2018-08-31 01:32:39 +05:30 committed by Alicia Cozine
parent 0b7a37c67b
commit ff654ccfe8

View file

@ -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: