Skip to content

Commit

Permalink
Add clean up role
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardehrenfried committed Jan 6, 2025
1 parent 1dc1576 commit da20f1b
Show file tree
Hide file tree
Showing 22 changed files with 31 additions and 314 deletions.
2 changes: 1 addition & 1 deletion digitransit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
become: yes
roles:
- base
- clean_up
- digitransit
- thingsboard-enhancer
- thingsboard-to-mqtt
- matomo
3 changes: 0 additions & 3 deletions group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ firewall_allowed_tcp_ports:
- "22"
- "80"
- "443"
- "1883" # mqtt
- "1884" # mqtt-over-websockets
- "8883" # mqtts

# firewall
firewall_state: started
Expand Down
3 changes: 3 additions & 0 deletions roles/clean_up/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
- name: Restart systemd-journald
service: name=systemd-journald state=restarted
27 changes: 27 additions & 0 deletions roles/clean_up/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
- name: Stop unused services
ansible.builtin.systemd:
name: "{{ item }}"
state: stopped
daemon_reload: true
with_items:
- mosquitto
- thingsboard-to-mqtt
ignore_errors: true

- name: Remove systemd files
ansible.builtin.file:
dest: /etc/systemd/system/{{ item }}
state: absent
with_items:
- mosquitto.service
- thingsboard-to-mqtt.service

- name: Remove folders
ansible.builtin.file:
path: "{{ item }}"
state: absent
with_items:
- /etc/mosquitto/
- /var/graph-builder/
- /var/delay-prediction/
4 changes: 0 additions & 4 deletions roles/delay-prediction-service/defaults/main.yml

This file was deleted.

5 changes: 0 additions & 5 deletions roles/delay-prediction-service/handlers/main.yml

This file was deleted.

4 changes: 0 additions & 4 deletions roles/delay-prediction-service/meta/main.yml

This file was deleted.

60 changes: 0 additions & 60 deletions roles/delay-prediction-service/tasks/main.yml

This file was deleted.

25 changes: 0 additions & 25 deletions roles/delay-prediction-service/templates/delay-postgis.service

This file was deleted.

29 changes: 0 additions & 29 deletions roles/delay-prediction-service/templates/delay-prediction-service

This file was deleted.

16 changes: 0 additions & 16 deletions roles/delay-prediction-service/templates/delay-prediction.service

This file was deleted.

6 changes: 0 additions & 6 deletions roles/mqtt/handlers/main.yml

This file was deleted.

3 changes: 0 additions & 3 deletions roles/mqtt/meta/main.yml

This file was deleted.

40 changes: 0 additions & 40 deletions roles/mqtt/tasks/main.yml

This file was deleted.

4 changes: 0 additions & 4 deletions roles/mqtt/templates/mosquitto.acl

This file was deleted.

23 changes: 0 additions & 23 deletions roles/mqtt/templates/mosquitto.conf

This file was deleted.

1 change: 0 additions & 1 deletion roles/mqtt/templates/mosquitto.passwd

This file was deleted.

27 changes: 0 additions & 27 deletions roles/mqtt/templates/mosquitto.service

This file was deleted.

5 changes: 0 additions & 5 deletions roles/thingsboard-to-mqtt/handlers/main.yml

This file was deleted.

4 changes: 0 additions & 4 deletions roles/thingsboard-to-mqtt/meta/main.yml

This file was deleted.

22 changes: 0 additions & 22 deletions roles/thingsboard-to-mqtt/tasks/main.yml

This file was deleted.

32 changes: 0 additions & 32 deletions roles/thingsboard-to-mqtt/templates/thingsboard-to-mqtt.service

This file was deleted.

0 comments on commit da20f1b

Please sign in to comment.