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 #375 from multinet-app/arango-password-var
Browse files Browse the repository at this point in the history
Make Arango root password configurable at provisioning time
  • Loading branch information
waxlamp committed May 1, 2020
2 parents dc5de2d + f6fbdbc commit 02e6899
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
8 changes: 5 additions & 3 deletions devops/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
The `arangodb.yml` Ansible playbook in this directory installs and configures
ArangoDB on an Ubuntu server. It does the following:
- installs ArangoDB
- sets a default password (this will be configurable in the future; see
https://github.com/multinet-app/multinet-server/issues/348)
- sets a password on the root account
- configures it to listen on all interfaces
- starts the service

To set the root account password, you can either supply it on the command line
(see below) or just let Ansible prompt you for it.

To run it via ssh, run a command such as the following:

```
ansible-playbook -i <target-hostname>, arangodb.yml --ssh-extra-args="-i <identify.pem>"
ansible-playbook arangodb.yml -i <target-hostname>, --ssh-extra-args="-i <identity.pem>" -e arangodb_root_password=<password>
```
7 changes: 5 additions & 2 deletions devops/arangodb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

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

vars_prompt:
- name: arangodb_root_password
prompt: "Password for ArangoDB root account"

tasks:
# https://www.arangodb.com/download-major/ubuntu/
Expand Down Expand Up @@ -36,7 +39,7 @@
become: true

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

- name: Enable arangodb to listen on all interfaces
Expand Down

0 comments on commit 02e6899

Please sign in to comment.