- ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux']
- ansible_distribution_version is version('6', '>=')
- ansible_distribution_version is version('7', '<')
- name:detect systemd init system
set_fact:
service_type:systemd
when:(ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux'] and ( ansible_distribution_version is version('7', '>=') and ansible_distribution_version is version('8', '<'))) or ansible_distribution == 'Fedora' or (ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('15.04', '>=')) or (ansible_distribution == 'Debian' and ansible_distribution_version is version('8', '>=')) or ansible_os_family == 'Suse'
- name:detect upstart init system
set_fact:
service_type:upstart
when:
- ansible_distribution == 'Ubuntu'
- ansible_distribution_version is version('15.04', '<')