Sensor Ansible Lint Sensor - no active rules

Hello,

I got the same issue

|[15:13:29] :| [Step 2/2] 13:13:28.471 INFO: Sensor Ansible Lint Sensor [ansible]|
|---|---|
|[15:13:29] :| [Step 2/2] 13:13:28.471 DEBUG: Ansible sensor executed with context: org.sonar.scanner.sensor.ModuleSensorContext@c82ad22|
|[15:13:29] :| [Step 2/2] 13:13:28.471 INFO: No active rules found for this plugin, skipping.|

Indeed in quality profile I don’t have any separate section for ansible, there is YAML section and those rules are used in YAMLLint.
Question is: how to provide any rule to use in fact the ansible-lint ?

If the correct way to provide rules for ansible is sonar.ansible.ansiblelint.conf.path - as I suspect - what is the file content, how the rules can be specyfied? Do you have any example?

In terms of ansible code I’d like to scan not only YAML but NINJA (j2) too. How to achieve this?

Thanks,

Hi,

You’ll need to activate some of these rules in your default YAML(?) profile.

 
HTH,
Ann

Hi,

Ok I’ve created a profile with all rules with “ansible” tag and it works:

INFO: Sensor Ansible Lint Sensor [ansible]|
DEBUG: Ansible sensor executed with context:
Executing command: [/usr/bin/ansible-lint, -p, --nocolor, /opt/buildagent/work/4be9d3a93efbd450/add_image_pull_secrets.yaml]

Thanks,