Skip to content

Commit

Permalink
Merge pull request #19 from juwi/tower-changes
Browse files Browse the repository at this point in the history
Improve signaltower role
  • Loading branch information
juwi authored Nov 14, 2021
2 parents 0496ad9 + fdd2918 commit 74539e9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 78 deletions.
24 changes: 0 additions & 24 deletions roles/palava-signaltower/tasks/install-erlang-debian.yml

This file was deleted.

15 changes: 0 additions & 15 deletions roles/palava-signaltower/tasks/install-erlang-redhat.yml

This file was deleted.

24 changes: 0 additions & 24 deletions roles/palava-signaltower/tasks/install-erlang-ubuntu.yml

This file was deleted.

25 changes: 10 additions & 15 deletions roles/palava-signaltower/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,41 @@
---

- name: Install Erlang
include_tasks: "install-erlang-{{ ansible_os_family | lower }}.yml"

- name: Install elixir dependencies
- name: Install Elixir and Git
package:
name: [ 'git', 'esl-erlang', 'elixir' ]
name: [ 'git', 'elixir' ]
state: present

- name: Create signaltower directory
- name: Create Signaltower directory
file:
path: "{{ palava_signaltower_install_dir }}"
state: directory
owner: root
group: root
mode: 0775

- name: Create signaltower log directory
- name: Create Signaltower log directory
file:
path: "{{ palava_signaltower_log_dir }}"
state: directory
owner: root
group: root
mode: 0775

- name: Checkout Signltower
- name: Checkout Signaltower
git:
repo: 'https://github.com/palavatv/signaltower.git'
dest: /srv/signaltower
version: "{{ palava_signaltower_version }}"

- name: Prepare Release
- name: Prepare release
shell: mix local.hex --force

- name: Install signaltower dependencies
- name: Install Signaltower dependencies
shell: "cd {{ palava_signaltower_install_dir }} && yes | mix deps.get"

- name: Set Release Type
- name: Create release
shell: "cd {{ palava_signaltower_install_dir }} && yes | MIX_ENV=prod mix release {{ palava_environment }}"

- name: Build Signaltower
shell: "cd {{ palava_signaltower_install_dir }} && yes | mix deps.compile"

- name: Ensure palava_group exists
group:
name: "{{ palava_group }}"
Expand All @@ -52,7 +46,7 @@
name: "{{ palava_user }}"
group: "{{ palava_group }}"

- name: Ensure signaltower ownership
- name: Ensure Signaltower ownership
file:
path: "{{ palava_signaltower_install_dir }}"
owner: "{{ palava_user }}"
Expand All @@ -66,6 +60,7 @@

- name: Start Signaltower
systemd:
state: started
daemon_reload: "{{ palava_signaltower_autostart }}"
enabled: "{{ palava_signaltower_autostart }}"
name: "signaltower-{{ palava_environment }}.service"

0 comments on commit 74539e9

Please sign in to comment.