This repository has been archived by the owner on Feb 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #338 from multinet-app/arango-ansible
Add ansible playbook for installing and running ArangoDB on AWS EC2 instance
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
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 |