platform42.neo4j
Fast, declarative, developer-friendly graph automation Managing Neo4j at scale often requires more than ad-hoc Cypher scripts or manually maintained synchronization workflows. With the platform42.neo4j Ansible modules, we provide a clean, reliable, and fully declarative way for developers and DevOps teams to create, update, and manage graph data — repeatedly and predictably.
At the core of our design is Idempotency: you describe the desired state of your graph, and the modules ensure that Neo4j ends up in that exact state, no matter how many times you run them. Nodes, relationships, labels, and properties are all reconciled automatically. For high-volume graph models, we introduced bulk primitives for vertices and edges.
The modules come with strict schema validation, clear diagnostics, and detailed summaries of what changed. Developers stay in control: every primitive maps cleanly to a small, understandable Cypher query, while Ansible handles ordering, batching, and consistency.
Whether you're building knowledge graphs, recommendation systems, digital twins, or complex domain models, platform42.neo4j lets you version, test, and automate your graph just like any other piece of infrastructure. It brings Neo4j into the world of repeatable, testable DevOps — and lets developers focus on modeling rather than plumbing.
Collection
- Collection version 4.3.0
Modules
These are the modules in the platform42.neo4j collection:
- graph_reset module - Reset Graph database
- vertex module - Create Neo4j node
- vertex_bulk module - Create Neo4j vertices from YAML input file
- edge module - Create Neo4j relationship
- edge_bulk module - Create Neo4j edges from YAML imput file
- label - Create secundary label on existing Neo4j node
- contraint - Create a unique constraint on an existing Neo4j property
Sample projects
U-bahn - shortest path to destination
Sudoku - solving Sudoku using colouring graph
Galaxy
Install platform42.neo4j collection with Ansible Galaxy prior to executing your playbook with graph primitives. Consider bash-script sample.sh below:
- extracts latest main-branch of platform42.neo4j.
- installs the platform42.neo4j collection on your host
- executes an Ansible playbook with identical name - sample.yml.
#!/usr/bin/env bash
SCRIPT=$(realpath "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
BRANCH=main
cd ${SCRIPTPATH}
ansible-galaxy collection install git@github.com:platform-42/platform42.neo4j.git,${BRANCH}
ansible-playbook -i hosts/hosts.yml $(basename ${0%.*}).yml