Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.

Commit

Permalink
Merge pull request #338 from multinet-app/arango-ansible
Browse files Browse the repository at this point in the history
Add ansible playbook for installing and running ArangoDB on AWS EC2 instance
  • Loading branch information
waxlamp committed Mar 5, 2020
2 parents f9d456c + 92671d9 commit 1f5f0b1
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions devops/arangodb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
- hosts: all
remote_user: ubuntu

vars:
ansible_python_interpreter: /usr/bin/python3
arangodb_password: "letmein"

tasks:
# https://www.arangodb.com/download-major/ubuntu/
- name: Add arangodb release key
apt_key:
url: https://download.arangodb.com/arangodb35/DEBIAN/Release.key
state: present
become: true

- name: Create arangodb list file
shell: echo 'deb https://download.arangodb.com/arangodb35/DEBIAN/ /' | sudo tee /etc/apt/sources.list.d/arangodb.list
become: true

- name: Install arangodb dependency
apt:
name: apt-transport-https
update_cache: true
become: true

- name: Install arangodb
apt:
name: arangodb3=3.5.2-1
become: true

- name: Stop arangodb service
systemd:
name: arangodb3
state: stopped
become: true

- name: Overwrite the default arangodb password
shell: ARANGODB_DEFAULT_ROOT_PASSWORD={{ arangodb_password }} arango-secure-installation
become: true

- name: Enable arangodb to listen on all interfaces
lineinfile:
path: /etc/arangodb3/arangod.conf
regexp: '^endpoint ='
line: "endpoint = tcp://0.0.0.0:8529"
become: true

- name: Start arangodb service
systemd:
name: arangodb3
state: restarted
become: true

0 comments on commit 1f5f0b1

Please sign in to comment.