Automated changes from linter ;P
This commit is contained in:
parent
44b73a216f
commit
f7f04e7a41
65 changed files with 392 additions and 324 deletions
|
@ -1,13 +1,14 @@
|
|||
---
|
||||
- import_tasks: ../../common/handlers/main.yaml
|
||||
- ansible.builtin.import_tasks:
|
||||
file: ../../common/handlers/main.yaml
|
||||
|
||||
- name: restart spaceapi
|
||||
systemd:
|
||||
ansible.builtin.systemd:
|
||||
name: spaceapi
|
||||
state: restarted
|
||||
daemon_reload: true
|
||||
|
||||
- name: restart mqtt2web
|
||||
systemd:
|
||||
ansible.builtin.systemd:
|
||||
name: mqtt2web
|
||||
state: restarted
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
---
|
||||
- name: Install dependencies
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name: [ python3-requests, python3-icalendar ]
|
||||
|
||||
- name: Clone source
|
||||
git:
|
||||
ansible.builtin.git:
|
||||
repo: https://github.com/bitlair/calendar-parser.git
|
||||
version: main
|
||||
dest: /usr/local/src/bitlair-calendar
|
||||
accept_hostkey: yes
|
||||
|
||||
- name: Create user
|
||||
user:
|
||||
ansible.builtin.user:
|
||||
name: bitlair-calendar
|
||||
home: /var/lib/bitlair-calendar
|
||||
|
||||
- name: Install cronjob
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: calendar.cron
|
||||
dest: /etc/cron.d/bitlair-calendar
|
||||
owner: root
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
---
|
||||
- tags: www_calendar
|
||||
import_tasks: calendar.yaml
|
||||
ansible.builtin.import_tasks:
|
||||
file: calendar.yaml
|
||||
|
||||
- tags: www_mediawiki
|
||||
import_tasks: mediawiki.yaml
|
||||
ansible.builtin.import_tasks:
|
||||
file: mediawiki.yaml
|
||||
|
||||
- tags: www_mqtt
|
||||
import_tasks: mqtt.yaml
|
||||
ansible.builtin.import_tasks:
|
||||
file: mqtt.yaml
|
||||
|
||||
- tags: www_spaceapi
|
||||
import_tasks: spaceapi.yaml
|
||||
ansible.builtin.import_tasks:
|
||||
file: spaceapi.yaml
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
---
|
||||
- name: Install dependencies
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name: php-fpm
|
||||
state: present
|
||||
|
||||
- import_tasks: ../../../snippets/common-nginx.yaml
|
||||
- ansible.builtin.import_tasks:
|
||||
file: ../../../snippets/common-nginx.yaml
|
||||
|
||||
- name: Install security.txt
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: security.txt
|
||||
dest: /opt/security.txt
|
||||
owner: root
|
||||
|
@ -15,7 +16,7 @@
|
|||
mode: 0644
|
||||
|
||||
- name: Allow HTTP/HTTPS
|
||||
iptables:
|
||||
ansible.builtin.iptables:
|
||||
chain: INPUT
|
||||
protocol: tcp
|
||||
destination_port: "{{ item.port }}"
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
- name: Install dependencies
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- libjson-xs-perl
|
||||
- liblinux-epoll-perl
|
||||
- mosquitto
|
||||
|
||||
- name: Allow MQTT
|
||||
iptables:
|
||||
ansible.builtin.iptables:
|
||||
chain: INPUT
|
||||
protocol: tcp
|
||||
destination_port: "{{ item.port }}"
|
||||
|
@ -21,10 +21,11 @@
|
|||
notify: persist iptables
|
||||
|
||||
- name: Install mqtt-simple
|
||||
command: cpan Net::MQTT::Simple
|
||||
ansible.builtin.command:
|
||||
cmd: cpan Net::MQTT::Simple
|
||||
|
||||
- name: Clone mqtt2web source
|
||||
git:
|
||||
ansible.builtin.git:
|
||||
repo: https://github.com/bitlair/mqtt2web.git
|
||||
version: master
|
||||
dest: /opt/mqtt2web
|
||||
|
@ -32,7 +33,7 @@
|
|||
notify: restart mqtt2web
|
||||
|
||||
- name: Install mqtt2web service file
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: mqtt2web.service
|
||||
dest: /etc/systemd/system/mqtt2web.service
|
||||
owner: root
|
||||
|
@ -42,10 +43,10 @@
|
|||
- daemon reload
|
||||
- restart mqtt2web
|
||||
|
||||
- meta: flush_handlers
|
||||
- ansible.builtin.meta: flush_handlers
|
||||
|
||||
- name: Enable mqtt2web
|
||||
systemd:
|
||||
ansible.builtin.systemd:
|
||||
name: mqtt2web
|
||||
state: started
|
||||
enabled: true
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
- name: Clone spaceapi source
|
||||
git:
|
||||
ansible.builtin.git:
|
||||
repo: https://github.com/bitlair/spaceapi.git
|
||||
version: main
|
||||
dest: /opt/spaceapi
|
||||
|
@ -8,7 +8,7 @@
|
|||
notify: restart spaceapi
|
||||
|
||||
- name: Install spaceapi service file
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: spaceapi.service
|
||||
dest: /etc/systemd/system/spaceapi.service
|
||||
owner: root
|
||||
|
@ -17,7 +17,7 @@
|
|||
notify: restart spaceapi
|
||||
|
||||
- name: Enable spaceapi
|
||||
systemd:
|
||||
ansible.builtin.systemd:
|
||||
name: spaceapi
|
||||
state: started
|
||||
enabled: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue