fix(pam_ldap): Fix nscd service restart with state check

Sometimes the nscd service does not exist yet when running a playbook the first time.

The fix from https://github.com/codeenigma/ce-provision/pull/2693 was not correct, as the variable _nscd_service_check is defined is always defined.

Error in playbook:

TASK [debian/pam_ldap : Restart nscd service.] *********************************
fatal: [server.example.com]: FAILED! => 
    changed: false
    msg: 'Could not find the requested service nscd: host'

Merge request reports

Loading