Last active
October 11, 2017 17:55
-
-
Save RyanSnodgrass/e3d0bb8b16be4ad74068175939d4cc0f to your computer and use it in GitHub Desktop.
Neo4j EC2 instance Ansible run command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - | |
| become: true | |
| become_user: root | |
| hosts: all | |
| tasks: | |
| - | |
| name: "Install openJDK 8" | |
| yum: | |
| name: java-1.8.0-openjdk | |
| state: latest | |
| - | |
| alternatives: | |
| name: java | |
| path: /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java | |
| name: "correct java version selected" | |
| - | |
| name: "Download and unarchive neo4j file" | |
| unarchive: | |
| dest: /usr/local/share/. | |
| remote_src: true | |
| src: "http://dist.neo4j.org/{{neo4j_version}}-unix.tar.gz" | |
| - | |
| lineinfile: | |
| dest: "/usr/local/share/{{neo4j_version}}/conf/neo4j.conf" | |
| line: org.neo4j.server.webserver.address=0.0.0.0 | |
| regexp: "^#org\\.neo4j\\.server\\.webserver\\.address=0\\.0\\.0\\.0" | |
| name: "Update Config file" | |
| - | |
| lineinfile: | |
| dest: "/usr/local/share/{{neo4j_version}}/conf/neo4j.conf" | |
| line: dbms.security.auth_enabled=false | |
| regexp: "^#dbms.security.auth_enabled=false" | |
| name: "Turn off login security on neo4j browser" | |
| - | |
| lineinfile: | |
| dest: "/usr/local/share/{{neo4j_version}}/conf/neo4j.conf" | |
| line: dbms.connector.https.enabled=false | |
| regexp: ^dbms.connector.https.enabled=true | |
| name: "Update https.enabled to false" | |
| - | |
| lineinfile: | |
| dest: "/usr/local/share/{{neo4j_version}}/conf/neo4j.conf" | |
| line: "dbms.connector.http.address=0.0.0.0:7474" | |
| regexp: "^#dbms\\.connector\\.http\\.address=0\\.0\\.0\\.0:7474" | |
| name: "Uncomment http.address and set to open 0.0.0.0" | |
| # This fixes the | |
| # `WARNING: Max 1024 open files allowed, minimum of 40000 recommended. See the Neo4j manual.` | |
| # error when starting neo4j in linux | |
| # http://neo4j.com/docs/1.6.2/configuration-linux-notes.html | |
| - | |
| lineinfile: | |
| dest: /etc/security/limits.conf | |
| line: "root soft nofile 40000" | |
| state: present | |
| name: "create soft root limit" | |
| - | |
| lineinfile: | |
| dest: /etc/security/limits.conf | |
| line: "root hard nofile 40000" | |
| state: present | |
| name: "create hard root limit" | |
| - | |
| lineinfile: | |
| dest: /etc/pam.d/su | |
| line: "session required pam_limits.so" | |
| state: present | |
| name: "change pam limits as outlined in the manual" | |
| vars: | |
| neo4j_version: neo4j-community-3.0.9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment