---

- name: Disable service {{ __sap_hana_preconfigure_packages_and_services[line_item].svc }} if
          if package {{ __sap_hana_preconfigure_packages_and_services[line_item].pkg }} is installed
  systemd:
    name: "{{ __sap_hana_preconfigure_packages_and_services[line_item].svc }}"
    state: "{{ __sap_hana_preconfigure_packages_and_services[line_item].systemd_state }}"
    enabled: "{{ __sap_hana_preconfigure_packages_and_services[line_item].systemd_enabled }}"
  when: "__sap_hana_preconfigure_packages_and_services[line_item].pkg in ansible_facts.packages"
