I'm finally able to run indentlatex correctly and here is how I solved the problem
First one have to create a configuration file for arara: araraconfig.yaml. This file should be placed in your home directory /home/<yourusername> and should indicate the path of latexindent.pl file in your system. My araraconfig.yaml on my Linux machine looks like this:
config
paths:
- /usr/local/texlive/2015/texmf-dist/scripts/latexindent
(The latexindent script comes with the 2015 TeX Live distribution).
Then one should copy indent.yaml in the arara rules directory (to be downloaded from here).
At this stage it is still not possible to run latexindent, some modules must be installed (see documentation p. 17). For this, from the command line run:
cpan
If not installed, Linux will ask you to install it.
Then from the CPAN prompt you could install missing moudules:
install YAML::Tiny
install Getopt::Long
install File::HomeDir
Once installation is finished, you can run latexindent from the command line:
latexindent
and to make it possible to run with arara, one last thing is needed, you should remove the .pl from the indent.yaml file. Here is the line that should be modified
command: @{ isWindows( "cmd /c latexindent.exe",
"latexindent.pl" ) } @{silent} @{trace} @{localSettings} @{cruft}@{
isNotEmpty( cruft, '="'.concat(parameters.cruft).concat('"') ) }
@{overwrite} @{onlyDefault} @{output} "@{file}" @{ isNotEmpty(
output, '"'.concat(parameters.output).concat('"') ) }