Linux Operating System (MOSC)

MOSC Banner

Ansible playbook to start vsftpd fails

edited Feb 6, 2024 12:31AM in Linux Operating System (MOSC) 1 commentAnswered

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"}

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center