ansible/roles/services/tasks/siahsd.yaml

39 lines
728 B
YAML

---
# TODO: Install and build
- name: Create directories
file:
path: /var/log/siahsd
state: directory
owner: siahsd
group: nogroup
with_items:
- /var/log/siahsd
- /var/run/siahsd
- name: Install service file
template:
src: siahsd.service
dest: /etc/systemd/system/siahsd.service
owner: root
group: root
mode: 0644
notify: restart siahsd
- name: Start siahsd
systemd:
name: siahsd
state: started
enabled: yes
daemon_reload: true
- name: Allow siahsd traffic
iptables:
chain: INPUT
protocol: udp
destination_port: "4000"
jump: ACCEPT
ip_version: "{{ item }}"
action: insert
with_items: [ ipv4, ipv6 ]
notify: persist iptables