diff --git a/defaults/main.yml b/defaults/main.yml index e6bc95c..0636535 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -5,4 +5,7 @@ neo4j_server_database_location: /var/lib/neo4j/data neo4j_allow_any_connection: false neo4j_memory_heap_initial_size: 512m neo4j_memory_heap_max_size: 512m -neo4j_memory_pagecache_size: 10g \ No newline at end of file +neo4j_memory_pagecache_size: 10g +neo4j_connector_bolt_listen_address: :7687 +neo4j_connector_http_listen_address: :7474 +neo4j_connector_https_listen_address: :7473 \ No newline at end of file diff --git a/tasks/main.yml b/tasks/main.yml index 9929439..bcb4663 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -59,6 +59,30 @@ when: neo4j_allow_any_connection | bool notify: Restart Neo4j +- name: Set the neo4j bolt listen address + lineinfile: + dest: /etc/neo4j/neo4j.conf + regexp: '^dbms\.connector\.bolt\.listen_address=.*' + line: "dbms.connector.bolt.listen_address={{ neo4j_connector_bolt_listen_address }}" + state: present + notify: Restart Neo4j + +- name: Set the neo4j http listen address + lineinfile: + dest: /etc/neo4j/neo4j.conf + regexp: '^dbms\.connector\.http\.listen_address=.*' + line: "dbms.connector.http.listen_address={{ neo4j_connector_http_listen_address }}" + state: present + notify: Restart Neo4j + +- name: Set the neo4j https listen address + lineinfile: + dest: /etc/neo4j/neo4j.conf + regexp: '^dbms\.connector\.https\.listen_address=.*' + line: "dbms.connector.https.listen_address={{ neo4j_connector_https_listen_address }}" + state: present + notify: Restart Neo4j + - name: Ensure open files soft and hard limits are set copy: src: etc/security/limits.d/neo4j.conf diff --git a/tests/docker_containers.yml b/tests/docker_containers.yml index 5b20b23..f6a9fad 100644 --- a/tests/docker_containers.yml +++ b/tests/docker_containers.yml @@ -4,17 +4,25 @@ docker_containers: image: kevincoakley/ubuntu16.04-systemd expose: - "7474" + - "7473" + - "7687" ports: - "2200:22" - "7474:7474" + - "7473:7473" + - "7687:7687" volumes: - "/sys/fs/cgroup:/sys/fs/cgroup" - name: centos-system image: kevincoakley/centos7-systemd expose: - "7474" + - "7473" + - "7687" ports: - "2222:22" - - "7475:7474" + - "7574:7474" + - "7573:7473" + - "7787:7687" volumes: - "/sys/fs/cgroup:/sys/fs/cgroup" diff --git a/tests/test.yml b/tests/test.yml index 93f2038..c8a6806 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -17,7 +17,7 @@ - docker-start -- name: Test the Neo4j role for Ubuntu systems +- name: Test the Neo4j role hosts: neo4j become: yes become_method: sudo