Skip to content

Commit

Permalink
Make the neo4j ports configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincoakley committed Apr 21, 2017
1 parent c6dc7ed commit 6f03bfc
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 3 deletions.
5 changes: 4 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
neo4j_memory_pagecache_size: 10g
neo4j_connector_bolt_listen_address: :7687
neo4j_connector_http_listen_address: :7474
neo4j_connector_https_listen_address: :7473
24 changes: 24 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 9 additions & 1 deletion tests/docker_containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion tests/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6f03bfc

Please sign in to comment.