It clearly says that you have to be as a root user . Check you have root
access on target machine and Add become:yes on your playbook. And run with
ansible-playbook lab27.yaml -k -k

If you are using Limey based Authentication. It’s not required .

On Sat 31. Jul 2021 at 20:40, Sakshi Jain <[email protected]> wrote:

> Please help to resolve this error
>
> ansible-playbook: error: unrecognized arguments: --snyntax-check
> [ec2-user@ansible-engine jinja2]$ ansible-playbook lab27.yaml
>
> PLAY [install vsftpd]
> ******************************************************************************************************************************************************
>
> TASK [Gathering Facts]
> *****************************************************************************************************************************************************
> [WARNING]: Platform linux on host node2 is using the discovered Python
> interpreter at /usr/bin/python, but future installation of another Python
> interpreter could change
> this. See
> https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html
>  for
> more information.
> ok: [node2]
>
> TASK [get basic vsftpd operational]
> ****************************************************************************************************************************************
> fatal: [node2]: FAILED! => {"changed": false, "changes": {"installed":
> ["vsftpd"]}, "msg": "You need to be root to perform this command.\n", "rc":
> 1, "results": ["Loaded plugins: extras_suggestions, langpacks, priorities,
> update-motd\n"]}
>
> PLAY RECAP
> *****************************************************************************************************************************************************************
> node2                      : ok=1    changed=0    unreachable=0
>  failed=1    skipped=0    rescued=0    ignored=0
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/4b9bf0b7-8313-4f77-a763-5e5284794ab0n%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/4b9bf0b7-8313-4f77-a763-5e5284794ab0n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJ%2BRxtRKx_UePmaRW0eh29VCvA5rPjVR9A%2B8Kzzvh5wC_4zFvQ%40mail.gmail.com.

Reply via email to