---
- name: Make sure sssd service is running
  runit:
    name: sssd
    state: started
  environment: "{{ runit_env }}"
  register: sssd_service_started
  tags:
    - sssd_config
    - sssd_pkg
      
- name: Make sure sssd service is enabled
  runit:
    name: sssd
    enabled: yes
  environment: "{{ runit_env }}"
  tags:
    - sssd_config

---
- name: Make sure sssd service is enabled
  runit:
    name: sssd
    enabled: yes
  environment: "{{ runit_env }}"
  tags:
    - sssd_config

- name: Make sure sssd service is running
  runit:
    name: sssd
    state: started
  environment: "{{ runit_env }}"
  register: sssd_service_started
  tags:
    - sssd_config
    - sssd_pkg

Rearrange tasks as the enabling must come before checking status, as the symlink to check the service doesn't exist until enabling
Rearrange tasks as the enabling must come before checking status, as the symlink to check the service doesn't exist until enabling
