Plugin for jQAssistant (jQA), a tool suite to analyze arbitrary software structures (Java and other source code, dependencies, Git repositories, and many more). Enables to scan Ansible repositories for further analysis and reporting.
Based on
-
the great 101 Tutorial to write a jQAssistant Plugins,
-
the nice Ansible Inventory Java package.
|
Caution
|
Please note the 0.x version numbering and SNAPSHOTs
The plugin is currently only a starting point to scan Ansible repositories for jQA. In fact, it only allows to scan Ansible local inventories to jQA. Scanning of Ansible roles, playbooks etc. is currently left to the jQA YAML2 Plugin. Please note, that the plugin versioning follows Semantic Versioning but starts with a 0. Hence, the API and features are not yet stable and may change with every minor version upgrade without prior notice. In particular, SNAPSHOT versions can be very unstable due to the very nature of branch based uploads to Maven repositories. |
First versions are available via
link:pom.xml[role=include]as SNAPSHOT
link:pom.xml[role=include]Additionally it is possible to build it locally:
-
Optionally clone and build Ansible Inventory Java as pre-requisite:
-
git clone https://github.com/ascheman/ansible-inventory-java -
(cd ansible-inventory-java && ./mvnw clean install)
-
-
Clone and build the plugin itself
-
(cd jqa-ansible-plugin && ./mvnw clean install)
Use in your Ansible project as any other jQA plugin, e.g.,
...
<plugins>
<plugin>
<groupId>com.buschmais.jqassistant</groupId>
<artifactId>jqassistant-maven-plugin</artifactId>
<version>1.10-SNAPSHOT</version>
...
<dependencies>
...
<dependency>
<groupId>net.aschemann.jqassistant.plugins</groupId>
<artifactId>jqa-ansible-plugin</artifactId>
link:pom.xml[role=include]
</dependency>
</dependencies>
</plugin>
...It will detect your Ansible inventories (and the included hosts, groups, variables, and subgroups) and add them to Neo4j database.
Find a full example at https://github.com/ascheman/ansible-for-devops/tree/master/lamp-infrastructure.