Skip to content

Commit d6c4558

Browse files
authored
Merge pull request #76 from wiseflat/dev/mgarcia/settings-backup
Multiple fix
2 parents 99f831d + e06ee57 commit d6c4558

14 files changed

Lines changed: 41 additions & 82 deletions

File tree

ansible/playbooks/paas/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
ansible.builtin.apt:
2525
pkg:
2626
- python3-debian
27+
- python3-venv
2728
- unzip
2829
- make
2930
- jq
@@ -38,7 +39,10 @@
3839

3940
roles:
4041
- unattended-upgrades
42+
- ansible-ufw
4143

44+
- name: Configure timesyncd
45+
ansible.builtin.import_playbook: timesyncd.yml
4246
- name: Configure systemd resolved
4347
ansible.builtin.import_playbook: systemd-resolved.yml
4448
- name: Configure docker

ansible/playbooks/paas/metrology.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
hosts: "{{ hosts_limit | default('infrastructure') }}"
55
gather_facts: true
66
become: true
7-
vars_prompt:
8-
- name: project
9-
prompt: project name
10-
private: false
117
tasks:
128
- name: End the play for hosts that are not in admins group
139
ansible.builtin.meta: end_host

ansible/playbooks/paas/roles/prometheus/templates/config.j2

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ scrape_configs:
6666
regex: "^(__tmp_keep_me)$"
6767

6868
static_configs:
69-
{% for item in groups['infrastructure'] | default([]) if item.split('.')[4] == project %}
69+
{% for item in groups['infrastructure'] | default([]) if item.split('.')[4] == prometheus_project %}
7070
- targets: ['{{ hostvars[item]['ansible_' + hostvars[item].nomad_iface]['ipv4']['address'] }}:9100']
7171
labels:
7272
instance: "{{ item }}"
@@ -178,7 +178,7 @@ scrape_configs:
178178
tls_config:
179179
insecure_skip_verify: true
180180
static_configs:
181-
{% for item in groups['infrastructure'] | default([]) if item.split('.')[4] == project %}
181+
{% for item in groups['infrastructure'] | default([]) if item.split('.')[4] == prometheus_project %}
182182
- targets: ['{{ hostvars[item]['ansible_' + hostvars[item].nomad_iface]['ipv4']['address'] }}:9558']
183183
labels:
184184
instance: "{{ item }}"
@@ -194,7 +194,7 @@ scrape_configs:
194194
format: ['prometheus']
195195
metrics_path: /metrics
196196
static_configs:
197-
{% for item in groups['infrastructure'] | default([]) if item.split('.')[4] == project %}
197+
{% for item in groups['infrastructure'] | default([]) if item.split('.')[4] == prometheus_project %}
198198
- targets: ['{{ hostvars[item]['ansible_' + hostvars[item].nomad_iface]['ipv4']['address'] }}:9835']
199199
labels:
200200
instance: "{{ item }}"
@@ -214,7 +214,7 @@ scrape_configs:
214214
tls_config:
215215
insecure_skip_verify: true
216216
static_configs:
217-
{% for item in groups['infrastructure'] | default([]) if item.split('.')[4] == project %}
217+
{% for item in groups['infrastructure'] | default([]) if item.split('.')[4] == prometheus_project %}
218218
- targets: ['{{ hostvars[item]['ansible_' + hostvars[item].nomad_iface]['ipv4']['address'] }}:4646']
219219
labels:
220220
instance: "{{ item }}"
@@ -246,7 +246,7 @@ scrape_configs:
246246
tls_config:
247247
insecure_skip_verify: true
248248
static_configs:
249-
{% for item in groups['infrastructure'] | default([]) if item.split('.')[4] == project %}
249+
{% for item in groups['infrastructure'] | default([]) if item.split('.')[4] == prometheus_project %}
250250
- targets: ['{{ hostvars[item]['ansible_' + hostvars[item].nomad_iface]['ipv4']['address'] }}:9080']
251251
labels:
252252
instance: "{{ item }}"

ansible/playbooks/paas/roles/script_exporter/tasks/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
- name: Script_exporter | Include upstream variables
33
ansible.builtin.include_vars: upstream.yml
44

5+
- name: Script_exporter | Get speedtest script
6+
include_tasks: speedtest.yml
7+
58
- name: Script_exporter | Get binary
69
include_tasks: build.yml
710
when: ansible_local[image.name] is not defined or ansible_local[image.name] != latest_version
811

9-
- name: Script_exporter | Get speedtest script
10-
include_tasks: speedtest.yml
11-
1212
- name: Script_exporter | Create custom directories
1313
ansible.builtin.file:
1414
dest: "{{ item }}"
Lines changed: 9 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,18 @@
11
---
2-
- debug:
3-
msg: "https://install.speedtest.net/app/cli/ookla-speedtest-1.2.0-linux-{{ script_exporter_scripts.speedtest.architecture_map[ansible_facts.architecture] }}.tgz"
2+
- name: Install speedtest packages
3+
ansible.builtin.apt:
4+
pkg:
5+
- speedtest-cli
46

5-
- name: Script_exporter | Create temporary build directory
6-
ansible.builtin.file:
7-
path: "{{ item }}"
8-
recurse: true
9-
state: directory
10-
mode: '0755'
11-
loop:
12-
- "{{ build_work_dir }}/download"
13-
- "{{ build_work_dir }}/{{ upstream_default_arch }}"
14-
15-
- name: Script_exporter | Download speedtest script
16-
ansible.builtin.get_url:
17-
url: "https://install.speedtest.net/app/cli/ookla-speedtest-1.2.0-linux-{{ script_exporter_scripts.speedtest.architecture_map[ansible_facts.architecture] }}.tgz"
18-
dest: "{{ build_work_dir }}/download/speedtest.tgz"
19-
mode: '0644'
20-
force: no
21-
register: download_result
22-
23-
- name: Script_exporter | Unarchive speedtest script
24-
ansible.builtin.unarchive:
25-
src: "{{ build_work_dir }}/download/speedtest.tgz"
26-
dest: "{{ build_work_dir }}/download"
27-
remote_src: true
28-
when: download_result.changed
29-
30-
- name: Script_exporter | Install binary
7+
- name: Script_exporter | Install speedtest-exporter
318
ansible.builtin.copy:
32-
src: "{{ build_work_dir }}/download/speedtest"
9+
src: speedtest-exporter
3310
dest: /usr/local/bin/
3411
owner: root
3512
group: root
3613
mode: '0755'
37-
remote_src: true
3814

39-
- name: Script_exporter | Clean up
15+
- name: Script_exporter | Remove old speedtest binary (TODO remove)
4016
ansible.builtin.file:
41-
path: "{{ build_work_dir }}"
42-
state: absent
43-
44-
- name: Script_exporter | Install speedtest-exporter
45-
ansible.builtin.copy:
46-
src: speedtest-exporter
47-
dest: /usr/local/bin/
48-
owner: root
49-
group: root
50-
mode: '0755'
17+
path: /usr/local/bin/speedtest
18+
state: absent

ansible/playbooks/paas/roles/script_exporter/vars/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ script_exporter_scripts:
2222
armv7: armhf
2323
amd64: amd64
2424
x86_64: x86_64
25-
aarch64: aarch64
25+
aarch64: arm64

ansible/playbooks/saas/roles/mosquitto/templates/mosquitto-no-auth.conf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
listener 1883
55
persistence true
66
persistence_location /mosquitto/data/
7-
log_type all
7+
log_type error
88
log_dest file /mosquitto/log/mosquitto.log
99
allow_anonymous true

ui/controllers/api.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ exports.install = function() {
1010
ROUTE('+API /api/ -users_remove/{id} --> Users/remove');
1111
ROUTE('-API /api/ +login --> Users/login');
1212

13-
ROUTE('+API /api/ -settings_read --> Users/settings_read');
14-
ROUTE('+API /api/ +settings_update --> Users/settings_update');
13+
ROUTE('+API /api/ -profile_read --> Users/profile_read');
14+
ROUTE('+API /api/ +profile_update --> Users/profile_update');
1515
ROUTE('+API /api/ +password --> Users/password_update');
1616
ROUTE('+GET /logout/ --> Users/logout');
1717

ui/definitions/init.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
CONF.$customtitles = true;
22
CONF.version = '1.1';
33

4-
MAIN.users = [];
5-
6-
(async function() {
7-
var tmp = [];
8-
for (let m of tmp) {
9-
if (m !== null && m !== 'bot')
10-
MAIN.users.push(m);
11-
}
12-
})();
13-
144
LOCALIZE(ctrl => ctrl.query.language || (ctrl.user ? ctrl.user.language : CONF.language));

ui/index.js.map

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)