Unable to install search guard through ansible

Unable to Automate Search Guard through Ansible. No plugins available. Any idea of automating search guard installation through script or ansible ?

Elastic Search : 2.4.2

Search Guard: 2.4

This is not nearly enough information to help you.

“Unable to Automate Search Guard through Ansible”

Why? What is the error you are seeing? What exactly does not work? What is your Ansible script?

“No plugins available”

What does that mean exactly?

···

On Monday, April 16, 2018 at 10:57:00 AM UTC-7, Bishwajit Samanta wrote:

Unable to Automate Search Guard through Ansible. No plugins available. Any idea of automating search guard installation through script or ansible ?

Elastic Search : 2.4.2

Search Guard: 2.4

Hi, Jochen sorry for making incomplete post… I tried installation of Head plugin through ansible, it worked out. But i am not able to find any way to install Search-Guard Plugin through ansible. I havent find any module available to install search guard plugin through ansible. Any idea is welcomed …

Error given in 1st Scenario below. There is another way i tried to install Search -Guard Plugin that also doesnt work. I just got frustrated in automating it through ansible. Sorry for incomplete post.

SCENARIO:1:-

···

[root@ansible-master ansible]# ansible-playbook 6.1_ansible_el_pg.yaml

PLAY [deploy] ***************************************************************************************************************************

TASK [deploy : Install Elastic Search Head Plugin] **************************************************************************************
Monday 16 April 2018 19:05:25 +0530 (0:00:00.035) 0:00:00.035 **********
ok: [192.168.56.121]

TASK [deploy : Install Elastic Search Search Guard Plugin] **************************************************************************************
Monday 16 April 2018 19:05:26 +0530 (0:00:00.854) 0:00:00.889 **********
fatal: [192.168.56.121]: FAILED! => {“changed”: false, “err”: “failed to download out of all possible locations…, use --verbose to get detailed information”, “msg”: “Is search-guard-2 a valid plugin name?”}
to retry, use: --limit @/root/ansible/6.1_ansible_el_pg.retry

PLAY RECAP ******************************************************************************************************************************
192.168.56.121 : ok=1 changed=0 unreachable=0 failed=1

Monday 16 April 2018 19:05:41 +0530 (0:00:14.426) 0:00:15.316 **********

deploy : Install Elastic Search Head Plugin ------------------------------------------------------------------------------------- 14.43s
deploy : Install Elastic Search Search Guard Plugin -------------------------------------------------------------------------------------- 0.85s

SCENARIO: 2::


Another way i tried, no luck…

Playbook:



  • hosts: deploy

gather_facts: no

tasks:

  • script: /opt/search_guard.sh

Contents of search_guard.sh ::-


cd /usr/share/elasticsearch/bin

sh ./plugin install -b com.floragunn/search-guard-2/2.4.2.9

Error:-


TASK [script] ***************************************************************************************************************************

Monday 16 April 2018 20:45:02 +0530 (0:00:00.072) 0:00:00.072 **********

fatal: [192.168.56.121]: FAILED! => {“changed”: true, “msg”: “non-zero return code”, “rc”: 127, “stderr”: “Shared connection to 192.168.56.121 closed.\r\n”, “stdout”: “/bin/sh: 1: /root/.ansible/tmp/ansible-tmp-1523891702.02-243715668987716/search_guard.sh: not found\r\n”, “stdout_lines”: ["/bin/sh: 1: /root/.ansible/tmp/ansible-tmp-1523891702.02-243715668987716/search_guard.sh: not found"]}

Though the script was present in the location.


On Monday, April 16, 2018 at 11:31:08 PM UTC+5:30, Jochen Kressin wrote:

This is not nearly enough information to help you.

“Unable to Automate Search Guard through Ansible”

Why? What is the error you are seeing? What exactly does not work? What is your Ansible script?

“No plugins available”

What does that mean exactly?

On Monday, April 16, 2018 at 10:57:00 AM UTC-7, Bishwajit Samanta wrote:

Unable to Automate Search Guard through Ansible. No plugins available. Any idea of automating search guard installation through script or ansible ?

Elastic Search : 2.4.2

Search Guard: 2.4

Can anyone help me please ?

So in the first example it seems that the install command / Version number is not correct:

fatal: [192.168.56.121]: FAILED! => {“changed”: false, “err”: “failed to download out of all possible locations…, use --verbose to get detailed information”, “msg”: “Is search-guard-2 a valid plugin name?”}

What is the exact command you are running there?

The second example has a superfluous “sh”. Instead of:

sh ./plugin install -b com.floragunn/search-guard-2/2.4.2.9

Just try:

./plugin install -b com.floragunn/search-guard-2/2.4.2.9

···

On Monday, April 16, 2018 at 7:01:48 PM UTC-7, Bishwajit Samanta wrote:

Can anyone help me please ?