Artisan Développeur

Qualité, amélioration continue, agilité.

2 options to install elasticsearch plugins with ansible

Little post today, to remember, if you want to install plugins for elasticsearch with ansible (or others automation tool) you need to pass:

--batch --silent

According to the –help option:

Option Description
------ -----------
-E <KeyValuePair> Configure a setting
-b, --batch Enable batch mode explicitly, automatic confirmation of
security permission
-h, --help show help
-s, --silent show minimal output
-v, --verbose show verbose output
help for elasticsearch plugin install

Here my ansible task:

# install x-pack for elasticsearch
- name: Install x-pack for elasticsearch
  command: bin/elasticsearch-plugin install x-pack --silent --batch
      chdir: /usr/share/elasticsearch
ansible task install x-pack elasticsearch

And to install x-pack in Kibana:

# install x-pack for kibana
- name: Install x-pack for kibana
  command: bin/kibana-plugin install x-pack --silent
      chdir: /usr/share/kibana


As always improvements en comments are welcome 🙂

How to build latest heimdall – samsung galaxy grand prime SM-G530FM – Failed to download PIT file

I have a Samsung galaxy grand prime (aka SM-G530FZ), and I want to install a new custom rom.

I want to use Heimdall to install a custom recovery, as usual I search on xda-developers (best mobile resources) and find several thread about Galaxy grand prime.

But when I want to install the recovery with the simple command :

heimdall flash --RECOVERY recovery.img

I had the following error:

ERROR: Failed to send request to end PIT file transfer!
ERROR: Failed to download PIT file!

Solution is to build heimdall from sources.

  1. Clone github repository
  2. Build
  3. Make
  4. profit

1. Clone heimdall repository

First create a directory for heimdall:

mkdir heimdallFromSources

And clone:

git clone

2. Build it

From the linux/README

Appendix B – Installing Heimdall Suite from Source:

1. First make sure you have installed build-essential, cmake, zlib1g-dev,
qt5-default, libusb-1.0-0-dev and OpenGL (e.g libgl1-mesa-glx and

NOTE: Package names may not be absolutely identical to those above.

2. Open a terminal and navigate to the directory you downloaded,
or extracted, Heimdall to.

3. Enter the following commands to compile Heimdall Suite:

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..

Make sure you have all requirements from the 1 point and follow point 3

cd Heimdall
mkdir build
cd Build
cmake -DCMAKE_BUILD_TYPE=Release .. (note the .. are important)

After that

cd libpit
cd ..
cd heimdall

If all run without issue, you will have a bin folder, with heimdall in it.


./heimdall flash --RECOVERY path/to/you/recovery.img

That’s for heimdall !

After rebooting to the custom recovery with volume up + home + power I can’t user it, because touchscreen is not functionnal !

To save your time this is the TWRP functional for me (01/05/2017)

In this very moment I try to install the resurrection remix, I have tried 3 version so far, and no touchscreen … I let you know if I find a working release, if not, I think I will try lineageos

Resources :

Order relationships (association) between entities with symfony/doctrine

I want just share a little something today.
Sometimes, you spend time to try to achieve something, and when you finally manage to do it, you see, the best practice, the helper, the proxy class, you see the real and beautiful solution !

Today is one of this day for me, I need to order a relationship between to entities, managed by doctrine, in my Symfony project.
But instead of searching in the doc (RTFM… always) I have tried and lost my time before I search and found.
Ddoctrine is clearly an amazing solution, and *of course* my use case is already manage by an annotation :

Short (copied from doc):

/** @Entity **/
class User
// ...

* @ManyToMany(targetEntity="Group")
* @OrderBy({"name" = "ASC"})
private $groups;

/* With symfony  */
use Doctrine\ORM\Mapping as ORM;

/** @Entity **/
class User
// ...

*  *@ORM\ManyToMany(targetEntity="Group")
* @ORM\OrderBy({"name" = "ASC"})
private $groups;

Doctrine official :
Order relationship between entities

Yes ! Just like that