Ansible playbook to start vsftpd fails
Hi,
Using Oracle Linux 8, I have crated a playbook, which install the vsftp package and starts the service.
When I test the play-book it validates without any error but if execute a dry run the playbook return an error over the start of service.
---
- hosts: test
become: true
become_user: root
tasks:
- name: vSftpd install
yum:
name: vsftpd
state: present
- name: Start ftp sever
service:
name: vsftpd
state: started
enabled: true
The error message of the dry run is :
TASK [vSftpd install] *************************************************************************************************************************************************************************************************
changed: [node2]
changed: [node1]
TASK [Start FTP Service] **********************************************************************************************************************************************************************************************
fatal: [node2]: FAILED! => {"changed": false, "msg": "Could not find the requested service vsftpd.service: host"}