Wazuh ansible agent deployment

340 views
Skip to first unread message

Peutre o/

unread,
Aug 4, 2021, 4:28:16 AM8/4/21
to Wazuh mailing list
Hello everyone,

When i try to deploy the wazuh agent via ansible i got this error:

TASK [../roles/wazuh/ansible-wazuh-agent : Linux CentOS/RedHat | Install wazuh-agent] **********************************************************************************************************************
fatal: [servername]: FAILED! => {"changed": false, "msg": "No package matching 'wazuh-agent-4.3.0-1' found available, installed or updated", "rc": 126, "results": ["No package matching 'wazuh-agent-4.3.0-1' found available, installed or updated"]}

Into the ../roles/wazuh/ansible-wazuh-agent/defaults/main.yml

i got :

wazuh_agent_repo:
  apt: 'deb https://packages.wazuh.com/4.x/apt/ stable main'
  key_id: '0DCFCA5547B19D2A6099506096B3EE5F29111145'

Do you i have to specify a good yum url ?

Thanks for the help

Viktor Nguyen

unread,
Aug 4, 2021, 5:57:15 AM8/4/21
to Wazuh mailing list
Maybe the host you want to deploy already had an older version of wazuh-repo. 
Try to delete the old repo by rm the file : /etc/yum.repo.d/wazuh.repo and run the ansible job again.

elw...@wazuh.com

unread,
Aug 4, 2021, 7:28:45 AM8/4/21
to Wazuh mailing list
Hello Peutre,

The ansible playbooks handle adding the repos and installing the corresponding agent, And it seems that you did not clone the correct branch which should be sudo git clone --branch v4.1.5 https://github.com/wazuh/wazuh-ansible.git as mentioned in https://documentation.wazuh.com/current/deploying-with-ansible/guide/install-ansible.html#playbooks-and-roles

I have just tested deploying an agent following this guide https://documentation.wazuh.com/current/deploying-with-ansible/guide/install-wazuh-agent.html to confirm that it is working as expected : 

image (103).png

Hope this helps.

Regards,
Wali

Peutre o/

unread,
Aug 4, 2021, 9:16:40 AM8/4/21
to Wazuh mailing list
Thank you everyone, indeed i deleted the old branch, i did the git clone of the v4.1.5 and it work well now, i am very happy ! 

Have a great week and thanks again !

Peutre

habtu deldil

unread,
Aug 11, 2021, 9:40:26 AM8/11/21
to Wazuh mailing list
hi guys  when I visit this link  https://packages.wazuh.com/4.x/apt/  I get this output can you help me?
 <Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>TQ5BE73XS09CQ1MA</RequestId>
<HostId>qLmcwaLwAYb/UoRe53TwNUu2UVRZovHMqF+K2g7ruDkj/YF7ItV0mexuPGlIuhpSo86j/eBFHCI=</HostId>
</Error>

Reply all
Reply to author
Forward
0 new messages