Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
alerta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ansible
Roles
alerta
Commits
a7f84f7e
Commit
a7f84f7e
authored
5 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Run the ui through docker and provide an update task
parent
8ab6490c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
handlers/main.yml
+12
-0
12 additions, 0 deletions
handlers/main.yml
tasks/alerta.yml
+26
-11
26 additions, 11 deletions
tasks/alerta.yml
with
38 additions
and
11 deletions
handlers/main.yml
+
12
−
0
View file @
a7f84f7e
...
...
@@ -4,3 +4,15 @@
service
:
name
:
uwsgi
state
:
restarted
-
name
:
Re-create the alerta ui container
docker_container
:
name
:
alerta-beta
image
:
alerta/alerta-beta
state
:
started
recreate
:
yes
restart_policy
:
always
published_ports
:
-
8999:80
volumes
:
-
/var/www/alerta/config.json:/usr/share/nginx/html/config.json
This diff is collapsed.
Click to expand it.
tasks/alerta.yml
+
26
−
11
View file @
a7f84f7e
...
...
@@ -31,19 +31,24 @@
-
/var/www/alerta
-
/tmp/angular-alerta-webui-master
# docker run -d -v "/var/www/alerta/config.json:/usr/share/nginx/html/config.json" --restart=always -it -p 8999:80 --name alerta-beta alerta/alerta-beta
-
name
:
Ensure directory for web UI
file
:
path
:
'
{{
item
}}'
state
:
absent
with_items
:
-
/var/www/alerta
-
name
:
Download and extract web UI
unarchive
:
src
:
'
https://github.com/alerta/angular-alerta-webui/archive/v{{
alerta_ui_version
}}.zip'
dest
:
/tmp
remote_src
:
yes
#
- name: Download and extract web UI
#
unarchive:
#
src: 'https://github.com/alerta/angular-alerta-webui/archive/v{{ alerta_ui_version }}.zip'
#
dest: /tmp
#
remote_src: yes
-
name
:
Move new web UI
command
:
mv /tmp/angular-alerta-webui-{{ alerta_ui_version }}/app /var/www/alerta
args
:
creates
:
/var/www/alerta
removes
:
/tmp/angular-alerta-webui-{{ alerta_ui_version }}/app
#
- name: Move new web UI
#
command: mv /tmp/angular-alerta-webui-{{ alerta_ui_version }}/app /var/www/alerta
#
args:
#
creates: /var/www/alerta
#
removes: /tmp/angular-alerta-webui-{{ alerta_ui_version }}/app
-
name
:
Copy wsgi.py
template
:
...
...
@@ -131,3 +136,13 @@
copy
:
src
:
'
{{
inventory_dir
}}/files/favicon.ico'
dest
:
/var/www/alerta/favicon.ico
-
name
:
Pull docker image
docker_image
:
name
:
alerta/alerta-beta
source
:
pull
force_source
:
yes
notify
:
-
Re-create the alerta ui container
tags
:
-
ui
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment