jinja 2 template

24 views
Skip to first unread message

Sakshi Jain

unread,
Jul 31, 2021, 2:40:24 PM7/31/21
to Ansible Project
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

Antony Stone

unread,
Jul 31, 2021, 3:00:56 PM7/31/21
to ansible...@googlegroups.com
On Saturday 31 July 2021 at 20:40:24, Sakshi Jain wrote:

> Please help to resolve this error
>
> ansible-playbook: error: unrecognized arguments: --snyntax-check

You mis-spelled "syntax"?

Antony.

--
Warum können Seeräuber nicht den Umfang eines Kreises berechnen?
Weil sie Piraten...


Please reply to the list;
please *don't* CC me.

vinoth kumar

unread,
Jul 31, 2021, 4:31:55 PM7/31/21
to ansible...@googlegroups.com
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 . 

--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4b9bf0b7-8313-4f77-a763-5e5284794ab0n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages