I am trying to clear a hands on in HackerRank, where the task is to stop and start the service named ssh using service module. I have used the below code.
- name: "Stop ssh"
service:
name: ssh
state: stopped
- name: "start ssh"
service:
name: ssh
state: started
Can you please guide me to clear the hands on.